{"_id":"symbol-bootstrap","_rev":"356-8d03fe482c35ff62401646ed0c46b725","name":"symbol-bootstrap","dist-tags":{"alpha":"1.1.10-alpha-506ac79","latest":"1.1.10","multimodule":"1.1.0-alpha-202107141152.176","network":"1.1.2-network-202111261018"},"versions":{"0.0.0-alpha-202008131017":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131017","author":{"name":"fernando @fboucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"6c541472ab6e43f3925fa4efe02b0888d6b13cd9","_id":"symbol-bootstrap@0.0.0-alpha-202008131017","_nodeVersion":"12.16.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-UEB7LJ4rmVjq+9VMyewGPctOh5k7jH7cbGDALI4fTvBR9ucPs7VRdUhxaHYpLm0xsXZ+75yDpo6Yg3yk1h/uLw==","shasum":"d9d37eaf1bf01b9b35612dd7fa12fb01d13e1c70","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131017.tgz","fileCount":41,"unpackedSize":61742,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNT1cCRA9TVsSAnZWagAADsQP/iWKVz3jgBeCFffStG86\nBpL07yntmTEEIYsdS7b2j/Qinwm1/+nTQjALGly35BVP/raKS7s5/uIpWSgg\ncvi/tYGU5Re7OD4S8otPtA+0D0dogrxK4nd6a3WwDQIB5RqufzDkKkrhgdNd\nvc4YU7v8QsiU7gvzRVnPzP1HznfxVK5r7YEfUMKsIsyCXSDLZb3ClvIUTZTY\npKzh9M7WmGeSeCXYZJ4msvgw+/zsmIpf8zfgHaPp2M1eefCfStZ4NuMRgmfR\nsn/emqZnAJKkMpx6kxdUiwZiUiAHnwUSjCWZqylKeXqZhxlfPsbOvGGToHE+\n82l+0xUgjiQp4+fonnP76H8hfYrS6Rh9kjImrGWoBuUdqUeA5oJ3dRRmkcDy\nbyKBZuUQdED1Mz85Pt73RxDOlNi3gVpwU1szxm1qwv+Og/docaRQwqw4xBPM\no/PUCdavfdwbwWFFjIkDDi0nSe47h63CHlyjhcNvsHlBsEK+AsJJt1HE0bDs\n7l+VoB29ItljAuWolMHaopoiC+dumxHuA45BUkFnOfOAbD5uyWJX5x8kcmNp\nQrxKoA3y91LPekV3gxafFrfGAbi2VECg5fyXM4PQIK4qznCV3NxaAEUL/jJD\n2Gi5soL64H2Osiw6K3NAzFiqnRO75YoPn73zyf42EIRRXv3ZT4morHiWf6qL\n4R2P\r\n=cjK0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoqd9qzXGJ5p+xIV6+NQDJOHhXWtqtBeZDyRtGqoIGKwIhAJzIWqvGI7sv/eZhsmixkMlE8mqIeBQtHLtSavi+tyB0"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131017_1597324636093_0.6172469860892849"},"_hasShrinkwrap":false},"0.0.0-alpha-202008131017-alpha-202008131027":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131017-alpha-202008131027","author":{"name":"fernando @fboucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","readme":"symbol-bootstrap\n================\n\nSymbol tool that allows you creating, configuring and running Symbol&#39;s networks\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n\n<!-- toc -->\n* [Usage](#usage)\n* [Commands](#commands)\n<!-- tocstop -->\n# Usage\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.0-alpha-202008131017 linux-x64 node-v12.16.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n# Commands\n<!-- commands -->\n* [`symbol-bootstrap clean`](#symbol-bootstrap-clean)\n* [`symbol-bootstrap compose`](#symbol-bootstrap-compose)\n* [`symbol-bootstrap config`](#symbol-bootstrap-config)\n* [`symbol-bootstrap help [COMMAND]`](#symbol-bootstrap-help-command)\n* [`symbol-bootstrap mongo`](#symbol-bootstrap-mongo)\n* [`symbol-bootstrap run`](#symbol-bootstrap-run)\n* [`symbol-bootstrap start`](#symbol-bootstrap-start)\n\n## `symbol-bootstrap clean`\n\nthis commands remove the target folder (It may not work if you need root!!!)\n\n```\nUSAGE\n  $ symbol-bootstrap clean\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap clean\n```\n\n_See code: [src/commands/clean.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017/src/commands/clean.ts)_\n\n## `symbol-bootstrap compose`\n\nthis command generates the docker-compose.yml file from the configured network.\n\n```\nUSAGE\n  $ symbol-bootstrap compose\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap compose\n```\n\n_See code: [src/commands/compose.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017/src/commands/compose.ts)_\n\n## `symbol-bootstrap config`\n\nCommand used to set up the configuration files and the nemesis block for the current network\n\n```\nUSAGE\n  $ symbol-bootstrap config\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap config -p bootstrap\n```\n\n_See code: [src/commands/config.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017/src/commands/config.ts)_\n\n## `symbol-bootstrap help [COMMAND]`\n\ndisplay help for symbol-bootstrap\n\n```\nUSAGE\n  $ symbol-bootstrap help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_\n\n## `symbol-bootstrap mongo`\n\ncommand to start mongo db (NOT WORKING!)\n\n```\nUSAGE\n  $ symbol-bootstrap mongo\n\nOPTIONS\n  -h, --help               It shows the help of this command.\n  -r, --reset              It deletes the database\n  -t, --target=target      [default: target] the target folder\n  --presetFile=presetFile  External preset file. Values in this file will override the provided presets (optional)\n\nEXAMPLE\n  $ symbol-bootstrap mongo -p bootstrap\n```\n\n_See code: [src/commands/mongo.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017/src/commands/mongo.ts)_\n\n## `symbol-bootstrap run`\n\nthis command run this network from the created configuration and docker-compose.yml file.\n\n```\nUSAGE\n  $ symbol-bootstrap run\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap run\n```\n\n_See code: [src/commands/run.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017/src/commands/run.ts)_\n\n## `symbol-bootstrap start`\n\nSingle command that aggregates config, compose and run!\n\n```\nUSAGE\n  $ symbol-bootstrap start\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap start -p bootstrap\n```\n\n_See code: [src/commands/start.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017/src/commands/start.ts)_\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"6c541472ab6e43f3925fa4efe02b0888d6b13cd9","_id":"symbol-bootstrap@0.0.0-alpha-202008131017-alpha-202008131027","_nodeVersion":"12.16.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Y5UE8HS0d4k/FJmRR8ummM8NdnOqc5aujbJygWg4/skitjC36xGtScaBgRcjLSKQwX4hMZF0M/ysBvm4CDwcKw==","shasum":"ed562acf5d08688618a5d41e2f991db58a11d525","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131017-alpha-202008131027.tgz","fileCount":88,"unpackedSize":126787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNT+4CRA9TVsSAnZWagAA7VQP/0EkfQdWiz26OwnvzGfq\nSp8sl6fDmB/Z2L61BFTCgOiMZkuzGYESGaPPOmZSJbddZ3yk5Ap9O+0t0Itp\nKG74SENftAQVFCiLJh8yeuT1fOyXdZ906mGpZXfz1hVQ651Kd4ra4GLWxUIG\nwa1UkOAr6+z3S/mwazo+wKpBhSVwUkyVHn6ZlvYip9/gip9RM9R3x9TKaM7t\nqEtuvyNsEkAicy62sWmUXlxVpgp9EFsxgaQc+BdM+5XmmCnf/oOUo6AqQv2I\nBe1J7tkW7c/yc1mIZP5tqlMU8sOzIuXjNrmzpuc1ZldZUOLy5qtCcWuSE52L\nQZ07D2A5nAOOVPS6IPlIWwjNkyZ+AuMMzUBEBgTKHi9FiJbvwh8sIt0WAjY6\nKLgX4PXyJXPjWStBSgwTlYSGkYEEb+oPLuyvIdtBIod15KRlZmB3t07noRdw\nQMb4dTT4JaqNC6nYc/5uHko3dC0tPfez/6Gz/lGlkJn4iIVp4KTeWLMqNec8\nUK/1VYjeyZ53PiqBZeA5ITYoPHn7wXzgpuKgNaBZafqdsHDIXFkQTkZeuvO2\njjLXvvhPRouBzecyZV8wL0O20fSO0NzZI3kXYiALjvxKO8EybhCYJAydc3ch\nIwi1zwhEUDsFJ0jZVyIZ+qhFZEKbZEttxDoNosqFULRFJlinm8KL1amJwkVk\nlnDw\r\n=mAlT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICooO/TNyj46RF2Sdh/AMeXzuLR5G9ZCVKuWL4Qwx8xnAiEAkU6Rd4r2iVCFAxHOzEyfXgYqCgE2rHY1lRa7giDn2GE="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131017-alpha-202008131027_1597325239583_0.0013947823158801942"},"_hasShrinkwrap":false},"0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029","author":{"name":"fernando @fboucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","readme":"symbol-bootstrap\n================\n\nSymbol tool that allows you creating, configuring and running Symbol&#39;s networks\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n\n<!-- toc -->\n* [Usage](#usage)\n* [Commands](#commands)\n<!-- tocstop -->\n# Usage\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.0-alpha-202008131017-alpha-202008131027 linux-x64 node-v12.16.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n# Commands\n<!-- commands -->\n* [`symbol-bootstrap clean`](#symbol-bootstrap-clean)\n* [`symbol-bootstrap compose`](#symbol-bootstrap-compose)\n* [`symbol-bootstrap config`](#symbol-bootstrap-config)\n* [`symbol-bootstrap help [COMMAND]`](#symbol-bootstrap-help-command)\n* [`symbol-bootstrap mongo`](#symbol-bootstrap-mongo)\n* [`symbol-bootstrap run`](#symbol-bootstrap-run)\n* [`symbol-bootstrap start`](#symbol-bootstrap-start)\n\n## `symbol-bootstrap clean`\n\nthis commands remove the target folder (It may not work if you need root!!!)\n\n```\nUSAGE\n  $ symbol-bootstrap clean\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap clean\n```\n\n_See code: [src/commands/clean.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027/src/commands/clean.ts)_\n\n## `symbol-bootstrap compose`\n\nthis command generates the docker-compose.yml file from the configured network.\n\n```\nUSAGE\n  $ symbol-bootstrap compose\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap compose\n```\n\n_See code: [src/commands/compose.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027/src/commands/compose.ts)_\n\n## `symbol-bootstrap config`\n\nCommand used to set up the configuration files and the nemesis block for the current network\n\n```\nUSAGE\n  $ symbol-bootstrap config\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap config -p bootstrap\n```\n\n_See code: [src/commands/config.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027/src/commands/config.ts)_\n\n## `symbol-bootstrap help [COMMAND]`\n\ndisplay help for symbol-bootstrap\n\n```\nUSAGE\n  $ symbol-bootstrap help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_\n\n## `symbol-bootstrap mongo`\n\ncommand to start mongo db (NOT WORKING!)\n\n```\nUSAGE\n  $ symbol-bootstrap mongo\n\nOPTIONS\n  -h, --help               It shows the help of this command.\n  -r, --reset              It deletes the database\n  -t, --target=target      [default: target] the target folder\n  --presetFile=presetFile  External preset file. Values in this file will override the provided presets (optional)\n\nEXAMPLE\n  $ symbol-bootstrap mongo -p bootstrap\n```\n\n_See code: [src/commands/mongo.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027/src/commands/mongo.ts)_\n\n## `symbol-bootstrap run`\n\nthis command run this network from the created configuration and docker-compose.yml file.\n\n```\nUSAGE\n  $ symbol-bootstrap run\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap run\n```\n\n_See code: [src/commands/run.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027/src/commands/run.ts)_\n\n## `symbol-bootstrap start`\n\nSingle command that aggregates config, compose and run!\n\n```\nUSAGE\n  $ symbol-bootstrap start\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap start -p bootstrap\n```\n\n_See code: [src/commands/start.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027/src/commands/start.ts)_\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"6c541472ab6e43f3925fa4efe02b0888d6b13cd9","_id":"symbol-bootstrap@0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029","_nodeVersion":"12.16.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-BHhu2v3qsM4DCmQCFC3UQcx9XWczFEKb5mWBVuZTUevSyk35iaoRSRfMgZqsSexUs0uuDUwEW8C7/qajncQ1xA==","shasum":"a67222d54693bb88d7dfd1465d271a327335fac4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029.tgz","fileCount":88,"unpackedSize":126958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNUAxCRA9TVsSAnZWagAAKNYQAIjKmiTs5tcOdkOj9HFb\n9Qsk55uBSQYFswQzSRbLW3ks3PW3N5jNxTR9Bize1Zoq9gkqvKCdJeznR4zK\n/3F0knHpInltEcxnHJszFZZdDQpo2hNGFCwW8D6teWduC3ZOhit+bzwgwwOU\nyekLA/1KQKlOdsJPqYYDSCjNXcv5lbhFZvHtHo+YXeWDT806I3Z4X0nGX7vV\n8O/W8VYhIsi1xdo2Tin38lPSrrw94va+G71+Tbkn9tZPDKVbKJpWpnRXeg6S\nrR3miHuAyhmk1v0JTe5cCThrqcRDB4VgirNZc3IDIkSUPj8vB8Nzuf6nupw/\nfMCyWHkgnOl77RWsy3UjGNc2OxBnG3sFAXk7dFjoPJLqSVUO7NtjYolbngCY\nifFZMrXDhTaOceChn40VOJEG729z/hC+uVc6Za+JQ1q6nysGD1gqJ4D1+5is\nueZzVnxYiNQe+znImVA1XCMwUqNt+LT9p+URE+8MyKG+OnkcZ9UiXSlLDWKM\nH9Z3b+Rh3dgd+U0vNkK/wwhk0a6ujzpTBSoUfJiCID7bxs31u1/YoGwi4eED\nz1KcjHPWqsqjYNYxsuROdPnvcJPin27k7k0Yvetu8r937S1RPYgG/QmJLvT9\naZ0q1y+UVF+ePnHUlQZ80UPBkRSO8wiCKgbc5/pCnwvHDxl8dk+ZrMAi/OCv\nkrlX\r\n=9gOg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkogm3kZuCQdZuPKOtD34kZi3bUVfn8xduFj4MxrF5LAIhALm44DZ1RYuPyNp+jM5RUjxuoU9bCOInQAiguHlYRik1"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029_1597325360989_0.9056112654147388"},"_hasShrinkwrap":false},"0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035","author":{"name":"fernando @fboucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","readme":"symbol-bootstrap\n================\n\nSymbol tool that allows you creating, configuring and running Symbol&#39;s networks\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n\n<!-- toc -->\n* [Usage](#usage)\n* [Commands](#commands)\n<!-- tocstop -->\n# Usage\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029 linux-x64 node-v12.16.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n# Commands\n<!-- commands -->\n* [`symbol-bootstrap clean`](#symbol-bootstrap-clean)\n* [`symbol-bootstrap compose`](#symbol-bootstrap-compose)\n* [`symbol-bootstrap config`](#symbol-bootstrap-config)\n* [`symbol-bootstrap help [COMMAND]`](#symbol-bootstrap-help-command)\n* [`symbol-bootstrap mongo`](#symbol-bootstrap-mongo)\n* [`symbol-bootstrap run`](#symbol-bootstrap-run)\n* [`symbol-bootstrap start`](#symbol-bootstrap-start)\n\n## `symbol-bootstrap clean`\n\nthis commands remove the target folder (It may not work if you need root!!!)\n\n```\nUSAGE\n  $ symbol-bootstrap clean\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap clean\n```\n\n_See code: [src/commands/clean.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029/src/commands/clean.ts)_\n\n## `symbol-bootstrap compose`\n\nthis command generates the docker-compose.yml file from the configured network.\n\n```\nUSAGE\n  $ symbol-bootstrap compose\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap compose\n```\n\n_See code: [src/commands/compose.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029/src/commands/compose.ts)_\n\n## `symbol-bootstrap config`\n\nCommand used to set up the configuration files and the nemesis block for the current network\n\n```\nUSAGE\n  $ symbol-bootstrap config\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap config -p bootstrap\n```\n\n_See code: [src/commands/config.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029/src/commands/config.ts)_\n\n## `symbol-bootstrap help [COMMAND]`\n\ndisplay help for symbol-bootstrap\n\n```\nUSAGE\n  $ symbol-bootstrap help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_\n\n## `symbol-bootstrap mongo`\n\ncommand to start mongo db (NOT WORKING!)\n\n```\nUSAGE\n  $ symbol-bootstrap mongo\n\nOPTIONS\n  -h, --help               It shows the help of this command.\n  -r, --reset              It deletes the database\n  -t, --target=target      [default: target] the target folder\n  --presetFile=presetFile  External preset file. Values in this file will override the provided presets (optional)\n\nEXAMPLE\n  $ symbol-bootstrap mongo -p bootstrap\n```\n\n_See code: [src/commands/mongo.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029/src/commands/mongo.ts)_\n\n## `symbol-bootstrap run`\n\nthis command run this network from the created configuration and docker-compose.yml file.\n\n```\nUSAGE\n  $ symbol-bootstrap run\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap run\n```\n\n_See code: [src/commands/run.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029/src/commands/run.ts)_\n\n## `symbol-bootstrap start`\n\nSingle command that aggregates config, compose and run!\n\n```\nUSAGE\n  $ symbol-bootstrap start\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap start -p bootstrap\n```\n\n_See code: [src/commands/start.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029/src/commands/start.ts)_\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"f381e7025481595e38b8a724feae3e9ceac74f43","_id":"symbol-bootstrap@0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035","_nodeVersion":"12.16.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-k98wN2ayC/4GPDRkDFvbIevKE0ZiEnt2Adk0HPqK8Ozg48dbERTzuFbbLpAaz65FkMsMFLMscydJQKtfK4zRRQ==","shasum":"583ca0183660a532a28c6e330ece4b612c78f2d6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035.tgz","fileCount":88,"unpackedSize":127129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNUGMCRA9TVsSAnZWagAAAgUP/3jT+VE928tB3rd2SV5f\nZjF44iJr7Vjeszirn8KcAAlBP6EmycXnnFS0Y80EdAWLPb6glawlVa14EOYo\nWWKyWQ1yp1dUSubgDtBs2PSQ2T1CmgLAKkN6KnTlm5v3dys/7Fkfpp06ztIf\nac2k3SExhLui5qZghR9TD1Ii4xb0336qBnN2ph3sVtwfeyf8eacfwt9+r+5m\nWK1hk4i5wooFthdbSTXeqmtVXMb0OalEizzASKK6XyvcUdwl1R0BCBgZ4+CT\n/XskGbMc2cvfYA5LnJy3fATdQdZWjurc6il4JyqKK6MRAPp091dGQgmJvs8v\nf+yU01cS4BkvsT+fiovTFPm/JdmQ8dvnrIubW3LdXH0gBAzdPAydXp0n/ss+\n5S5Xm1T7xBudjsLTlgcDYzOq2dkWyEvjuKenasKDr/1ibYjTH6RxKra2dtpK\nGeeySIPTAw4ju0stG6M+kDWt0O25mhU+4+6BiVeDRemSRJIhvpup1csWO8Dt\nggEizLDH87ZY28mB1w5ZfiLycq5Fiad9RAVj32gdyy/9iKpWo3n85ZPkNpI5\na0XtvCv+PKgo2myjTyjnJIn81aovz3u8vCNzOwUUDcFhka5H/iBP6Xu8jdIv\nHaCVSv1CQF1PbNiDJMgnAvkduJwbUUBo8uNmnqOT2RWq45lEHNaVTFgpT8gN\nkE7r\r\n=Wdk9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9ZL7ZNP8Mp9BS7y9NMsyQnBBzg0wDbeIG7zgBCvx0xwIhAMVc3E6a6AzGGOmISM2ek/xcmtehlwfM2XukEZnRFYuZ"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035_1597325707940_0.9989341518088755"},"_hasShrinkwrap":false},"0.0.0-alpha-202008131036":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131036","author":{"name":"fernando @fboucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","readme":"symbol-bootstrap\n================\n\nSymbol tool that allows you creating, configuring and running Symbol&#39;s networks\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n\n<!-- toc -->\n* [Usage](#usage)\n* [Commands](#commands)\n<!-- tocstop -->\n# Usage\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035 linux-x64 node-v12.16.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n# Commands\n<!-- commands -->\n* [`symbol-bootstrap clean`](#symbol-bootstrap-clean)\n* [`symbol-bootstrap compose`](#symbol-bootstrap-compose)\n* [`symbol-bootstrap config`](#symbol-bootstrap-config)\n* [`symbol-bootstrap help [COMMAND]`](#symbol-bootstrap-help-command)\n* [`symbol-bootstrap mongo`](#symbol-bootstrap-mongo)\n* [`symbol-bootstrap run`](#symbol-bootstrap-run)\n* [`symbol-bootstrap start`](#symbol-bootstrap-start)\n\n## `symbol-bootstrap clean`\n\nthis commands remove the target folder (It may not work if you need root!!!)\n\n```\nUSAGE\n  $ symbol-bootstrap clean\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap clean\n```\n\n_See code: [src/commands/clean.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035/src/commands/clean.ts)_\n\n## `symbol-bootstrap compose`\n\nthis command generates the docker-compose.yml file from the configured network.\n\n```\nUSAGE\n  $ symbol-bootstrap compose\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap compose\n```\n\n_See code: [src/commands/compose.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035/src/commands/compose.ts)_\n\n## `symbol-bootstrap config`\n\nCommand used to set up the configuration files and the nemesis block for the current network\n\n```\nUSAGE\n  $ symbol-bootstrap config\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap config -p bootstrap\n```\n\n_See code: [src/commands/config.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035/src/commands/config.ts)_\n\n## `symbol-bootstrap help [COMMAND]`\n\ndisplay help for symbol-bootstrap\n\n```\nUSAGE\n  $ symbol-bootstrap help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_\n\n## `symbol-bootstrap mongo`\n\ncommand to start mongo db (NOT WORKING!)\n\n```\nUSAGE\n  $ symbol-bootstrap mongo\n\nOPTIONS\n  -h, --help               It shows the help of this command.\n  -r, --reset              It deletes the database\n  -t, --target=target      [default: target] the target folder\n  --presetFile=presetFile  External preset file. Values in this file will override the provided presets (optional)\n\nEXAMPLE\n  $ symbol-bootstrap mongo -p bootstrap\n```\n\n_See code: [src/commands/mongo.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035/src/commands/mongo.ts)_\n\n## `symbol-bootstrap run`\n\nthis command run this network from the created configuration and docker-compose.yml file.\n\n```\nUSAGE\n  $ symbol-bootstrap run\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap run\n```\n\n_See code: [src/commands/run.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035/src/commands/run.ts)_\n\n## `symbol-bootstrap start`\n\nSingle command that aggregates config, compose and run!\n\n```\nUSAGE\n  $ symbol-bootstrap start\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap start -p bootstrap\n```\n\n_See code: [src/commands/start.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035/src/commands/start.ts)_\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"f381e7025481595e38b8a724feae3e9ceac74f43","_id":"symbol-bootstrap@0.0.0-alpha-202008131036","_nodeVersion":"12.16.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-tfRj4S4AWhp/38yHzPJCq6fZvwq7R8CTfkqfPaq2ttx2EF3ZT3VD+0LeiWDo+9tgJjK7GXiXZWFzyONKbRgexw==","shasum":"8072d095769a8460b0ad30b2a639492799fd857e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131036.tgz","fileCount":88,"unpackedSize":126616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNUH0CRA9TVsSAnZWagAAo6MP/i0NJXxUohC7o1qTlEIs\nPfFlTUIUERpA0ArbOznt4Jvfh0cnDYpdXqjBJ9qtE58mxYIE/7I16zSTslzS\nUKAiXKIJWCFgWGViIi9nwuHzfjBBt7ncBhlR4uQfNsi+hqS4OcdT60S6Fc2f\nVZl5qa5stkK8w70tPi4Ai/BNgFrTBxGxfKl4xolB3I7hWG3+SecvnZQZjcY0\nmbtoCEAU/ezZGmPgCbdIgvdrWNECXJh+ZqOVzQTtRkkqYTeiGAWdJ6RZ17ns\nros8TUNwBdNJTYMZxZB1fCsszcG2gYK76tIRR3km9y+v8hlEPdTzY1osSch5\njmEK9EaykQP/A/EEh/u3Dtynw1skEYBElcjeboGz9y0ArxN7/NyCFAx/J5a0\nxYHliS8ofBqNsh2YHyW7WBJkYQxCObVoUDjnjUtWrxnyVVz45FQbj4o/Tlzf\nuBSXxKLl03EDBzwtq1kU1b2bPVe6NDROgvIv9G3YahgR/8/djMVdarYsTd7L\nAfx2YfS1IVwNGgCH5fWFjUK5JhTshsxtiwols9Nm2JtJUf5cZd9rQPFR51+5\nOMM8s2axyVS+vD6x/ua5KpPHNv2lzewH8BNav/bhN2hMWZnUOwL6ZGf//Roj\nxmVL9YSrayM8ouv7KiRxP9IGR4/eMY7oNkliWiLctlfHv0ds1cjIs4BRa6ci\nBVu2\r\n=+b0D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbHaeLBrMYpbme4HumKyqTEYhV1P8pSKVY5Gsxy7wwOAiA8R6GQ1Gk71R6KeVnqge6gTsrTQ+I66iPiVHo49wppAg=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131036_1597325811703_0.06432194995177531"},"_hasShrinkwrap":false},"0.0.0-alpha-202008131543":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131543","author":{"name":"Fernando Boucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"fc7c94935d54e9465d61a3ca313444c56aee6129","readme":"symbol-bootstrap\n================\n\nSymbol tool that allows you creating, configuring and running Symbol&#39;s networks\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n\n<!-- toc -->\n* [Usage](#usage)\n* [Commands](#commands)\n<!-- tocstop -->\n# Usage\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.0 linux-x64 node-v12.18.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n# Commands\n<!-- commands -->\n* [`symbol-bootstrap clean`](#symbol-bootstrap-clean)\n* [`symbol-bootstrap compose`](#symbol-bootstrap-compose)\n* [`symbol-bootstrap config`](#symbol-bootstrap-config)\n* [`symbol-bootstrap help [COMMAND]`](#symbol-bootstrap-help-command)\n* [`symbol-bootstrap mongo`](#symbol-bootstrap-mongo)\n* [`symbol-bootstrap run`](#symbol-bootstrap-run)\n* [`symbol-bootstrap start`](#symbol-bootstrap-start)\n\n## `symbol-bootstrap clean`\n\nthis commands remove the target folder (It may not work if you need root!!!)\n\n```\nUSAGE\n  $ symbol-bootstrap clean\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap clean\n```\n\n_See code: [src/commands/clean.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/clean.ts)_\n\n## `symbol-bootstrap compose`\n\nthis command generates the docker-compose.yml file from the configured network.\n\n```\nUSAGE\n  $ symbol-bootstrap compose\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap compose\n```\n\n_See code: [src/commands/compose.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/compose.ts)_\n\n## `symbol-bootstrap config`\n\nCommand used to set up the configuration files and the nemesis block for the current network\n\n```\nUSAGE\n  $ symbol-bootstrap config\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap config -p bootstrap\n```\n\n_See code: [src/commands/config.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/config.ts)_\n\n## `symbol-bootstrap help [COMMAND]`\n\ndisplay help for symbol-bootstrap\n\n```\nUSAGE\n  $ symbol-bootstrap help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_\n\n## `symbol-bootstrap mongo`\n\ncommand to start mongo db (NOT WORKING!)\n\n```\nUSAGE\n  $ symbol-bootstrap mongo\n\nOPTIONS\n  -h, --help               It shows the help of this command.\n  -r, --reset              It deletes the database\n  -t, --target=target      [default: target] the target folder\n  --presetFile=presetFile  External preset file. Values in this file will override the provided presets (optional)\n\nEXAMPLE\n  $ symbol-bootstrap mongo -p bootstrap\n```\n\n_See code: [src/commands/mongo.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/mongo.ts)_\n\n## `symbol-bootstrap run`\n\nthis command run this network from the created configuration and docker-compose.yml file.\n\n```\nUSAGE\n  $ symbol-bootstrap run\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap run\n```\n\n_See code: [src/commands/run.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/run.ts)_\n\n## `symbol-bootstrap start`\n\nSingle command that aggregates config, compose and run!\n\n```\nUSAGE\n  $ symbol-bootstrap start\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap start -p bootstrap\n```\n\n_See code: [src/commands/start.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/start.ts)_\n<!-- commandsstop -->\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.0.0-alpha-202008131543","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-6OCt+1nvnTYd+dgVIQDTBs6+DpgnU11zYcRH32gOe+1ZXN101k+TPPjF6Xb3f90/ZXCXrLaPktoGunKzQ4pa1w==","shasum":"2078a5b3d291944cd399739f4196be931176cdfe","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131543.tgz","fileCount":88,"unpackedSize":128732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNV+WCRA9TVsSAnZWagAAPcsP/18JZnsGuCWL5tVaumcU\nmYxFa+Bsv9QB4r7rNDE+QTEtnWUupWv8mfF6XeufdpRa87q1ejD/TzKcDQ0u\n+Lof5k1m7LQqSsM9rrYnjzou9Ecp3TzhVTHDUKiG9Qs4ntEHhA8FOFV87Kzy\n8aQKJ7oO9NkQNbTYtg+Mszx+ur88GO0EfvE/x8wRv3Ov1FHu+MUU29WPp4qu\nknatZroVwyNN6QofuLDjHD9H8gf/SVqUUOs7xkg3Y+COGAMQkrBX9AawdnKz\noFGM80VKr6AMlhhsNwCv6m/8Rk4l6xEB/ZApGy4jBML3OSpilDv+ZdQNiNLy\n3D1TYgOEdfkiFLZwo9HcJlbIY782zmnw/vBrpgCdz85ArhrZZs0w9pITN8Vy\nogjMnZOLqRXfD83QxRRaBXuT2lk74MjCleP1chQZyEh8pLmvhyyBPy0L/SsT\nDSIHi4z8kjKgArDu9TuyMWWQx/kBWAvHlCTISjG8vHINCILDnb8M+le2rG2O\nzpiVwgbkXti8P5o+s7zKoVmX05x/4LfcXrBi6MzBEqSbrOi7WVPSPoVgH0Tz\nABzYpTvefrv1hOs4zNPdQL2lIym4UZep0qtkhKHy7LOn1kyTbEYnC0f/aQ/t\nJuUJYs8qGbu3ddStkrymboX18mxUBaCbqqYWCCOd6BWM3pvLxd3kW0oJKjFJ\nqMen\r\n=TKQ9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQD9siTKQpEE034dTsL265seCcjgIUmQETjKryvcQ5Mt/gIfTtNhmj+L6wu5yy0K0M88AVw1VYXPZ6qj4UBOQ/oM3Q=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131543_1597333397919_0.9778844169200895"},"_hasShrinkwrap":false},"0.0.0-alpha-202008131558":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131558","author":{"name":"Fernando Boucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"fd492a63c412c744641734d9bb7fe093e8f051f2","readme":"symbol-bootstrap\n================\n\nSymbol tool that allows you creating, configuring and running Symbol&#39;s networks\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n\n<!-- toc -->\n* [Usage](#usage)\n* [Commands](#commands)\n<!-- tocstop -->\n# Usage\n\nIt's recommended to run the commands from en empty working dir. \n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n\n```sh-session\nmkdir myWorkingDir\ncd myWorkingDir\n````\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.0 linux-x64 node-v12.18.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumens are created via sudo). Example:\n\n```sh-session\nsudo rm -rf ./target\n````\n\n# Commands\n<!-- commands -->\n* [`symbol-bootstrap clean`](#symbol-bootstrap-clean)\n* [`symbol-bootstrap compose`](#symbol-bootstrap-compose)\n* [`symbol-bootstrap config`](#symbol-bootstrap-config)\n* [`symbol-bootstrap help [COMMAND]`](#symbol-bootstrap-help-command)\n* [`symbol-bootstrap mongo`](#symbol-bootstrap-mongo)\n* [`symbol-bootstrap run`](#symbol-bootstrap-run)\n* [`symbol-bootstrap start`](#symbol-bootstrap-start)\n\n## `symbol-bootstrap clean`\n\nthis commands remove the target folder (It may not work if you need root!!!)\n\n```\nUSAGE\n  $ symbol-bootstrap clean\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap clean\n```\n\n_See code: [src/commands/clean.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/clean.ts)_\n\n## `symbol-bootstrap compose`\n\nthis command generates the docker-compose.yml file from the configured network.\n\n```\nUSAGE\n  $ symbol-bootstrap compose\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap compose\n```\n\n_See code: [src/commands/compose.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/compose.ts)_\n\n## `symbol-bootstrap config`\n\nCommand used to set up the configuration files and the nemesis block for the current network\n\n```\nUSAGE\n  $ symbol-bootstrap config\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap config -p bootstrap\n```\n\n_See code: [src/commands/config.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/config.ts)_\n\n## `symbol-bootstrap help [COMMAND]`\n\ndisplay help for symbol-bootstrap\n\n```\nUSAGE\n  $ symbol-bootstrap help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_\n\n## `symbol-bootstrap mongo`\n\ncommand to start mongo db (NOT WORKING!)\n\n```\nUSAGE\n  $ symbol-bootstrap mongo\n\nOPTIONS\n  -h, --help               It shows the help of this command.\n  -r, --reset              It deletes the database\n  -t, --target=target      [default: target] the target folder\n  --presetFile=presetFile  External preset file. Values in this file will override the provided presets (optional)\n\nEXAMPLE\n  $ symbol-bootstrap mongo -p bootstrap\n```\n\n_See code: [src/commands/mongo.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/mongo.ts)_\n\n## `symbol-bootstrap run`\n\nthis command run this network from the created configuration and docker-compose.yml file.\n\n```\nUSAGE\n  $ symbol-bootstrap run\n\nOPTIONS\n  -h, --help           It shows the help of this command.\n  -t, --target=target  [default: target] the target folder\n\nEXAMPLE\n  $ symbol-bootstrap run\n```\n\n_See code: [src/commands/run.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/run.ts)_\n\n## `symbol-bootstrap start`\n\nSingle command that aggregates config, compose and run!\n\n```\nUSAGE\n  $ symbol-bootstrap start\n\nOPTIONS\n  -h, --help                      It shows the help of this command.\n  -p, --preset=bootstrap|testnet  [default: bootstrap] the network preset\n  -r, --reset                     It resets the configuration generating a new one\n  -t, --target=target             [default: target] the target folder\n\n  --presetFile=presetFile         External preset file. Values in this file will override the provided presets\n                                  (optional)\n\nEXAMPLE\n  $ symbol-bootstrap start -p bootstrap\n```\n\n_See code: [src/commands/start.ts](https://github.com/fboucquez/symbol-bootstrap/blob/v0.0.0/src/commands/start.ts)_\n<!-- commandsstop -->\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.0.0-alpha-202008131558","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-WByMVrTSOhbjGEsKY26WlQhuk6bqc3/5uCAJgM4BLeAJrDrIdLaX6tXOH+W1RO8vDIjkfyyBjjKIBXcl5t3rfA==","shasum":"8375358cc74c048f1573e7d453a1578dc85fb007","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131558.tgz","fileCount":88,"unpackedSize":128850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNWMpCRA9TVsSAnZWagAAuhkP/3gdHmqztm+trYP/rEBi\n2oG+Asb1NARYmxJRcGjzAnZGVit6DHEAbvh06H4pKf8DOXjtFUv7maPxuDD8\n8hoI01q+IKQKqzoFmuJZaXpqmWkRFMXbKKTdWiYnB8XjaiO9B/4j49WsgymK\nRGsnI93CjOxvD0UgUEpvGL6asBd0Gu0wqLVaEFg9Bc+s7rQ80kuSibFQNdsG\nFQA+OTZiane3S2cKTuu9UXcxFgjUD2JcNkf0R9p5ZnY2YqvbqFxSItpwaJjP\n+TbTjH4BRGnKzqdoX6GQLu+zVYOfACIHclmT6YTUn3tkNByXQ8aaTRsDxKJI\nKOUrCUMxZErp0tupHWkrwIVeDID++oXmwvZ+b2hkkj2xltk8LpJS0NwJ77Ip\nqXSDM+syNNERD+EXZP1E6qHfb7n/la3h8qeAi6MUyG8jNB30sugpKm20wxVj\nqgJ5rGits5vuZW36RmVtKu43CpdwM0crvrax0sX5C26YQtQVJsN1d92j99j8\nt7mn1+Hk/1CEAp92rdPJ5zNfU29ECIyJ2EUlCAckltiBqtRyAjlooOHK+X53\njreTX/b13WZl7TMXlWWLmDCK8x5qsf9HrHpp47hVtxH18G9HalUKYVpU6WKJ\nU1zFTGuxWMoZvhYXu5nBIoTftIUKuedi7umnSni2Pmfc/tUEcDBz+2Z7YJ5/\nTvOW\r\n=t2pO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC150FK2ozpSZlmRrxyYHPoiMKQg8P8xsE5POPxxq8spAIhAMLEtyUxROCIyLkhbhExiWueh36eIBPiLb6SUn/W4MKP"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131558_1597334313141_0.0016063217069233193"},"_hasShrinkwrap":false},"0.0.0-alpha-202008131259":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008131259","author":{"name":"Fernando Boucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"fd492a63c412c744641734d9bb7fe093e8f051f2","_id":"symbol-bootstrap@0.0.0-alpha-202008131259","_nodeVersion":"12.16.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-HaFTLvBYc2rl9rJVONN6dQBY+SDhO+iUZRT+lYHiLSdUbShSPGscEPoa50kkb/Lq3eZ16cOBpS8PUWBYr5mDug==","shasum":"bec80170acdf17a21e11f1d5be6982ef43f1c967","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008131259.tgz","fileCount":88,"unpackedSize":128850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNWN0CRA9TVsSAnZWagAAMiwQAIGozATj5qcesrYgRbmZ\nNHQx1fRWRPedqiaK8sHdSuNHyQ/MWddl1NzB4Q1kM2lhZasI79nQ+s7xbcaf\nMxKMsoKjr7p1S68F8IT9PzzaSF2a/5pv6XMwBvXBki5jRT58RShvpxqEvjl2\nVlL1EOj9oHImzVp7s9xXE7igr73SBi32BW+M8rvnftv/8tJ6vcpQ+F1jtrw0\npcNnqEWizlIVE23P2hX1dWtxZr0FDkhFD+qpEtNaX8EK2QIZEEAeyqD/Tylb\nviaYUqfmxOtLZ9XgA5UMlx5f8oAQS32uq8ITAZ959dPsLvUMFIJjAJNGh8NS\nQsO7hFBnx7ztz2VlNNfvPI5MzqaVo7ndWC5+0s44O1jB6GYTO3w7Q7uNqu2m\n9oiWmsd6yiAqvgfdmIg5aFJYJAd0tmz0TFkHqu/f2ro6fr5QBwzqFzG+nH76\nqCEtJNOY6CkNmDXDBzmP9XYpjhsL4nn0+RtHfJlDc0wzy5NkfndV3dyB+R7t\nVTPPTkOf8Ip7AAXXWuTD44RN8Mts7D1ibDO4oUeLPMuHo6N0/MlqVG1mSEo8\nWhGwFzDSub6j8fPIljP99qafVwOtUp6p5/tw0Td0X9IPEzRxz1r1BoHvkJZN\nVNLCRMMdUMn2wmLI7+yO9i7cBgFb/v52w/pghRWe5wrsKGCZrkje+o+3tvib\n+Rc7\r\n=sGZF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFFASOhZXqmzsakCT0AXeTTgC5vZccOi/u0nDRzN3iviAiBYpA0bT5vKmBfJgMHFollS30PZtYf/E1JutroIu5zt7w=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008131259_1597334387088_0.6004445146583952"},"_hasShrinkwrap":false},"0.0.0-alpha-202008132037":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008132037","author":{"name":"Fernando Boucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"29bca928673be90871bede892f8358aa6c478dbd","_id":"symbol-bootstrap@0.0.0-alpha-202008132037","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-dJ05a9+DC64q8N7udWi1T3ehhs+ZtZVEjoKXel/Xc8Q3TFezJUqX6bL+qSeEuw+8WQu1NXI5WblcQru2JhDtUQ==","shasum":"b71247cb372d64c966fe2a4f328f5ab591194fec","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008132037.tgz","fileCount":88,"unpackedSize":128850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNaR9CRA9TVsSAnZWagAAUv8QAJBY7GBwm9K3W6msFUE3\nW3hS4DVF0ttRCCFBf4iG2x6pcjLjadS7x8qPFKK6K1BujU2/hu7VFo8+5CQl\njvXLjaMwwcRDzFIw8l6LnH5zk23wle5jgazgNnTSkGHfrttnZbsZg1sBva6t\n5WRLkhrOIiTsqroW+trectCRP5CT9p5lWq4Zqdj/JdhkH9/C7BuGYF4iI9Wf\n/9fIHASc7/mvqDFh7ms0Qw2Oz9oL0fLqn1q0gLYzl6yFMx+KUpeRLkVKUWNc\n0KqoYsb306fEJIdDT+9ZVDPJZnwS/v1Ez0SqT1HixeDmF/K8vsBsPJTA12mY\nRXEszP0Jo7dBlYkCfwArTUnMu/Br24EoB2K/zeOSkfMN9Lhe+RHJ2FLqu+Iy\nXXDWBToXYAkv6dIoFfXw21GG4wnoBWs7VxvNHxwSUOHu3xAxOtTwGIF2z4Us\nwFILNvqw9ameLVLspGvtICbqSxY8AfAVoFbjmpWlZVgEkNE4GgYXB/+F6wcG\nFVjGjSW/FkBdwf/HgrtxH9EPphbUEYyS6KrsdVIugdBMin49Drfmg3FLbVBT\n9E3pHFdgFyuV0J8aJfUcsYSHjd9ZgRoLDDGQlHh311cbMbhLgePwIyhklg1G\nOXoHCeHXlrL6mfE0dhsBX08mTQEt63WCRljdXQcniDHK9dHEm9nLAZlV2L4N\n4vla\r\n=OP3x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3IOEeruV9UVU346cN6/bvw4zcfMMbyVI8w55dvFAqhgIhAPzcNjUYeIO2kaBwiyip5vWCxxpbllN2LORMw0f17vn/"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008132037_1597351036728_0.12786473748761673"},"_hasShrinkwrap":false},"0.0.0-alpha-202008132116":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008132116","author":{"name":"Fernando Boucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"652ae343c56b4412295a94f4d2ce591993c48dc6","_id":"symbol-bootstrap@0.0.0-alpha-202008132116","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-HiPaE8UKyiN8YdJ5bk2TtTl3pzb6xv8xM6x5awwWrzBwNdglMKnYflreoG9hvoCUl3ZkBvXdnGAAgXSoPqlPkA==","shasum":"16f8190df321991192345b0b2f0de7f1d7db2bee","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008132116.tgz","fileCount":91,"unpackedSize":132136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNa24CRA9TVsSAnZWagAA3ekP/RGG5lt2X2wY5XWHzXhS\n3KQYhQPfWdO8l7NCIey6HoUpQP7pPizVfomc9Xp6QcUjQve2WkzwOtHVBjc/\nf3B5rcrR/J+A0tPhAYqAc7KaCtStPcXvq4IyEssWgnHPQr4TQpIrVzjec05b\nsvFOiiFNbWCkDffou/4xpLzFnwqkkwhNLxqar9jWtAs9idqUgCn0uVt2xC+C\n2+/hcG31dXVOpC6XS2Gf4PqtA85ZOoddp4/Y+H+G6Ln0fqjRoSECZa+HILEU\n1xmxJXc4xPgjDyMq3jojMnq5LIMRsfibi/RYW6xZ+8rFVzUKJZQsTTItSun9\njizG52coa68G9uuvuZu142O2rTxXVBevBSw6cCt9h/lsalRl9BjialWFyE/t\nfOdblMEOjnBqka1zlV3e1iqyB2ngV0dpi7GyJdCA7H9n0sAs6aAyP48PWzJ/\nOX8hIcyTvOYieet/veTEsR1eu0/e3ns9qeWxIq2pua2L0qJtVrJIE/CXz08B\nRvW9sHX0mtEisZF4sNTBj8eXV59Sutryp94RCk6dGsjsoYGSuZOE9DCXlRw0\nh1e2nK3c8a+4muVxnvcgnwVuWQtDIbB2UCDMK9y35RfI1Byn0IXAwvwcRqq5\nYObMY6h1d4uByTM3336/kOSDH/RfpetkfZPXpj/jAXaffRux4GwbLiEcEAH4\naFhc\r\n=olGM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAYceRdV3a+uJVtn0j1ku88tX8fj1LVdXpQimTAVx7/pAiEAw4TfKNXelIlhSMMHdRWgJb2cICI8NmXItJWojbP+Spo="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008132116_1597353399263_0.9950471792547022"},"_hasShrinkwrap":false},"0.0.0-alpha-202008140237":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008140237","author":{"name":"Fernando Boucquez"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"00751305a18b5ab40fec708fd16d5f667040fbbf","_id":"symbol-bootstrap@0.0.0-alpha-202008140237","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-lxPkDN//RTeNtYeiWj55kAqscK8c1fyvUeVo0PCLmYT8KW4lm0+foYlORIj/Z6n/KYLj+9thxuuOconmN15PCg==","shasum":"b31dce91a432ffbb311d7608254c7d8caaabbcf1","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008140237.tgz","fileCount":91,"unpackedSize":136312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNfj4CRA9TVsSAnZWagAAGMQQAIMmH0CgEqWCeLJtiJrH\nNcWtq+CfurGD+6i1Y85DqoYOV0OQPp03X1q9U0lCZDyVduGQkL8Qr62Psrta\n8QHJy70BgwxAIuaGJoFvVdngte1CZj4ClE1J6/aCgi4IcqxJhLt5ZU3xZLA6\nuTeZ3CVN0g0yVSKxEWvaKD/xa685ag4yI9HtPygImTypHMBP3DcncV3DuSwQ\nlGGMRBwtVc98wMqsIpVSTJQxsIL2ZyJEJSseITn1nFAhz4ipXPNbi9wxXP4l\n4TIvFUSjDjJRT+dZYRYiy04qSpfQyg+V6mb4HpjAR5NeMZaPjD4ttE5fwVSM\nq0qZ8d8ptLYLV1rJCGr6wtnN9C4VgQm2SghaJTiuv0MMcwyO0L9NSS+Uenv1\njJvIfvOZQA6wtuZyEEO3WeS5eHMN4NMQ81XRl/9ChC35pKWWLpX63IRFm2uR\nFCiOtHApq3/LS4l8HyMmedJvgSHeQfMQeepBUirxVzo1r7ES4FIeJ4JMqw+9\nme42KDBAMMNrw6WWi/2yB9diiGr7xmbj505NGXDt/mrcE6mz2/E2RnB2nswa\nPBLdzKGDyTPI+6rL9FBAhZTcEHA2YFxUI+Sk4TJkx0uzqLS7dNffwi+JA0AV\nGdxklNs+NiWgNWVptkij3ysISfdiG7QgxRffpU/vP+c+vYZCEsghrzWZbx1/\nfAMq\r\n=ArS2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqNtKvl6Lo8NbgcAoL2Yr8WEjmqyTexFLN70aXumxgZgIhALKYxwA178TUPhWaDxLj1tGKsJgde+0bAuwpv0BzQhEW"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008140237_1597372663511_0.5713594110295206"},"_hasShrinkwrap":false},"0.0.0-alpha-202008140238":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008140238","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"d603e9cb537b0248655c8a4b01468abde26f9db6","_id":"symbol-bootstrap@0.0.0-alpha-202008140238","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Ww0Nv5evoGOJoN6YrO8m9+kYUGr7dWSP0VmAm2DpkHr9Y8grV/Apj8duck3wIpuuWxz0TLT1svjvskUov+5sQg==","shasum":"7cbe7411adc06604b98b49694ce8ad36e68bd336","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008140238.tgz","fileCount":91,"unpackedSize":136334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNflMCRA9TVsSAnZWagAAZicQAIxN9Qp5ZHLM/Y5tNf5q\nGZkk4V71HFs4kAkcnT96NyoD6eM3KfyS9ilczXTvTG6EyI+Kk+8looNemTMI\nu2X6D1CS970Z2U9VR7JeNugQY4vPi2Px1+2HKZK750oTOF8Xr/YOc3x+tMIF\nqNHIlXc2Qy9p2Rzy4AgCmZuS6LZ2PaBXD7Xq4EmtBT9Er+z85Wvi8JIprJ9q\nPCKPfg1g8fzcMBnbtXfmpefGvbHzi78wmpwO9w0xt6QSNIGllrOMMWFidfKu\nGoIuyMyjyWqObBinUYpqEpWPVgfL+v4/nfLJbG7bcAZ8MWaDJrqlo7l1uVW4\nR9geA8NfLzSPNKzqMv3Pm33hXtVEr1ztygH9tQgHMO07Ia7ziCmqAq6Gbe1H\nEsQlhtvQ47HVJEbP1rH4wBYP6760BFRKVRHlEIITJNGD8ueDFybvNdgKuB0n\nohGQd2TP5FUhRm99CJ+SVI45GRqu+PyYsS9gEZ+yxXnVUsdep4b43p9zmnKt\n4eQqHguj0BnYatraiP6MhCbtbH/Ix5VCQa+F15nxUJf1WQU8MtSf6BPXh7gs\nTua6EvXKB0f5wqJLb2qtK4OrMlbNO14wYWFLliC97LiCTFwBV5Qu7WXf/SvK\nbua44SIjhLphHkM1IHhIou2c4KpE0Ok7OYs1StYLTQ9Vhdr2X5VCahMPgGdw\nm28y\r\n=553O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKKfo9FwworE9t2g/MuI+g3BidN06/XHjqv9ZHIxRAiAiEA1wi9ffI9BmjBRnvGEulDYTOO2sBLMN37UxIsGQZ+LVk="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008140238_1597372748140_0.16498932726591486"},"_hasShrinkwrap":false},"0.0.0-alpha-202008140245":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008140245","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"fc83e925b1b59f584ca348b2f6498071dce9e413","_id":"symbol-bootstrap@0.0.0-alpha-202008140245","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-tnYzFZUJL2TMqXqoT9byBA//bB2JkkLgapi8MrrNcnv745E4yKropLPEryhrSIwtHYO9jOrZlvI6H+D+BJhxqA==","shasum":"5ccd6f4d98379adf3e3d2d6410c8c93a0c195920","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008140245.tgz","fileCount":91,"unpackedSize":136455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNfrHCRA9TVsSAnZWagAANXMQAI8TaXlzkVFDtWNCP2Y8\nA/P8ZnS0en9a8V+F40/ZU20Kyfnz+yBEvc8FlZj6DOgc+K3SWOXDj0u/dhoi\npHPkIdBC+cxgi0t7a5UgISe2OmIrXqg2FCd4aZKicfiGxgA82i34cP8jvsge\nLA1JmjrlWl5w38iImS+dpq/WYNdfWxeHFPpx1UKms2cOIimm8mj3hdewsjKs\nuudEX0rkfjogDFWv+UdSvxMDzHJ/T+mkBtkswU/EybsvF9fR24ZyVQsDszBT\nMDxK67CwXecS/YJAShrunT3u8yuN3IhQQ0Wylp0c7+GJAPzep9P2fWeZq1m+\nqmKhDvJRI4zfKquwry8PcSTSY2cfYDuokfevvGSK0gLmWza8/Hg47R+KPhzf\nv6pEXXPa1LJuPjbN9HDpPOcBq2OXuhg7jlXyL4f0Ur8R+OklgWcnMJchfCJ8\nFOuGYRASdY4Xa4+AjfeEgjoiUZZSsxq3mFn/RJ2gX954OAi2vnfa+PjdKN1o\nYmg9LQu6lIIvpH+f66I3n5FdzOycu9GTgHfpZcVq1VQ+GBq1O/xqn4wvgbwf\nZ5bfPwea36s3UDZvI87CNiEGGEU4lJyG4+fTP24B3jlUoB8ayIV5KbbyDU4C\nRF/SO9Yek9ZMSHPDnzpcqD2fTvwlDCzmcNLXhwNpiCCcb7iBsO5JKMKfZhzX\nCMm4\r\n=dCZj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbIgwT2+xrcUBKQSwgkVyipm8LWdCaI+Pi+t08UfSqrgIhALRtAV4EtSLgaEre/PU6lCi1vCle9ozVLIf53geoy4qG"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008140245_1597373127320_0.9851623166828503"},"_hasShrinkwrap":false},"0.0.0-alpha-202008140307":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008140307","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"9e4d8a7aed3073438c3b44fa977c1aeebf76aa45","_id":"symbol-bootstrap@0.0.0-alpha-202008140307","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-LkA7n5JZlBAR/WfmyxTU7VlGydfT8KwWmSyshzEke+DdB83saio++otwygX5R76mKL8WJyYJdwBgxZ6/4USgXQ==","shasum":"e1865d7fbbab06f16065368c3b6226984a8c88ff","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008140307.tgz","fileCount":91,"unpackedSize":136918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNgAECRA9TVsSAnZWagAAu/8P+gOIC4rbJ4DHk0kzsM4G\n+VnQ4rs7762LoS9RnJi7vJ5fP8BkJtGQUV8lFGCQ+8hkWr1yEM6IZZaJm9e+\nN0jQIAJVsfVZEEn5j6ZXiH/tWyFZOKHwyJFCDYdG/+EWVGG/7T6sNmY8ZMRh\nAyQUghkk9yIGgPYzg94rSOBsC/RSyGCWDGX794Q9/tZA1hMtDiieekYMQcS7\nrwEBVV4jnI0l+9L0j3fHMBKjGY0ts3Jr1vGZJk+jcqVp3+NCz8JPzulHIhMf\niBNvvpeKTxdQHw33+LuQRfb2Rpy4XI0pZyYFOdC4tXG8QzipEX2lUDvpMaxd\n4fynILqvq6AxVpb6TkM2ChPWMimFKTppaiYUT8Xf3khZvgOS2nIrlUKzYNCG\nzHxvYVqEXpGj/7gvd/hTSS65B3DYfKvpnLr/F8YYOISnOhey0GFH6Fuyj7kJ\nizgwTOZx4NmcngijcLrY+oNlI46itwpwtrdA8piF6U9x6w8YpL5HQcdq57xs\nK6BrsvwMCPOt4myiKdg2B0q2ofvGtc0+LFEvixBzYhz6necW7NaxA6kzMrjD\nF/Ee35ilri325969qMsCoQLIjhKuZB6RY3cr9XfejqdeXovE0nC8TeJJppop\ndjhO/Dxd14aV7tn/yBCmh4Ecl5llPHAFm0051RQOFiN1vY7ja1tOzb4wfNIu\nQJPC\r\n=yM5G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHU8j9822Qu4TGmxXX7rpEjh9Edtza0zyWCiYMDjBAABAiEA5htLKm01mYT4Orw8qdgv+uVE8KmTPIX6OTh7vLJAA+4="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008140307_1597374467794_0.12965238496528686"},"_hasShrinkwrap":false},"0.0.0-alpha-202008140323":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008140323","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"574a8e321f6ef4dd677547f93ca649aa8758d8b0","_id":"symbol-bootstrap@0.0.0-alpha-202008140323","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-lvuERha075iEYrNOqUDxlb0Ta62mj2H0PRkAf/SyIKN8D7b4N3xq87IJgOgO4CWU+e7KPPKgJhsV6waxMntVxg==","shasum":"a527e2fcb67ac383537f68db23cc76ca7848cc6d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008140323.tgz","fileCount":91,"unpackedSize":137049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNgOvCRA9TVsSAnZWagAANUEP/0IqvmrAQ1dvOB5zBVyE\nOlvjCNCbLx9uPz0EQ+wMoUiA/nZpdBi8xdCRuW795KoZCfPMx2olMdVBcH8e\nLAj/f/1xg4Me35ZZGsJALjQLeWCUgOhRJiYke/B9nJLjyBV7Ea1rZaq8v3Wg\ng8upDUR0TvKkhLzGSemSfH1a7y+5wxmahrtp83YBhhoL7LmNlNKKoouO/clw\nqgvu0IrKgyOgmn+W5KBztr9FQdLCMJ6X0LTomwD8KTH+3LlrXngEbfit71oK\nJspRP1cYvCHkJvmyETtHn726gHAa8xjddvfbvhQw36hAJgJTwux//nACyfrv\n0ugtEPgZcz0zG8lJksM+uuuUuBmDrqfxwtG7sAYsvrK0/P6kELw02LyHy//f\nQymB2Z7VvXt2WZOzEN0CiYf9aOJz7N2dSVDW9A+oHaS9ElAOQsuhYEMoHu/E\nO5w4wTJ2ieK8E8eDq4+260pze5PM9nKsbo7roL2g39ZTqepis/huEEfOM3Up\nC+4A7nHEDtDpuj7slc3XI+RFoLWJXXw5J0gt6NFn+Wtz/LoaMikDOVMgw4GI\niTiZojPh2aZnxeIzGvf4NA2NgrQ9cF/+uItnCrlaI9hQxppYUuWdDxYetpS7\nhD5out54LlldQYHV86yZXq1/DYvr0/sodCyU8oS3lEjMiMAgElz6oXIcLR1J\nCYX6\r\n=hews\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaDhdRrzzNA863qkuIEtewYeqh0+ILDeTVk5QLgOMA6AIgTirdOM5pkd0l1C66ddhrt/pt1S+YCC5LF3d6MBEeeXI="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008140323_1597375407123_0.8453733819377163"},"_hasShrinkwrap":false},"0.0.0-alpha-202008141133":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008141133","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"08251ef37d4b41c559c999ebfac626b22a7991a2","_id":"symbol-bootstrap@0.0.0-alpha-202008141133","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-LOvBdaUD+o86D+PXNCXnj7RvWpszOZb+hIwfz5ffXYCye+QpuI4lkb+4JU7NaZ0A2GZ5qqnRtihNiGagrdVQFQ==","shasum":"fb1a53eae1e61a4f0e61e19dafe227733aea8b30","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008141133.tgz","fileCount":91,"unpackedSize":139962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNnaJCRA9TVsSAnZWagAAUiwP/1mS0PwWewYJc4lBClq0\naI19TGcByOdSrDYzkl1Y0Y0aR679xmJLQqT7lW1dgcjY8jnnZ3w+vmlmUMvZ\neGMjcEjH0Qi+EfJxymHJD0UaRSe4vqzU5eHbvN0+2kBZ1YX2Xaj5pGkCYZ2b\nzFX8zYPPM3IzU45xxow/+Ub0jjlf3M2OvOZWTVX4wPq5SeEyWYbtaY9/HVqn\nG6RsMIIObR43H+DuiOIIyVQyEIvMwxRwm4SRihayTvAEWSz3AktyD7XF8h/v\nTbvISr/814FP7H3NDskKsRvPUk5lgg83/yI0f+F0vHndcrfXlN1lzPzTKNz7\np3bN1IcNECVXWaPkXnDc2kmQ0yUBUDPLHP/fnaH/mlTl7jNaKVVyFhzhOOZu\nYKdE23nBjA5Leao8UwImiS3SF2p/wKGTlwV/d5mO/cWDm9zDaBfLA5uGWK0r\nTnOXHR4VWpfXwzDhwqJZT3NDdS99qw2BLkLCSWkT+EGEiGSEWDxMhZ4hbsu3\nswq3An1pjIit5QwArhJek3SFuzvR7azD1G+fxAsSjfSglztRbmbwVfRPv98Y\nwkqYF21CAFqr063LPZQlrownTVmRPkeTZH6lSVphct/LYspdTm6oScqBG2/U\nUiHwGRddyOAIH4TWvXTeoKQ9A0ZFsFuQgDXgNN1VX5nd9h+T20N4lxot0UoJ\nqn6W\r\n=koe8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+CHKKzIzqsMk898fZyf9fArU0VuCwv6WzqJLIkK3StwIhAOoUkLAUBfqAuhFznyeEEHF8QyIHU3HSpCnZgUlWVZwI"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008141133_1597404808837_0.38340857376782544"},"_hasShrinkwrap":false},"0.0.0-alpha-202008141534":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008141534","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6-alpha-202007011407","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"6d4e85b24ab2b433439e508df28ad3341162cea6","_id":"symbol-bootstrap@0.0.0-alpha-202008141534","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-lO3M7ilDt8K0VrBZ4BcYIJptlL0FD6gsMWXJFqpfmFg4zbMSRw1EiyRPft/fsyP72ANXY8nVRt+WLJX+0JaZEA==","shasum":"644d5b6b3f6794adc16fd6279e098a8057cdc4f3","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008141534.tgz","fileCount":91,"unpackedSize":143474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNq8ZCRA9TVsSAnZWagAACg8QAKBfzxOPRH7MiVXorfnv\nXy5PQ9+HaVkdGyganlq4ygF/xqIWZaojysCEVt8YMvcPCvEpqYVRsGpMaumS\nqHOaGTkN6+E+fYZRKYENn5eV6UIR5JSnjr4TZ9MwyUXuwjUuE8hz8x2U1WDN\n4iQ0rb28FrtLXvNJc5TX86AOJ6MtEyUpSI4UCqPwzDKB+IpUz6Yqtv7O1r4p\nVXLH95LCn/OS7m+N1gfSjfRL25l2P7ZqMcZe7J5xaR/vMvAmehkaTp6H1EO3\nxjyxXQ0gltF8lLVl3USOsBKYRcHXzRxUk9WUDRiW7ynnq1p8zM7JW1chuMbk\nbTRzvzVPZOeltwSzFBlC2S3ZbK3zPJm7GTszshHbhzhiBhy6x8LXOep+rpDx\niXutqP91Bz4z9xpiokyX/aXSDfLVVpTQefD2OiFCN1w0IPu0WPsovVi2Dq1r\nK4ad2mpsROrWn63hZABRPKR8+FwqDyIzDfd8kRpDDJxjxkBlUZUm7V3X1BMd\nLcruB0q70bSE0BStReo5MpXClztwc43zyiDtkuo0MVmjWWGlgpJDZrBveSvF\nwJknZnywdV+A9ytMMIA8H2N5nW6EtWK4Hd62+RWkWb3OEWid4rdQOHO0jZPd\nHn3wGh7qom+wODY4RJ4ps5dl2od8jEO/d2O/hqQga/MfOaOY+AsEawLejEbO\no22P\r\n=uGBE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+MdpHzXkSgcG1ajbjvI8Wgdp7+ylqT7qYwpYBgU80PAiEA0UmvAG/GgORLN9eIvvrLDZTeEvabrKABdnG/FPQVAPw="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008141534_1597419289040_0.3150289965084552"},"_hasShrinkwrap":false},"0.0.0-alpha-202008151207":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008151207","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"84e504f9588a4cfb0526f865754bdb7dc0e0cb98","_id":"symbol-bootstrap@0.0.0-alpha-202008151207","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-IL5MhG6Itl/szPToPEp1XedaZc27R+RXFEXjNtxOsH+F8PRHdQfXbk1sG3iIql4ITwhd0brnQmauj7UOzx9EIw==","shasum":"68f439ef6f00e979bbd2de4900d7c9017d9bb1cb","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008151207.tgz","fileCount":91,"unpackedSize":146935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN9AHCRA9TVsSAnZWagAAqf0P/jezkoLlGUV2ndrsHnyb\nq/iH8EgygD2DZYrdm++0lMEhuJBSuq0fG+b1LEIFpqmPQFY3rapYYYjpfGnH\nustIcrNPao7GBWKl+8U48jGIDgarT+EOPobYWhSwq1wgeaJ1OfM8d12VtSa3\nXOkXyuoS04KuXNePZ4xMkVjGt2DOibJjeq1nZ2D8c6eftcvYlzPZQwJwF/JD\nk34WOEY+BvwjqGsmAQaIQIMElxZ/hm7BGVFn925CYjNCZb6nwADS43k273qT\ntwfUbdhKhsVZwmWhP5NUIWAL0TjySiva1VXAjkXhXBWAiO3oLwiRsJVUOjoF\n5HQdtOGg4Np2BnOq093wUUZI9Jfd3xgiWDRJj9fwrIDEgvzRlmuFpCwtnvdL\nvY/L+99QEhRk+Vb1xgX4WgF9m8RrSOcAXBHVNpN7NK1ayoz2jIF285k5SDAr\nwgXfqerKYgWRh0/uEZUOlij/GKBGvOO6GmrVVn1R6FzNrlrnAWRdepnKRtv4\nySg/Iq98YCgoqp3+tt++QltvZDc5mgV9mygI9XLgW/hIpl+s/IVuilI/qvXT\nm0n7m50lMrJBEDsbeHfBBL5QrYUEHaz+HWhorpBYdgiCbyUGRcBO/Ih21jsC\nW6+ME5A6awcp41RhEwfrmWrmmmRyvRbUU+/ydFFHK5iEj2QbnTmoyTnedXmx\n91m4\r\n=KVgf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBM+pYVpNpilw5wsxElhDHbMLlzY4PYOXZOBB6Hb0nujAiAkpWIJdgqvYVacAyv7zNHK+JEsQhu5MlvuMtopa0aong=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008151207_1597493254415_0.10712467686384408"},"_hasShrinkwrap":false},"0.0.0-alpha-202008151326":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008151326","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"e493215bfd8c29d2c5902077938324f2157b0624","_id":"symbol-bootstrap@0.0.0-alpha-202008151326","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-wxbdGQ1f7AXzu8UDWE8pdTtmDxFO9SLanwJ8Fv6yUvCUkHw34gLDEOB1IIhhG0HHtv3YvGPm1g6dPgH962Ylag==","shasum":"caebabe375be8169c3d67303668f3604267d36ad","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008151326.tgz","fileCount":91,"unpackedSize":147646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN+KaCRA9TVsSAnZWagAAS88P/iCnLb51oT7H5LIm+Mns\noR4aEFDA/sbdXG62CcFvX1NK2yBWfh8UWI51YuPYO0iNlKdxfGaQTg+x9t0Z\n9xZxfM7lezN0QS/ER7jxLlFrWOD1fCjaK7qU17p6kjF50DTJfF0KlThlByZp\n4JnQIfmsvd6+H59PKDFQNLQrr4ZrZ2CQytXP1uqlpaGIdJBJXMlbxvTQ4eNZ\nD1MqiSk5TS5DC886q3x6f8enYV9vQonSgufU9az50WRN1wvP6w6IsCpfBkR6\nD4/aLLyKkq1x6syro6LpcS0PvuAxZUW6EnblgAuHopev29hU42n/Ns8NlrZ+\nzCAuByoCiJetcAjyQg3JYrOSttfA4FzVcN4hbEB6Dkm7hA/+QVKxPUZyUGhb\n9NPNbvZCWWRqsiPE8jYc7EqPlWC3Q3uPLBxwqCWxaHmPmhKeVFMjcnq14a0T\nrX4n6fGtWQnbIyETn8tR9gV8HZ6Y4acvT6abZVIQkZGkxUAJT8WbNMPEB3lH\nC1U7Suxl2ODCfZscMR3J+aubFqTFWnRNDkLFgQRK8MH4HqXTfnaErMMq/Nsl\nGg8Sg4za4PMupJHnOy6fWYxsqv8ku511EyMN3zg3wAON9ChHg1P81+LQy91s\n6ZZPmx1mrpLCj+wS2TWbyg62fTfJixljhkzznLCQppJKBEO354gjy9J+XI0F\n/LJ+\r\n=uEoT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDBbdGZ8Y+BDk+K3WUlS0iFyHEC1Lh4klSng5COpPRMHAiA6Xw4gmSuz4eMxaCLodQfOrytO9agjfxI7HHCRORx4Mw=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008151326_1597498010066_0.639173413258953"},"_hasShrinkwrap":false},"0.0.0-alpha-202008171219":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008171219","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"1940959afbbd125cb4dc3c43fbab7db6caf098d6","_id":"symbol-bootstrap@0.0.0-alpha-202008171219","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-0LYqlbiqCnZ0HHmRtceM4wJhoHplQUCVzDbEFLroCYfUUgj/zDF+UpOki4mzlWDJPex04L1UKKXT3NzBVCi0Kw==","shasum":"cb79ea65fdcdda93399795964862d7e69a0221f5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008171219.tgz","fileCount":93,"unpackedSize":153358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOnXmCRA9TVsSAnZWagAA8W0P/1yYXyPeJ0gzSW4sulpO\nEst/THb5GJ7jkD2rLLKZpYdkGgh33JJs1o8pR5iaUS4SSu2cFxr4GVu7NiK4\nlAx1LWtuvC4+SWVDZ004tKJYFW/G0UIdTdRaL5Viwr5qL7klcA2ngm7v+wh5\nxthr7MFBfPQc+ga+tYBvTUIxLqym7/CMxf0RrdzNYdku1S1uQd/+6dZLf5Pn\nJ7uESdgz4moKlZbzFx/mPNx4EpO9Or+xXWfgGkdwNGIN14AAvN4utTL5PcD9\nV35VD7uD8x8HS35a52bopVcuqUaT+iBpvfhfUi1AbC/dC4jFin4htnKLtMug\nJkjfgPcKhfyTZUn0dkf1Bmqmt+HBn7oavvkn0WQH5XTb2l2Ld7rKCMgZ/M2n\nuwiKG4crfeM3xFk7BZstxv9BwGwCf/7Ea3p1xq9BfIiHWEc1JTkPdlboE47B\nKh4VGEfNej3+qrpNtq51cvbdMEl3R8Z3j1aEEGr6s6gaLucwaUcY2dAI+95B\n/G/tWMIXYwW+vyrxhk9RudEFViTQHHHDYx2HJ6nkUihHNBjZspZTzu1foXyK\ndDmbr9RhxIm6vvWCoKryh1MJfiVOARGugOovnVmzHhAC1cLaT9LYisYzYg0S\nc7eVV81aDIEXShRRshh4TUprpJx0e4rCxXoKTm75SbwwXPCtqt9sTCNW3Krb\nvVAm\r\n=nII4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGozZgYXKNeZ8NHnSSYF8SYtggMNWfHdx4j1g/Q0QIf5AiAwEbfiydkKpmNJGXSLr8wCww8kNfL2+WQ3b8fKkXRYLg=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008171219_1597666789342_0.019067371341499495"},"_hasShrinkwrap":false},"0.0.0-alpha-202008171232":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008171232","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"dc38105812cb9d369a19c7712a31f78c3a90f349","_id":"symbol-bootstrap@0.0.0-alpha-202008171232","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-O7wtfvOUZcWfLSmrsTerd+w7QjWCUy0txPSA9jFa9RPPOK7aM9UtSflUL6D3WuffVp2MmhGblQ8wLBthzl0ICw==","shasum":"b9f8f080423c92bc7856426a94fb9da6a14c71a6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008171232.tgz","fileCount":93,"unpackedSize":153358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOnjTCRA9TVsSAnZWagAAvWYP/jaWxSPutfCnzXPTaErU\nws0L2Ax1NDsEbKx76LxPAsqVw1j9F8KxtuWy+/KT099GMzQkK2zkChtJSHvC\nwk7dbMZKABbQlsj4sC+ne8rPSmVchupeJcGdHPs7Z1RYNV8aXqCWHFqcTyJn\nwhk9UeNqOsIpkVVl43eiA5vHkjAgehxuPnUigugu0oJzdVUKGVKlpSNDRCX/\n83VeSbVn4Xt0ti1+Hf1SABWyVgM7EBKecBZmpJvV/vkg7daUIocPWxSlDgSd\nzDp59dImP5tavku2FwEuANfB15pK+0SHjF+dQh8Pl6UI4XqWAHA1v++Ivl0U\nQTSMJAQV4HDwQFGA1KtVmaNunmtkZGLhr88/LwbqazQIovNm3mTGn5yZIkW3\nsAPI/Sgt5kNJsvur33/1vL7jJMdpc3zlZdC1YpKLEBa4df3vQTwFFGGfI3Xd\nkdT+nm5i3pYO4/XEdAHHw64VewNNdHkeLTlLacNHfzN4OIOElZpnZRysoMPN\n+o3Zu8L8aXbkrfinfXJjoseZP/iMOTMnwLXXPi0xhTWwTH9R9wqkff+PqZpn\nQE++zexpAPK01Uix1CBoUr0tfNMJMP55lFLrgxINhoLQZzHpV1IYA0hBp939\nvpbFw5gluYjzTErp3UQkvLglW+lsK3PjAsHD4AgxUHTn5UyIQbZhGe4ad74u\neoB3\r\n=POyD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcTf7LZSm3Vdlf7wAfpRebNjnHtyrh8uSHOgX6fvRLOwIhAIWHQGAAECorP+b3/XluRwdT3xyfhjT7hpvvz2SpIOE4"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008171232_1597667538871_0.6633568706949755"},"_hasShrinkwrap":false},"0.0.0-alpha-202008171321":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008171321","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"3c86a3f0e43a2a6ba93b5d4409cc074ca2260b8e","_id":"symbol-bootstrap@0.0.0-alpha-202008171321","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-dXW/RXzZztc9vy7UHPKL3ghDIPc4vi18wKK7F/3xx9ULV41lUv+Muxlhyi73dpG5IxuUl1sUlfka/P1shqaiUQ==","shasum":"4fec17b84051d623a22e8f2f66d73c44179cee33","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008171321.tgz","fileCount":93,"unpackedSize":154922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOoRjCRA9TVsSAnZWagAAaqgP/RZSPj6+dinHBG7T8df+\nUXk5CfFX0hs/lCX7QnSaGvMm4+fWoVuEOuXYGe+S5a7/7pNtPZ8cYzvCyA6K\nPjoh9sk6y8n9J1GvGNLWgQIKZ7qKeryxizvSmkBEYRh1WllljBobjGZfkMIJ\nmSl/4dnd87DgmkpmNU9HhV/BY6hD+6/9J+BkowCgq/GtQd7MId/CZlvcRnIJ\nRr3K3mlBptkXaiZrnicYRCUSZd3bIfRiF5iFI/MfK+kJT1vRglM9Fjw7lj1+\nSlQeY2sWVpIZLqUp86Ya3OFdjFCoTvHo3GBwY72CexY0rInOCyxgupKOlpgw\nDyTWkvj5unONFBdWXQwrU+7G5Okzs4os9o3eTa2s7s2UjPiTxYN/Vb0gsA4H\nIVvbDhMHSHXdIOUSbGnM7hIMYrKXLmPEf/zXlcRwTJES3UCDuqF1r9Y5Eyft\nxICKW17XUkSnzmHz7++JgNJhJ3fxxEe944LVE76ZWhVFqJ5fQFFnKbn9xxNC\nnx6djjKLDfFkp5im6RN4dIXfKfcITYIldgBwP9CoCVRArotiJGic9vnZ6KhZ\nXIIqRGsjOtP9sufEasA0xMraIBVtszYsyhqQIIuJ/t73H9+K0DjxeBUoOO6b\nejz/n6w2+bNhQli9XnuBbHj9vRi2nnU5KrnI53+Tfuu7NCzzjvAv59ddpE/A\nyQtn\r\n=oY2G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsTmJYPy4U/l9romyspTdysIZV06DJxMUJV2cdaDqcjwIhAOGQk7whDB86nxXaltXO7ovch1D//KgbGjIKtxFTAPEr"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008171321_1597670498830_0.03415412269280527"},"_hasShrinkwrap":false},"0.0.0-alpha-202008171324":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008171324","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"b1534c9024fe741ce0ee5f391a7b245af6cc1070","_id":"symbol-bootstrap@0.0.0-alpha-202008171324","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-EF+EJIZwCyBPW94i4WueQMC9hJt0exmMOjv84RtJ8pT42WYKBs8hzG4IX9j2euVkhlb1Jwj8P2rxo1VB9PGJYA==","shasum":"961f65a02ce4a7b53a064de2f4a81571a816bb91","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008171324.tgz","fileCount":93,"unpackedSize":154931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOoUaCRA9TVsSAnZWagAAeBcQAIwhG7vKbv5c2KUsVsO6\nlR2ZcaK0QcNNjy9qR8OYwSk/cVTyoKXztOU6Vw338ohR73AVPq/z4Dy6F/0M\n08VGRFa3Vl3Xw1+t9elCN5BVWXYyaP4EUBZW9ZCITR7mx2lbjF3tJJTk1X06\ndb3QqKhFsXx9NQG90wRNY3twmLxBbBtdeb7Q8lVue1ZZaozoN8NNCP6IJ+lk\nbFvIgs7XpknX5MZuODXVLWLAYYlGd0BH9U0dIUK6Jif+Xs4Qe1tYCly3V4fV\n+wRh0EoiPaacHbVYj0Ww9KAqTlcXNs7uE2GKiAotVMe18yddEuvEPqgS+Fhx\nrRoxLGXl0ik0ofO4YivfnUBqwXT7OV+bPsz5IQ7qa3NwX+C/XKdzHzlNt8n3\nwQbPW5ov+mQrt2xy2shf2MoJVUf6rilRCiEUVMvFxr54cnrUJysnK5PDOxVp\npT+O0M3IG45vJv9ffqfiqdnYMIvxIlhbnAb8U3JX48WJMzzZdo1ytg+EGV0z\nVw9NhzL2xaW3cOrCaqDZsX2gRTu1Ur9NVSOgPmFOB0L+BRKbQq85EHdpPNY7\nkzpjXpxOR4/e0Yfnz2FCZzrAasHhHqC9WqB3ifVQcwIotz+m8zPtdH/5b66L\ngHqETOVEwq4r0L91C0J3a/CChX0bwjWJvMHMA3/Fbxz8RvU33EihEvBSd1EF\nAC1S\r\n=Fyuv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDpC0lHbjQb/kV1zvpMYjGn7XHAtsry5OpLFoPlz8/X8AiEAzAWp6Fn580TYjQKaSD4COEGAPetzxgUpAUlZymdUees="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008171324_1597670681688_0.7674989040579367"},"_hasShrinkwrap":false},"0.0.0-alpha-202008171336":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008171336","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"c0744ae20e1d453b707ef1d31b9a23a515d7740f","_id":"symbol-bootstrap@0.0.0-alpha-202008171336","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-w+hx0gaBRS++aR/bNdktRzZ5cnBEzlrnX10fwUD+87H2wrKbhz9j3UF9i0RXUx8QRZbcWY8WJDDcxdzqgl/YWg==","shasum":"0725e09f166994d59ad050010e2e079b5f4351a0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008171336.tgz","fileCount":93,"unpackedSize":155015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOofRCRA9TVsSAnZWagAAEJAP/1jo5JuSlq75XZa8ZqpH\npTzQm+YOADSURsuKJtYD7fzNqUiQ+MoH2D7ZCA9x0NwU7ZbLR8OapX839cfl\noJyx5FDEDkoF8JIAeMDcT+mxlp4t/ZL04Qql4bGLtciW+b2yJj0vFxc5MRCs\nnIK5HyP8umTQH0HJ1zl8b112fuZVPcF7bnkkLzMU/r0UuE7lwd4rn07aZuHz\nfM8OYJhC7+psien+HADtqjmEgWa1Kks5z6MRvZ+NGKMvi+JUIAayqqvymPq5\nz74f/UfldX/wqAz3NaPOpkB192tVN1+FFxyTSsg1v24j2wYQDvNtOJ9aH5Ca\nCBBrwpU7xjlw5NSSBBGiVLCAhQuivA8aL9a09N67fggij0sFhYzxJSggsujv\nKtyiLf/maJ94aZNJmrwTTqB5D4zTwnb4LpfRJfhN9KdRcUzbmWRRUbBl7lt3\nBrQ8yeihRAdm9cUhC1I51Ed3/3Crav5BvWOrKI4IQCU0+56evTLdDOLMHkhb\nveaU/q6Zx5AQq86Gl3XXOB98/KH8djoEViilRiWkMnoxL3XK+HJFD5tMvTzW\nX8vsbnmAUC72dthugUA3vupUwjCxnUcbHuP6kShAEnxqkikA3E3eTeSLK1ml\nQWMpz0WpPDwlYjC+v/UD+UFtdkH2fmLCIqWQG51XP4EKBgMV5o144DBdX1Ng\nDgP0\r\n=czx4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDk0n0bfcofsRL6fCowmEPvF9oPxRA3fAvBeUKip0eYsQIhAKxC1+bUPzTyVnQi1igN0wAgNgQV3DV/pYEzmMVhiL9e"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008171336_1597671376438_0.3366841998672263"},"_hasShrinkwrap":false},"0.0.0-alpha-202008171341":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008171341","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"06cc1c79cc9d6daf09c7dc60e8077f79cb4bf4ba","_id":"symbol-bootstrap@0.0.0-alpha-202008171341","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Fz2z6ZIJ39GnRUvg8coiMl5nhkj2wZHi3uHx5Znb7zDUtk0n0IFTbN9+ZHwDv06H1hyob48YBvBpjqG63+hBHg==","shasum":"11af091d61839d254ee07072e71052336b05ceb0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008171341.tgz","fileCount":93,"unpackedSize":155901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOokRCRA9TVsSAnZWagAAXtYQAKRmpjQ7oI98BWQaBKax\nwzvWNaWVKE8VSl5h0TGiJ8jbGt6HVmMa/7riKystVgXQEywAgsZVJzV6bV/w\nbwS8Q9CnixIviVidvw1OoqndDzFv3ZG7MDH6gkV32T0H87OhrpIFObWvRgdp\nA2Ng5u0AReEHvpuFcq0bwTOdRGi1zLmQ65J4PkqWP1Qe0j1xUX4ZelOoxiB1\nSHHtQZ/fpf2RrKBJf6cNAor4r6sbPOTlluq9W4o18MNGvcAG/VvXUZBkCmsD\nUsE+TRc92q0ywO2bu/NJMpHTuaR4nfyCpSjCco1eouDikPOabjMKn6KJ82c0\nyMhhGXw7t+H/27qhSjgua87PDwR/PHK+OCEpoHFFKQps5UkzqE+AvHHMR3tP\nWbsF5V1r3WnK0BNfVnKhPKt2KmuhIuk6yA00ngK9Mbuk5AtFq/Dj89mOmS6m\nDBUkQdpebySWRBh0epYZqkm8zYl2FZZ2eniGmHe+VSY8OGBmmJSJVucUPyEh\nRfykXylFOwEKvJESCmFipvQIx9MqUFNOLxUvrE+T/gctnAl+oGWg5wUK70Ie\nVmlC1TIMi6JlLr8/rLu2aA14uJ6XTLebugi6AfWC5R4y97CtssfsgTYcKz98\nPn6WKH+L4jMGqDHMfflJHUInsrIzNU2SL7D//rVaujuZxbxv6rlrpf+WGQ/L\n4O5v\r\n=rc7w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuhvN07Nu/xR+o7lzDLzQAT2uJvjKsFRA7r2/AR5Zv4QIhAKu6vAi1f2F3D18ubRlTzgCrvmGmmQufk08p4dbnkNop"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008171341_1597671697105_0.40091532804565766"},"_hasShrinkwrap":false},"0.0.0-alpha-202008171411":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008171411","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","handlebars":"^4.7.6","figlet":"^1.2.4","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"d53988eec801b8bf2b115c143f8d4b0c52549763","_id":"symbol-bootstrap@0.0.0-alpha-202008171411","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-gsm3UMqceAwQB4bGzaVp7VKoZgcvVvT+mM2DHLxLfPnYp1CBWO0ARIguk8bEVJr+dLLarjSHgo7NsbAQCEUkDQ==","shasum":"e22e7224797b5ee04b89d2dada2751965dbcbe4c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008171411.tgz","fileCount":93,"unpackedSize":154994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOpALCRA9TVsSAnZWagAA5kUQAIToR3J/kBHGdIasB2ht\ngFzDR/IiF0Z3epouLxHcK/JrvJjWrg8hD9eGH1AG17p5oVSO/QlFWxNNdFqW\nES38lK2MuzD4dq36YmRhw/OtDN+X15zSC3lTFgLVwGz26ViwN8AwjAWJWpLw\nbllQePKl8iDkYWXzkoE0QV6CAI1kvFSJX7OJVmTiDrhClqQoDSuv+Ok9OFQa\nfZ1zXA0kCpvfQDHC+aT2i2Lf8DANesbWGWAK2to6vn+m/AK5qc9kc3MQ39/E\n4/Z4T38JSGqlIAELBYyG5IC7xCz38CEayEhYTvX4ZsF+FAjNjv7jsDS42KY4\nryM2rQk097vlVQa3dPc3n3EVOdgYRc/5v0ZaZTyQ10llt2jwHDdvNi3sXYcb\nbfbWDGVzVC3+OQr1Ww3SzxVGANS3Yj5N/Oytxdy4OMJ8phunj6xD61331gRx\nWpI4MzTWR9VQZ8QFfv4+OFSFNtq6V1RT3wBf7qUKQ7oE2EwEb1AImbaB6hYG\nLP8VjgbRI6vFQ/5o0gHJOMOi6by7Saf2LFqmMBTlaBHocCVSLZSr3GJlv9aY\nkGMXpxO5kzRHKX0hr9RLEfkGZtXjxbiNL5Zrok3tYSmwK+7skrLfyTpU0oxv\ncFJbYMpAHgQ6Ov7D2ew46lXyS825tZFpsHGOveO4J2ETBELBK10CerhjtYcW\nOmM2\r\n=ap0k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD16NGhY/3VDsc4XmudZMYVI71LNCBulJCbQlfziHz+jAIhAObw+peLhNOJ1NZX3VZGTcQgs8W1cXaPSMV4dLqWyi5r"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008171411_1597673482943_0.17780058588039016"},"_hasShrinkwrap":false},"0.0.0-alpha-202008181632":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008181632","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"6893f410fc6bc70bf1f53b60eacf8acc2d665342","_id":"symbol-bootstrap@0.0.0-alpha-202008181632","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-/+bzOOfOep0bAzc8hb8lSyEwJnJyyuazz80sVkkHJKbg9w/GDeZU9fTWMZMua+oOXcZsREPRizMDu9NAP/YLAg==","shasum":"bc5e621138b6e8931392d98308a4f4420cf6a40e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008181632.tgz","fileCount":104,"unpackedSize":163611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPAKxCRA9TVsSAnZWagAA6wQQAJAQS4dwT1+1muAzQZEa\nsC2rJJuqyco8o5JL/iaAVULBdcRNCjlo6DqbYZGK4AqGTzQbr2ucc05PNWwj\nhEnCiSGt+258+BTfzE3eQZI1XITC+eo7ECD7RsbPBE6kenIc7wTyfvEtegL1\nP3HtUujMWOgeqDaWDhkxjHYtAQqP2aQ9kZsCzeCir8jo+RPKA/xDLGGS8s4o\ntqQxNEslKn+WvriUwLoR0HESqeBpJ+pYzdz5Hhijn10KUy5+t4uLTSpuD59Z\ngbdfuyy3R/T6IBBObPEYcfCO9sri1K5fgWrRkq1e2g0h6ciD/PWaf+kUvJx8\nKnYpbonHp0iAGwxIHjHcaGcl6siN2uhKF29eGZCbaGJfKrr58a+6dePwynq3\nJfkHObwDkNLBm2uCuu59xH771yzAHOo3YCcFWhqBPkVD4AvJ6kATzUhTvhCl\n3m6VeAXa+YvxqSEKD6HHrf3t7pAiIQoT8c8H9ESIG9J1df8Lcx1ik5uM/phJ\nMnOHi8JYGfcCwR/1rl6h9IyPbA+nSHi/VHC1p9jWrFr/ozvfGO+VZyIWKqkN\nUGGxkbCqo+oMeQ3KWVUE4Sk9ttJAs4hTBZJduP8floRWa/6TAGT/QqPQ2E2o\nPiI8/XQ6IKw7EnMTQsLVNMqRMVRx3zoVbz3Kugqv8v2X6AE39cNVoF/CZxRG\nQ9tT\r\n=sS4K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCe/NOJekJaJ/sn/Cy/2ZkeSJDHR7gjYZ96FjP0ZGBM2QIhANKaFoKENYaP4QTyFtcyh5NRRz7+IsYXoTFl0LvgWP6h"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008181632_1597768368750_0.6649690126171535"},"_hasShrinkwrap":false},"0.0.0-alpha-202008181637":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008181637","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"f073a01b7ebe074516eab8fea0e5ee3f23cda886","_id":"symbol-bootstrap@0.0.0-alpha-202008181637","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-ClNZ8q6nncGZxYnJS9f259tTzoRaLaFnnynCzIQTPfQzcBS7h16Q9uxOwBAQfOEHmoOx3Z42IRDNGNIYAZtnsg==","shasum":"08e283333c716c8b245e0834111489176b69c211","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008181637.tgz","fileCount":104,"unpackedSize":163611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPAPCCRA9TVsSAnZWagAANR8QAJafbDqOrblvKlm28PmU\nGbVXubX9TUW0w+jRYgObQitAi/8nFtR40ZsiJaxA5oozINL2dJOFdo3vkYf7\n4h+jevTirIIX/711a0fQCnEi1Wf59nbeGTWzb14Xykg5es6AmCbsAnJ2A2tg\nOuAlfnrTE1Bmfv/8NubXU8h/56fsrFXueS3uXblmPBYe22fFGSLKaFWE+FGt\nZ/Uf+XdKqYNVrRxhDS7gKwJhANRZbujqa25vpTTTQjQB4dCs7cfEy93iMQya\nc8aL6rRXioeJ4OJhM8dhFIhLSORoiOyz8oXAXVdukR5P7l3eW1PQ9ogWJdV8\nX5P0XbDydYQ5ZgxVavoi/wes064LahqFtQ0xsjCoBie01TjL7eRD/qRtV/5V\nelEA9Wn195zNATeuT0+pVq9CyMy1tjEoDB4XYBpp1eUWW4IAi8BuXobDu/JL\nKJGR+k+A9GmC1FrXKXnCyun8kb0KvPIOwuKic0k6XXg8A2sKLQBReZCyeyuK\nUUCR8+LK1nwsHSLfglgs+Gw7qhfcElGze8dttKNU+JZhyJgOgYmPPboOggrS\nY/C+MpfAcb0s+r9/mtjBGC2KymnBJuPo8blFmslM3NzBA1psLbFqDj7ApKpJ\nA7LVGbDXde5/5j3QBo8vRNFn1MSe3VPd1dtwUxR7FKt9eT5VZjsdWXgl/Zxr\ngEFM\r\n=9IGr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOzM2e/ryKDTO97DeMzdAhVBXrLETzasN3stby/y+HfAIgahPd6zZByGTIq83+r+3Ri/++c6obkPo4ZrPxBvTq/gI="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008181637_1597768642304_0.4999898585395677"},"_hasShrinkwrap":false},"0.0.0-alpha-202008181704":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008181704","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"f073a01b7ebe074516eab8fea0e5ee3f23cda886","_id":"symbol-bootstrap@0.0.0-alpha-202008181704","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-zUAHVnHdjJktACvgpeca7SwIOAmQ6dIH7iY0gsZgxi4hm+YnUQlM1dm1JEIPIoiS0s595icaXRzBOBgAzyzI/w==","shasum":"48f2a2dce2417b5522e1bc446209d40894e4fc21","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008181704.tgz","fileCount":104,"unpackedSize":163611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPApCCRA9TVsSAnZWagAAnxAP/1Uvx1bsGUwGv8Uwdgbz\nCKLKulZaKXPvnkSQpdNBnyF0J6azZCPiZqYDZrAuqAWSpW09406tOTW3sstb\nRS0WyPUtAy6QCYB+pr9VD+G1543CWbn1IZB4y57BNMVl0VnAou38Us/Tn1Fh\n1h70QJtzrsPePTzM85ZaMesn11c1gm/rO/VDuF/m1n9pYHS47Bk6fMrk0WMx\n8Ox48ryEQm/Ip0r/CGXeyzy1B8xI3vGSVuPWGwcZAXasFK2GNH5k3Id+Hwo5\no6eSZqVcY628BKXG3a3kYVOUMc2T4xPGWRWs4JaHGDQwa4grjX503KNV9Wu/\nQqR8e0COmRy1YdmH5Je/mmg9wWru8E4XMSihT4ibp3XoJcgVX2xVHdDHQmMM\nGPmG3D6D8zxX5B8Jdn8FylOAa7dlxVrmblo+Ayl7AMzIR7QqdWYyW0bW0xHz\nkSZGL29scLYbBBaVgshQMRjh2jJ6kNDLPM8etY74pqCW6KUEH0RTz0gkJWhL\nShfD36XBazYGrgy9RLOfEGg7vL7NeLKo2lhRVCuQy6McXiwr9yZQziuyqQJx\n9EYs55NQHsCckieU2eiZ/pP6i+1Gqe6UByWwsZGOKkHd8UAdUG2iDXdmUBkn\nuGrBbWcsrCvEAgypWhdpZ+yZRckIwZrPq2545wzmNkTReF+AbKBx3GinAspl\neUT7\r\n=qf5/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCo4IlGt0lzmELmXAXADKP23cCvy196PXeY+have5sOKQIgSoZyyalyJoQwSPj1LIIuAK6uf18rQC+aez+G6Ajawh8="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008181704_1597770306204_0.6648427573928064"},"_hasShrinkwrap":false},"0.0.0-alpha-202008181810":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008181810","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"635a4d802036f69a361ea64fcc3f14ac194f6777","_id":"symbol-bootstrap@0.0.0-alpha-202008181810","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Hww03Ll//a1mFdTPMA2wen929jfkxp/v5c8BfYLGXxlEWpxvrE0e62ebthR4wdjx99z0f6JdHUWsUC8mIlAoeA==","shasum":"fae43486df2b6931ec40f337e0faca8f07d60bae","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008181810.tgz","fileCount":104,"unpackedSize":163611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPBmUCRA9TVsSAnZWagAAdQQP/1J2M6caD8m9mrKfOtCo\ncpZeV78SP4q2pi3LDU39OdraJQt0VkkBwSCEF0P02MUKHfreJiAHqnIJuHiJ\ne/ORIByXTm4BUKmboJLQDmuajBPat5nZeowFfi0r4XDz5WMnSz0D5YAsVbyR\ndhtQLN0hYEcxU7KVUBNwVjBIYdj2K068YLhrulFpj5gEPvMJUgULnbrRyTKv\n1ku7kPbhm+QQqFZdOP1cKVXA53AhA97UFqK2Pnx6BEu9OXLa72l7FJ3jBDyS\nIRulyDWJRSQR2WU0auSM3Q/nmcNxXRZuluRuAJTNSMBzwwIx73XMVyxlp7gy\nPV7SuqkTGpAdjDG9ye8GF00obvPTfoGpIZ0X3wGqx/DualQlZttvXexijGs0\nnjL6mbPZhsOF4GxBwz7Dfl3urIZZ+YEYhD5iXZ/r/8keJwtCKuDXgxjhfnbH\nqpveHbnUe74jmuaFEcUVyrNqF4Z4X+fMtOezTmTzgJVHzXFRBgjKe/6K38du\nF34F9kpTwW+ZT1CfS/t4aEMT11ztTTi3ngJWNgP8EijmYP+wXSq58eJFjOqD\niacReZo10iHstqwR7KcWbx3x4K9aCOeArM/qhUAgLq6HtJIwxlhktXYVUOgu\ns/yxbda885GGwU/XVj2JZtXL8f/Thp/+sy9fYrSXH9Sw2AkVxtZh/hozCatB\nu2TV\r\n=WqFN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICf6AFr9Y+8fyDA+orv3e1sFAaWCRZOEYCxAw6MIMv7qAiEA2mobLtivOlGGKjZeGH1AcDMT1Ks7Ac8/MU9cFOBZePo="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008181810_1597774228008_0.22130857825909822"},"_hasShrinkwrap":false},"0.0.0-alpha-202008181821":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008181821","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/figlet":"^1.2.0","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"MIT","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"635a4d802036f69a361ea64fcc3f14ac194f6777","_id":"symbol-bootstrap@0.0.0-alpha-202008181821","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Jyo9NGSQIDeij7FY8cuEIST76/bJhDSVjUzTV1EceHt2vcVxmszyzUMEyTVFKndEr4S+J4SCLejDGhRIP3AUag==","shasum":"4881e79b83d1aa9fc7da14528aad07fb5661aebe","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008181821.tgz","fileCount":104,"unpackedSize":163611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPBxFCRA9TVsSAnZWagAA270P/0hmLGwcZgAaDcjeWS+S\nKPfd/3fbrO5vKs78GJWDEsOBf9xAggVwHGs04lnR4SXFaWzGT0tbxZyvOvES\nhJqTHfk7iR8YmyWG/Q7dR/BcduYJMgxhloNN9voxMLFtowAXO8b7dj8fg/ha\nuVxMxxL5wIOapdPhrjySJbqbcSRomlqW5zWinhBcEgmLX+Aj0Z/exuBuQKZj\n0wMpIekpMRu9e0DOAxiKrJlbGRP4kfcZvGhfmRypCF+zNPjbKy0Yux4Jwbdc\n35L8yNYnKTn86wuuWg87GHNn9dfN1OznuiomdQJAy9AD4t+1DVNFiYZqNjGR\nM7mlCwHxrLDE/3BIrZwSV4GdTkqPHmSCBa5MtgD3eTqh33ld6PB7VFcGsg68\no8NHJ3M/7aWTcltrgriAlYDGlK+ltkQQdGPxTGZVnVNZCqshL8bOKuL64PUw\nqfiZO+rYaXmSgda/ETfwkqayxjMT+Wz+eAwPRZsCwgn1xYG08je5+XpVzf/k\neVpkC521eC78r3WP+8fYrobiVwjnGezHUk/CC0kdcw0np94xWFKZ2426V5Lq\nFHV/2knSQoenXjF9EGck5TWvnInsY7uJL4HsgHS81W+O6VtUT71QuN1/tXbB\nczAUqdVHHEwdq0j3Pb8ck1SCw9q6hbK4e7CYbQ1C1QPclDdgM/f4cC9fdhQ+\nqkDp\r\n=juC5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAcpumvGziUqy1AIIAS6ULivOIZR0TgG42mxr7r9XPJCAiA3x4e/8vi8tdl8VJVtUoGIjVBsqwjM70kKLkrojO6V0Q=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008181821_1597774916654_0.7539651707802919"},"_hasShrinkwrap":false},"0.0.0-alpha-202008181936":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008181936","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs/$(npm run version --silent)\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"bf9c185c33bb2e26b994f8c04287afce48bde5cf","_id":"symbol-bootstrap@0.0.0-alpha-202008181936","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-EAcSsMNqr2k9o2BaCXDImR0wZjQf3ZA1haOV3RuhIOYupgpuk2y5vvuPsUuLizDPs7na+RvGGzvVJY7/mBxYfQ==","shasum":"d7b7d4fdc542aadb50da64eaea84825a9fa60013","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008181936.tgz","fileCount":106,"unpackedSize":176992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPC3YCRA9TVsSAnZWagAA9FMP/AmAjVY1MDXHGtvTqP0i\nYeE6M86hhsTccmPgfI2moiZiORC6GBdwj+wR6nMAiCBp4aZI+c3HGLTh57x2\n7qiGByuSCfDEp5jsGKvyrfKKEujWQU4u/wug/4ffNQvvVExcwHT8LPYLQ8CG\ncsQPbX2JpTslLBu5uTNWeqpJR7/AV7TcfP10Wwt3lPbr2WlgGsEA4NMbBVnu\n3Lq8nSDgC8kd64xTA0Eaw5R3tPTccc+12D3rSFRB5ajtlrJPSDDbmsRZ4aPY\nMmDBAN3fnudobun15erCNxx6KBds0sTDvAwYeV4Fwy2/EAOVU6/11tzJSrFa\nxhhzXS4OCEQYknkVbzL5QWSc+zdw7r3CgnstBuRccTsvAF+DN+Eq39PiyrNn\nfs27KqHTIYR8LqwDek1t2+zxfv6x8axcJaTwzTOtHm+jbk9ViLEpac5zJiSM\n4eoBUfytmiZl9dTbMQHGrtgVxMlW/85akqLsjbE8sPeIT+C62syxoIlKDd6R\nP+7CWG/UDOJqs/1Pf12KHIrHjQzsy6CdyptSFLx7NiteLAUvehJEOYODN1EO\nC17tQpO4wh+W20XpbqC2L7MT+m+JoGqLAk3XnnlmltT4EqoPhaSteJz5exhy\nRzxsbWJ2FdDpHwzAygbjkbG2BGhgVny0F0l++IgrUy04ZLjVnhdo+W1bRuh8\nsOqE\r\n=dJd/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4AWfrWb4kS4rHMXPiFyrDed93vH/GHTLUBGHsiHbtPQIgB7dlpDfJgkAA5uW9YNzCZuFLBhsCpX0oz6H578tW+c8="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008181936_1597779415993_0.5034967902855043"},"_hasShrinkwrap":false},"0.0.0-alpha-202008182200":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008182200","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g"},"types":"lib/index.d.ts","gitHead":"5036c7f5df9682ec9a8677baab64f1b89d676d81","_id":"symbol-bootstrap@0.0.0-alpha-202008182200","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-ZUjO5GzETzU05vFvA/15/1T4jIb0wScZ0aaQHsp9Oq3aQKGT0Li5xuxVQU4aNCu2oD1if+6GsuTnAaehkELg7Q==","shasum":"72bc452aac422e3203497cd72c333ee69b4a184b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008182200.tgz","fileCount":106,"unpackedSize":178141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPE99CRA9TVsSAnZWagAALwUP/2PG2dphMpO9A2woZuGD\njumSlItT/W26QMGa8fyShvj5LUfSsyyJWYIsx1o8dsb86Np/tWWVva1D32Fb\nZpkjJUMu7r41kAicZFVQftRkD5ZSlMctNYlFM1h0LTjZzAGoWh4GcXgz9e0o\nXFnskvfaSHSdchmWKZTx6sT3zO1b2AJdzL2QGM+SuDatkEki/TSSz77avbb5\n3nmVQopLnnuknXJhKjf+es3Zd/EPvC5WLpYbFgFjOPU5pMtGLxF2ygn7pTSr\nZG6PTBMXpZX8UnBa9jIVaOULJXXm40ioxqL46SwlV2cISwDz+emkJVQmX6QV\nR2wkDiWgw43RtCnYaxMnJXj4rb1sb3u06fty4oNDXh33F5sTVdo2/MSJ2MUW\naC29ZB8qcZKzOPbcdYBzy8l8IISKQBVDPxKudBTNkMXXvuh0WQTue2x9R+T2\nsXVahf7r80cVC3qIQKgVWR9oczqH72OVf4g1QXuctDHq+qhqglMJZ0onk86o\nEPpMie4gzJbD3bXU9hIZCoiel6q9mRlaa+lWdKiK36bErbYni+dRH/sXvoPs\nbmLcMIIIDaID3VxScJG/smLKWVh0VYi6MKq0pN5YDC0f4VjYD28ks+P/lU9w\nkane4b1dJ6HO5OBuXSSTjXObbI0wa3IIke0zeEuK2tGOC+tgbraBOs/IXBOJ\nQ4Pj\r\n=5DsI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPb5vtwZOCClsIvAvrNjqJVBypKCan0hs5/9EgiXUiiAiEAty9lR+Ga/J5ZduQguqM+kzrIOg9j0BOEUf5Sl2rwFcA="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008182200_1597788028610_0.7469372186946994"},"_hasShrinkwrap":false},"0.0.0-alpha-202008210123":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008210123","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"0.20.6","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5036c7f5df9682ec9a8677baab64f1b89d676d81","_id":"symbol-bootstrap@0.0.0-alpha-202008210123","_nodeVersion":"12.16.3","_npmVersion":"6.14.7","dist":{"integrity":"sha512-6C96Tk6RzZU1lqNDHuxh9vdpbZpR+xEHogla7Br6Si/O82UNYlcdl1S8b2OyaBme5ti9qmx38wI8si+deYNdPQ==","shasum":"1f2a148529dd04e3213691ad4e718b61261a7dcd","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008210123.tgz","fileCount":106,"unpackedSize":180358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP0xWCRA9TVsSAnZWagAAMQkP/j5FNw7jC8Q+xQtC7cJH\nGESp4iAbgJIM97lo35ZIkORl5fkDq0ZWFBUkY/m/udxzlR7MJXc2/L7fF2kj\nr8GafdWs9LIiCVtq/XUlmZTOshapepDtlZHVMUkSJrehQq3zu0YizlowSq7P\ncZWOL6w5zuOde/+GrHjh6m3xrhidbaElrpt1MnLeEdMAJsHPvquiEEo0Gi9c\nGfTgsl2h4zECHcxxCzYqJctvksP9rGHGeh3wubBiMHZ68IyE1TbiQPWKRtOc\nAHaIvXL4al4Di4kwDKzf092hjLe/2kj6ZtPAlzbk7GI6eUwAA0EHOsnEUiR1\npjYkghYBpGSWpK7LYcIp7jdvdzArwhfbDGRB+Flqw0shnHC6x+aNPvdBOlCS\nGx3VEw3GHC2wiLYLN6VJegoJQJ84pkhHI4SEzxL39NRHBTU+iWLE7vkRifO8\ndLBI8+Irf0gsa+Tmp1KrQFYculSFy/yg2yc7122Dgut8um5uq+wDLuRigS0B\nNH/eLjRQHsaVejhO3A2AKWFI47Xz6lwsryvOsl9KVNDVL/Y1aX8NbVBLaNvO\n1vZMtwUJDExPkYjS8HBwAFRPrmJ7H/XOMWAXQi9ktAJe8oRNeCnC3uYGbsZy\nCfBicFvNduLmo//RuNpJflrSVYygRoS3FV/0B4z6GrluoWoLHsH315AIwsLx\nyLRj\r\n=3dL4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFD5zgeGC569T1IMswTJONgALQNw07oKO5Q6SBv9DkCzAiEAhMNyltYNjHLUWSOS5FYO/zHKKWjHtXuZcUfEgaOSwuI="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008210123_1597983829612_0.9376423369961664"},"_hasShrinkwrap":false},"0.0.0-alpha-202008211211":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008211211","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f7f79707cde5f508ce527dd344fb94a70994d5fe","_id":"symbol-bootstrap@0.0.0-alpha-202008211211","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-pJWbeaXY3YZ6YLjQsjOlkn7PKh1+0R+XUZkYtOKUAEdFq1rXNuypdGvPoiCOfRF8qS8MXRfhKfLgDIEPUfl+PQ==","shasum":"0337d87c94be4e62697886acbf4c304df9d2830d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008211211.tgz","fileCount":108,"unpackedSize":182106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP7oMCRA9TVsSAnZWagAAgKMP/1HyWSAOq6tXZpxilltC\nTD77ZYKxjBOGKVHpZZlIDavcJGQpihNQQmwNlhlptUZhbRCKHDZVDdjKInoM\neKH6NJ7edTwcfZTZbiHSnLhL7nmnZBGKCsGQ1i2Uw1WaitTGywVrKmyNuL6i\nw48CF7SUKYJcHWnV0U2f4HvUsJDG9oPfAfb0DrkMLRX+gBCFTbW6nSoWARKb\n+wKJABCJ6tJiQGlxrFR1HKAlDxKJsfuUvwgE6XFOCUemSvAEfSUJxjwsLH90\nVQjX77J5OhU4ay8lqS8TIExIIUqen0NZVm7j2XDCbfBbx2Gv+JTONS8MZgmd\nfV5Q6RX3BKddgGI3oiCoOqNx45Vu2y8Jl/xfcI2Wy5yGP0BAOWcXzJH+xg/4\nNTpUZYV4v8Od+TipJFTVbHul4bLijIeXbHjh6QrHkrDQqg+SjzyGnV9G3SEC\nbEOrTocibzg8gOuvZKDhWQMs+VpXkzq5ERH06lI9FiF9Zn0YkHGs5YQvke6R\nFfBthnG/LAYKEl4e5nbob6tJURo3nidUvFyl4Nid1k/dp7ksI4z+wyiBrGFC\nVZUw2x/MqNZD4klJLo8GZK61JZFIv1bBAHEmybpp7OavxUOLctC82+CRTz7X\nK7px3aX/PgbNWzWFrRTrYbYt4HX9UcCYbI9NQXuGmGeX+qpl0MSv2GUfH8vu\nfEto\r\n=beag\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEneqlimD0qf6/QxifI7qgVnXpnMURp2C6FNOLEXSDYNAiBj/e131ql2apvYht+TGCovBH/HFrkkuepnXjGSurzKjQ=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008211211_1598011915974_0.42284343757860987"},"_hasShrinkwrap":false},"0.0.0-alpha-202008211054":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008211054","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f7f79707cde5f508ce527dd344fb94a70994d5fe","_id":"symbol-bootstrap@0.0.0-alpha-202008211054","_nodeVersion":"12.16.3","_npmVersion":"6.14.7","dist":{"integrity":"sha512-NIex9TOWgZ/liN1r1v6Z0uG6FprXogjcEBnl3s85+w0oFy0py6kpmkQLhQ/HyEaj0tDFYY0D20Kb5CqW8d0DnA==","shasum":"f9652c2f566cc76d253f8554b2b7dc4d26bd370b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008211054.tgz","fileCount":108,"unpackedSize":184509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP9IgCRA9TVsSAnZWagAAENkP/2zpYtOqNcwkswFuCbnh\nD++iBGknPCjz/LBEti2dN61vIuOPCZD6fH39U+zUpbymTR+NZMNbtU4ergpO\n++TwmmgUpGAIXhRpE2BXzl+uWuvXpaBk+iPG4f5RhtgY++6F+pKnseWO55cO\nInrFtBwu1Yy9tPRnGNi+GA/7Q7ElIsDeyK0pjttA8gpfMSX+ncDVNr6yaxK8\nvvwMdbE/2H4M7VhClBxP1oVDZ7XHmJAwg7+lXbov4pe39xepagVaQzUjYBcL\ndOLzB9XOFtok+0UiPfiIyxFoHLBUNxpiK+Gs5s+9zQrRc4870WhYZJfz4t69\nIZMnYidc8TZSmdHgQIZLviA1xH6gaEjFhMFnJy+5Fru/ZkA2d5nxf1r0xrU+\nostgYwCWb5pcxQ7Zi+BFZ1vLo8ffJxxgkHpakXRdYa+ozfWyOYWyfexD1PXO\n+/qdV27atdgrp/GZ1Bee+Ri0g40YqeEnkUnW5qTrN84i2hv9S8qmGui4eJtF\n1sslzE7lqqa3CsXYVj6KtW+zrV+VQ7sV7WzfMdLTr1bonVpW6HbUhYnbosJW\nVcZQUhPwfwUvod1cLbigQy2iILx9TuDViG+zcBeCiQ/MkrFqVss7X6Wp6JLs\nWq0MDjqlby661ng19hfpExVME9WC53oNSzdmQe0EqP3+/8MCQeDjMmb5tIxe\ngp2Y\r\n=QLp2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0hmsnHiWBO76ODWouI6NTw/AVh0I7N6dkbJmhxMasZAIgG7sNTXt7pDSjxQ/zVN2wNhQ449gdEwcAk68MGDxEch8="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008211054_1598018079880_0.07075583999462842"},"_hasShrinkwrap":false},"0.0.0-alpha-202008211310":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008211310","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"52f68d52103669fe70e5e1f16f3a11b441a081ef","_id":"symbol-bootstrap@0.0.0-alpha-202008211310","_nodeVersion":"12.16.3","_npmVersion":"6.14.7","dist":{"integrity":"sha512-SUv7LJ7WtZEpKVLcOMwdweTJgoOpLAdcpJHYcgfk92SZsGVndQir9VaBKfOjDXbWT1ryhS290Fpu0RmCkgmaqw==","shasum":"9c68b0297fe96fe227c96035f3a0d1e2d9cb7410","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008211310.tgz","fileCount":108,"unpackedSize":187275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP/INCRA9TVsSAnZWagAAmEAP/0njxyRD+0Zvxkxk//bi\nnb0r69T+xG7PqBmcubx9AK1TsRLWZp/LoHwcos/USzm1Pb0UHhPHobLST0+c\nz5eB1hycUcbMaKx75TdeX38nj/luozBLe/xVE//R3IldVoBipUP7baHyEo6V\nx4mizo9zP8Wc/ag8z6oBstU7PYWQwGEW7NFI0+y7by6ZcEIP7wMOnYzIT34a\nITX/vdn69yl9PcIX3M+RqckplswcAFQutGae3nDSj4T/P6xPkUkRYV/9rI7z\nCVxo4pVRmX1s0GwupXOWaskEjdRH144XDLsAphZP3LJ7dGuzHh1l5IQYbEPs\n69i1p8mPB8MYTwbF1VMcdxv9a5guv3GfxYNvzg/TpEZn6Hvh4kgrLiU2U7H8\nUtZfRZq2PV6ofXkft7Zi+GoOweZkDKTQiQoXArIPskEgqB342x8jV9TnLH4X\nOFfehO49DsPb+iDtNKOUPCBfafV8m0BANyWs8QCtrBre/NVr0ElWaZbNqlZe\nX0cN7QLNPMsFceKFHXgZ7wedqP3E/c4CEH5dOwTFj6+ceXXtsrWrhQiHs8Ep\nxp1uotn0SnE8yTeyWFvaO7xJMuRtOwzCKuxpk674WzNgoISsJwspgeqnrD5Q\n9e86n2hSTuFUM65l+lLK7GpvuW+FxuwXpz3olGnZylVoZ0M7Q1VrQO2TvZ5p\n0CDE\r\n=MJ+u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3KhxeBcq5vx4pjA1Tb830JBXq4hnDVKD/Z9yW+s7QGAiBt9aWrbcowNRAxFKvkk56d9OcHz8v5AjbBprmJRdhrsw=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008211310_1598026252571_0.570698822151269"},"_hasShrinkwrap":false},"0.0.0-alpha-202008211310-alpha-202008211617":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008211310-alpha-202008211617","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a0e2852dc089ba83808231a4606334aba2bb9024","_id":"symbol-bootstrap@0.0.0-alpha-202008211310-alpha-202008211617","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-zOXrYSMEAdko9DGgSGgtD4SKcj0/0zRJJFsqf2s336uTlF7M28vQ4/HaYIrm9QdrgTzdBefIlzVR1HhFq7XKQQ==","shasum":"289971bfb1d455920fbb12e495cd2c1ca410332d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008211310-alpha-202008211617.tgz","fileCount":108,"unpackedSize":187446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP/OUCRA9TVsSAnZWagAAKAMP/3pnm7Pf0W1wv4RD9Doo\nuQ7/jMr28dyR/Glp8/DQP7UNHuirq1/xq1Mg2g0aQitBS/wUPZK4Ot+z4/uN\n2xN3cGxwNDE4SuUt2m3lbf7bGatz73lrjzeVvPMfHTBuNRHCkTcGWm6jVrK+\nYWCylKzbGCLlIkxU/CsyX+eFSD9We+QZpev8xZLYRPMTmtWAEWoblnB6SVf1\nEAtnMuvN1iS5JB1eeCGZocqNOElKA07CmC1jlYDs4aywny5Dn7wMZYAZEhdx\n9mvRznsynxgZ1l2yds5L5x03cqdKyFxNw2xMyrbAMD9YwoL8GbmmVFRXjbXM\n2MqsgZxvUyUUA5oBWukppk+vmj3efRDKvp45dHqvdSBQNWCmo8p65l9b+Rvb\nIT5Jkq+qHvoqTxxJGIp16k9UBR2zbDxFBg7x4UUexy92dZfFqs95L7OD9m3w\ntg6NrVwXsdSC1KMp85EUsnCftvFUlRjsLotqtTKIO5HlbQDsb7gfXl7NNesh\nq//PqdqEOWYrAdjyMOnBQtZ++Q6rXEY6yhmSg1AIOFUGN62fGJsfQEIBON0U\nsgolRy3rSVPF/6FWfus+M5jqlgPn5I0rNf1wSC9rY+Yz0Edi/BDZh9MF6xei\nnqn9UpRXQO5U6QtB1Jo5FZreuDbrqR5pC3hvODRqTSTAE0oUAaatMKQAFdJL\nYUJc\r\n=s5xc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGKIOuxToKX5sCRQ1moUZI0+uL2OJVc9xwP0KHeFaJkMAiBSC5OmwZJ69rosuGq2shx2Hv7uoi5Rk81zE5h39hvw+Q=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008211310-alpha-202008211617_1598026644144_0.7018383572768307"},"_hasShrinkwrap":false},"0.0.0-alpha-202008232334":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008232334","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b76b646b0a638bf6a497f613a66aecdcac3ba4c2","_id":"symbol-bootstrap@0.0.0-alpha-202008232334","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-zk5G5OBlktNbqVUp119lmCaYif5ImMBRFQTS0ihatUGMjDAxAwGVzSkz8Nppeh1wvytYfFNerndYzwBXsrCC8g==","shasum":"b33158be72c20cfa7fa712f0f076b9ddd5926319","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008232334.tgz","fileCount":110,"unpackedSize":193202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQv0jCRA9TVsSAnZWagAAnY8P/0DUeJAw40FqREbu0Gqz\nQ9FuHunGoz7HNmiMjcKb4CB6cB1iWPCkuOpbUsDuREUWo523XlDgJRuA6HGy\nPUsZcze1VJgkyyjg21LliDc4aS7sNZU8QJQvBWIts1C/0+G5ZX2/FE+mf6r+\nuWksSXSTMfAM8M9Pn2frRSef26YWORRSO73ZqB98Giq0FnyHtzASMywZZUC6\nviYBC/2HXDuZC0gCAvVWHNLDx0WB1Ip4szvB0UjBmesgsFgJWdA/P9X2+FSS\n7xYH7eTxABQlWHPyHPgRI3u796ufYPIyJs7nl7Q0zs/ccou5avCkR7OIRm1R\n5B9uHNg4IyMX4b8W1xNgkjDcp1hqFIQYchU97NpHxGJrgazavDvpk7AKvM+l\n99DrvdXopcVVhFwX4Sy1HucPB2+S8vvQ5T5yJW9VqVw1LC6arKGkZ6I6edBN\nVkAN6+Fgp/WnSdn5Z51MFzOdXYCKDGSsdD1pa6sSUC5bPZYR6JlM52kBtc7P\nCxpiOfGnKA0jhRx+gHohhwMefhSw+vdS8Y6zU4VRfnNGW8dBM2N6pBStl1Xh\noXX2w1LDFBFlfMkSGgm7816MFyaB+yiM0BUR5tDjuEn7h+pEAibNLm2xmWEj\nv7Lacx+VeFA2LT1H+r4X2CWyczWRs7zGsxU7PeK8PdWDoxAdRXakGVHTY5K7\nP7md\r\n=tSnK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4zqHyCumVx1ZRaMcgPGe0Y5rBZaTMWWxZ/BEc+SAanAiEA4gMH1DHrakLMUhEvkRVRBrI2o/hPrzr6g6vySOgv1ek="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008232334_1598225698617_0.056560765669877444"},"_hasShrinkwrap":false},"0.0.0-alpha-202008240134":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008240134","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a2d8b8aed317d705f1e92c1887df3c53a24f4a95","_id":"symbol-bootstrap@0.0.0-alpha-202008240134","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-65YoCaGQwU9KNbem1LkHMBOaE7gGp58rtBntFaLqLZ/3uy5mt3dQpS+1yj1QsKtfuE/Hvbxwua5b74sQIxYSSQ==","shasum":"40e74eb174953c58ae4f71ff2b255f1896d67ff5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008240134.tgz","fileCount":110,"unpackedSize":193308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQxlKCRA9TVsSAnZWagAA54UP/30gxQVD2T/On80H1sCa\nvBiuSq5tubVWAqhrUSe0vfPBVAPdOn8Xq3i9WcYh59Kw8VUivJCFYoLOz1Cj\nRJ3jtmIS6Y5AKd8dvAq6Ad9B0Ds3UWU5TnOsLfGq6pS3rvqY4PJIkmn+htaH\nNf86W/6Pm2opf4cn6MTgHMcebcF27//kMzRdL4DUryXo+YtCLKAZ1wI+Ipuz\ntM93FiS16xNHPDFA1jibu5qbxIXyMASnQ06hq12vZ03rB9Ws5SIePc5OPsQ1\nr7I/Z/Gk61OhpEOyQpDHC3/Djjs/luJCyIZTrDW/N8Z2umT3518ZbVmEGkyy\nefzDGtQ0p/s7TJtdFsOqLl+TR5aq5X192i5nJKCP08UUCbPe2PwkOSnv4+ZT\nvxzu01xU4gfrZOd6jJx76+yck73MW0b6wJ9b21wiHMxMGSuQkEKROKSlVyHT\nfB3Ds3aS9LQe+P2QoscsCkahM1hB8SuOk45654NCegXW6pFVKv/CQMASZPAx\nRR5louIU6CL7VXk/SzSt2kVVgJfCL4VYqNoJL0IPpVOQmL6Ku4q9IGEceUxL\nmfE2vtQRv24gmFiR6l+CEPhjJDOpmtXRpzImTmYRMHS/Rfa7ZkaYQFUqm4xu\nKQUZV3iWn/0mmDbti+wJ1hyatQGwYqKdSgluJGxjfbnEXAo27+y/hfOPGjyP\nXyjd\r\n=o04Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4rQ/tpjz2LG9uOzCNbt52v5joftBzl4vCufp4v1GCyQIhAPVk0+XpCBHbh8rlpbB1Hc6CBrMR/rWVe9v1W3JfZrmY"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008240134_1598232906218_0.42348066344249324"},"_hasShrinkwrap":false},"0.0.0-alpha-202008261328":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202008261328","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f3cbd27e0e7ec1c5c44c7b87a6c0694f74de87e9","_id":"symbol-bootstrap@0.0.0-alpha-202008261328","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Gi7vRebB/ChMjIQrsS/1XPLI+Y+KlRPbBECDRa6Ovoqun8pnvDbLNrX9jA00gNX3nN+gOmXjZK3KleRofj4PMg==","shasum":"dbb63abd2725f052d57a687f830433e1ac0e2422","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202008261328.tgz","fileCount":110,"unpackedSize":193308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRmN8CRA9TVsSAnZWagAA/z4P/2rMidlmwlkv6GX8UlaX\n0ijr6C+aSu/mpELmrX79eBZ1fRBeQJuTdQ9Rq5Ycnj/9vqZsQYqEm+UGkphT\nD5HQwIInyak/1Wwc6S4Bvy74vIeJYmmU+qeUBAjSw5+0Jepwx0EqMHjdLQbq\nlT/apFb7yocIA0p/4nnljWlCdY9tF9I5f/6Y1ItgBBqUXQC3Ya7gaYLDrQ4u\nrokvUTAPFvPVelKik2CkP+zg9fKrarWyT2WcEZdu9g25dxDtzksmGGcwrJnU\nCS5K2BGLBmFuMiazttgyIIZqeICNk74T6H1Ucj3F1N5x762cFN6KUeYooMIC\ntub59xpJozaAW9DtvCpGxlBntw4kE0SCHJLiSzQ224O+jOHeozOfwcUKCUoi\n7Kjr6BwQ6E7JYVSVocjJ8QTiwNO3X4EX22FNoBog4Y0rVEExEf9r5R47ax97\nwcvkgWaw6mFfFKCb0SHB+gNWbT7Ec84F1CbrtGgS/LqAXnqtNi9fvTbjfE4g\njeqAy+HTvM+XdpbVUHJBChnAy7k7WMt9XtrsCszCmbgARYs6bhB+T2tXzqiR\nTTkDF0OzobvZhZyQoVxpTcbj0vyQK47vwgPbS6uiTxhBTdL9zRnTyEy1lC1i\n2C/USTK/V0PBD4pjLQdOMHo1EyO+AkJM6hANB8OkSgRXCmLrTEVmJXYdvdIr\n53wx\r\n=T/8D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4ISX8I2kypRGKu4Y3knM0YSx0cuH8iyYp2Tef+UCFWAIhAOWZGIBp/TRxzoyZ+6SIF0SwyvZVU+bv2RavhcWMC2Rt"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202008261328_1598448507874_0.06947719291199417"},"_hasShrinkwrap":false},"0.0.0-alpha-202009021335":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202009021335","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"bea974d13d293a13657e42d7ace9e5e78851db79","_id":"symbol-bootstrap@0.0.0-alpha-202009021335","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-5r3nHk+Btu1NzttcbPQXVurqYN0+s3+mAYGl5VDqKjWH6v+Ydy+nGf5uAW9vBr0gnEazMOs3bn8RlyvxBOuUEg==","shasum":"ffcc36379365d4b7347916cb3757e9737b127eb9","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202009021335.tgz","fileCount":110,"unpackedSize":195675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT5+YCRA9TVsSAnZWagAAV1AP/3Q8ZHvX0n98wtJ9qMaN\n//0jl/aDGBbfZcUmKzn/gNbcfYlHXbaxSc9gxeSJd3AVL99z6awhpIbYnGjK\n8nq09XF5jiKUPFMu/eqfIP4c15bLs/5son6ZXYqvliXavPqNTGHPN0ScgcCu\nv0EL3/PIwP/vToKBMU0A3+XkirTSgB+rPFvRzyywHd2Ds6cX8cbkKeolCaGN\ncLbHceyWFaUrMXVMiFLo4C9Tis4FGK7xIlqfBY9of+fmfCI4H5Ddx4kx05r+\n5TTx0fhvAPTzUl7zOUWETWC3rKWKy6Y54uvBBL849ceI4YYhBlKaNRADdobw\nnfZsyGuwZap4UanWVOJa8vVzNejTlGdPXdNf5HXaaUHsplsiO/++ZTJgHuZD\n/WyLrj2jHhfaqtwmiglmeZynyVApSMg0UykWTj3cXkHKG3mUMC71EBxVYPxp\nlVaazbPs1TM2Lz5JGyXnGCOk5AIQZHey5tbIJYDpLXf03VDpA6F3bmb4bVvc\nkTw7J18TK5b/J44jI8newVZiC1atgKg2v85sj9zq0fezHLiBkV8H7u52FQw/\nTof2QvT2huW4EiE/ql4s2E+OOwi9v8XMscV1tmBg4M+TlfVb7jeuYG95ZIwm\n6c9EedU8ncb6ZHxjw3eRB7YhPhH073bGn+LfPxb6+JGJKoH/WoYonX2zoN8+\n+sQU\r\n=opqC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4L9+hBAQ47BWkSdcKHDJxfZ62mdl5TDwR2YiNZcjeVwIgEkOHSzCc2cRysHSgPnoyzkn6eqrc9Z9++R9PFAhYD28="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202009021335_1599053719374_0.8147428900185869"},"_hasShrinkwrap":false},"0.0.0-alpha-202009031500":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202009031500","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"e1157b17e61d10d8c6a642804d3b6fe403c2c2fa","_id":"symbol-bootstrap@0.0.0-alpha-202009031500","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-PWNKWU7plIiL7xTrwbJ9gjcgJC6uK7yAxdQlc3m3NSn9oeoNKaqfq8KFmMU4u+LsAkFgWoweqzOolKsw+UaTEg==","shasum":"7452878063e68fccc416bccbbd60acdda13735ea","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202009031500.tgz","fileCount":110,"unpackedSize":195675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUQUzCRA9TVsSAnZWagAAJ8EQAJ+jfRW7cD/B/t0jQ7N6\nYU9V/NPEWuQu9G2SiA9tGRJmwMkdR7Fn5ygcVCyGcoMmQghEsgSk5qSs1GsO\n3QZGKOJWL38cdeodoAqPYdS38UfbEhpGYX3o+SZ83oc89LhZ+H3gb67Uzrxj\n0nylmHRx08WrUynEmBof4rqiia56Wd50YnSbhBUflckJtm054h51efb9L+P0\ni+/MX3B1pVty3wn8Qv+bnZRU0kd5kEhLtubE4+dKLfrXmyaIYczDgXs5xgW2\nUnQk7XXd48wCUzFlkdWqLh4c27eKgr6NqJrFwE6/NCWCZE24U2kiqNgJCE1r\nfZcEoGbCBa6iV02tiGmsUidtjveUpd8VmOPnaF/gdX/2is+lUBAbNn9kj/cl\nuQB3gTAuBgN8sJzUVnu03zkbawBrOmhkc4t7G7EJJ5MhT25Mu6XzvJmHIIR4\nSwUqdRvbop78Shp9Y6/NABi+mgPW8CrXipbo/4EvEwztiIOCNyiLnscZNEs3\nmkDS1d27E7+NeZ8WwFQzBcXsY0CIAVOPXrjbUHsrmxUXehJDhm6vQc79Ca2n\nLFkAyWvkqN+deebFQFF4UG41Ykt90eZb+oOzp/57+oKLE4px4ciApei26+M2\nonEsPe/pq7ucOTTsfJM+t4rKFO2ibTlyheNucp5wW0yJLnyVTG7fEtdDUATL\nHvCc\r\n=x06I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3fl4tRa2Zgk6nP9ZghjlyBXsBGkj4Reo2wIX+K+ZVTgIhALlMmg8H+E68caRzs4AVHPwExRnQzvUaIn9mlIlQR9mv"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202009031500_1599145266368_0.09872444896785137"},"_hasShrinkwrap":false},"0.0.0-alpha-202009041308":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202009041308","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"6442b6952205262df485b34a6a3dffc634d8693f","_id":"symbol-bootstrap@0.0.0-alpha-202009041308","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-dYgLU9X54Cy8oGH/gXZ3ZB39WlEjM6fiTAO/mQzxLzbSqXehiUR8ybesuDjB5uaxUaPvWLFKRlTODXT5SOSwTw==","shasum":"bee645ead1fc550ffbaf3c8ce0e6af9334cb25de","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202009041308.tgz","fileCount":112,"unpackedSize":195787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUjxXCRA9TVsSAnZWagAA17AQAKN14BS5GXMVNdZJhekz\nWWeFPOI7DekvVMAHdlxw+VnWfbFzsjfvgCI94zMKQQ2p8UD/SJ7E/w4eJgzC\njRd6+KRQkoLd6eHFeCUfj45zp3+xwEJmVpaSDkSqFIjUo9xYmXBpdFZuX4Fy\nQ3WW89F2Wfznvj1WLxTkNYwcghBaLtGVHHqD8E96rOkC3iftA+z6rhnLu4xd\nI/bydX7OAOl+jikMkHiwWZgOUZornZtZOlWL77fL/yN4xE+nANjAEcawj1YE\nw3tO7Kb8pWSXfPSRqDcH+yD9SaO9hyOLY42+IDK/Phtnv0qHAL5fxlPSZZjD\ncI1Lt5vdJqqrANOBpwsuVc0dpX5r+39BMvdKTsiMf/X3MXvVnWW9PwHaUy1X\nBlciILIRLDDI7hRjF5dioCR/Z54xPbDhSwRLB2NeGT8vZJkOJiC7SOsYTGc8\nYqJdcTEvgddoS96XHSOxir3OtfQN2lMkpg+V+qMj/iMv6QEY3DWEkGIe5A49\ngiIiohOZNAX7lSryxQkZJWuBf4pBit2nZnD5uAmb6YsgJkChkoD5udwYei0l\nFBXxMuC/C23gGkLN8psIatHtOziMeGYVel+W7IzDhTTJ63XHPNL9GVhKHxt0\n/3Gco8ft2a4bP0pien50bhnHNiTfSq7ccKj82JiH83aediYpZ9eYNXLI1E+c\n4B98\r\n=rM8C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0S3oszBjV8nln40VNfQgwdNhpQh3+WNXezZq9xrjc2AiA/MP5gufXGUqHJ5jDB0UGkR4kToq30bOmOiVVbrs1DhA=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202009041308_1599224918970_0.09973442887532458"},"_hasShrinkwrap":false},"0.0.0-alpha-202009050410":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202009050410","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.8-alpha-202008211131","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2d822196710d774bbac974cae9682cf087b01bc1","_id":"symbol-bootstrap@0.0.0-alpha-202009050410","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-18PGAaVGn1Tvo8iGTvx9xNm4OXIYdBTm6wvPp052fg7CvCr0WcakGcLwy9f3HIiqcKOhCYqRFaEgm6qN8LRE3w==","shasum":"1ad823f0a4186fee365322724a479820053666a5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202009050410.tgz","fileCount":112,"unpackedSize":196439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUw/TCRA9TVsSAnZWagAA/GEP/jpRuo4gu2S0TpWw5jRE\ntSq4cZWGctz9WEJyje6UqvdWhoFAETjbUAi7fiuSUAJfgZVG70eY2lREyiAk\njfRxIoVWT5gVZ9zU/NLOhzBs1itHGL/ohySg8ZekDklUp718v11qjrJtQRC0\n6EU9Zi9KyZmh/xTo/JqTXdlZevTuPw6eJGl+6aBf2UNPN4LvlW3h1EreyXWe\nR+bFix3V7ZoqMxxMevfthocDnlKSvWrb/b6894LSARdCF1gN/0FLJNtD45U7\nNzWO+bJ174w5+zo/dhaHHwIdPIk0skO56DJILlO9omwM2N/PSITlmVxpMvIA\nFWeBSZ/4q0vLkqxzUDMkIaB3yj83XXftXqsSYsoE3O9aY10pyfZtmXXNnzbx\nWulgmc8RLGmHinXk7V2BGTrSOqS55e+QgrvJcEApIXmE95M7GrFiuwbbmSSa\nS7QvvhuFYc2CfaTohXRgb4+tn8kWn9oEs0kCs5VU1Y9V0Z1iNBMxN472r+fd\nRizbxrEFZHNlq6fBvv5CRFfgT8uWgdI7xkpzYQYDbUQqq3mfS+5uIysDANOu\ndfbiV6LWcznwyY88oNnMg6sLpQoLE81smPiN/nIhtlfJG37epWpRiMPJT4Ll\nvP8IyOmVvK2NGZbNnSQwxv6lr0yB/j/c6psFyKTEpEm1hHY/uO2u59wXpEkT\n2mIh\r\n=H7Tb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa1ONTg5d+BWE2dfDxq2egN4EoCS1dYB83bnqICaJEBwIgL80jHK8wMF/nqfS/dNbQqodstRXscuxDk5zbXoeg2uQ="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202009050410_1599279058879_0.8526860089997483"},"_hasShrinkwrap":false},"0.0.0-alpha-202009151319":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202009151319","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.9.1","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"fb23a4926fab1429b8a14a616585e35fb483a458","_id":"symbol-bootstrap@0.0.0-alpha-202009151319","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-s9yaUKF/W99dzmMl5sWKLrLKmBTnSXeND5THNbj3Y4hFrJqSXZTRdba8TdjvE4briiP3WyWn9EbAbAtC38picQ==","shasum":"aa259dfa6f505d1e0561748a30f1fc0eec7f907a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202009151319.tgz","fileCount":111,"unpackedSize":194016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYL9cCRA9TVsSAnZWagAAmL8P/RsXHTS3G3Ni6XljegPU\nooPGiDMcoz/IVMJpKbbhGouUiTcwJhEAxzm7dKlQW30Yn2Ex4p+xsP6ldo9q\n94K1Gl8u1cpi7dnGDp67/oZIDI7u2NE92hB4iTdRroZvtEKvzMxERTE81VCM\n02D20U0yLcHM4EbfJiWJGln+ulopTpGU1Rm2r3BRB5OZqB0LI6Qv+F95twt9\nSfjhxPSOnsKG0knWjCjY21gWkCfpu74ExB2T0GtsMwlBm5bKNzxgFilRFqly\nEssBvwzPX+ikTaKqtCe5mKDijiO7fGGhuxjrFzbf/fO3Mvo7NJzslrMQBKgB\nWl6Mf+C9nMK/yPZ1JJNJeH9ksNs6bOK/9fsFPv2Elj3zGckMZ7EOUWshR3ge\nNOhyS6kDV4eCaI0CeYcWXBq0mDbQg500AIdUzhevoIvYVFSaYdIwXqpyy0EN\nbB2D2UdWRGmOcnW1DpoKRHg51lmc8cBdgDnmvA4sqI+Zg38takwxkUe80gH2\n8BVO53BrJK5UL3+JZU2tfiYP8XO8zzZ5Qq9bHr1VI9bNuwl1Sx9GakthiiPw\nm0RNs8vkLGbVMdTVIM8gf/eTpQbNEbchmv30W+MsCDJSvpYFPPcnHPeqL2d+\nZm/wS/xBGRFbvRSioFXdrfJcmwVXGpPJVzYVobouPpoanoCQiODsVIiW9u+X\nb022\r\n=CCKf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDo0T0Ryle9OyIn/QBBeRDM7LPBtBviGpMSXFDRGAZRAIhALk4uTt1cGj91C2hhR6cAsIK2VvP8eiu1jqoxmhZdSrC"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202009151319_1600175964276_0.7421759302411506"},"_hasShrinkwrap":false},"0.0.0-alpha-202009151323":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202009151323","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"c3bdaee5c914831c2be652b830461b95f93f992f","_id":"symbol-bootstrap@0.0.0-alpha-202009151323","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-FQplaxAXEnhB6fz5rMXDZVDe4eOQXCXGWWQh0RmVw1Q85UufqYus8hjRnWm71wH8mcWvtxicBGSzkfDpkPEpBA==","shasum":"ccdc692cdd87f099b8a9dc77714ab507b6befc13","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202009151323.tgz","fileCount":111,"unpackedSize":194017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYMBXCRA9TVsSAnZWagAAEE4P/i7ru8EBLdH67ytDdjXN\ndzMis2/MNWKFSdrwzs36sls0CLmsH0dY5cfavXwTXzBs3nDhNLnPF0e1JBq1\noW/tNEoCLOkq2ZMuGBnZ8d60220MyUA0H8/2vMVVomqEIFf6/95wrz+k95wA\nCEBo0PZG/ZMyDdHOlXNr34pkPzMbJ80s/jW14vIpRa6fIS+Cebixe1T/v2Hn\nT667N0LyJ9XkWNL/asR73DXobbr5jgpuZBhOtptCE7t4oSXp2QK8ZxbK294T\ngqb+zm4RxbOFabhWADTrpAZ7AFRp/k3C1Lq1eCXM+tA8nanw4fVspY3lIDXI\n2tSlYrV4Jv5fEhB7410UDip8mvtjd2OTZ8wWlScaeUM+eldE/g5TAPEsNY5L\ntYUaXfd5hV3sd1jGAjvc1gYeZIlkL611l5fDXuM0fRAdyorwbZNMdKw0ID+j\nHZZVp+TBP1STZzhZg9JGOdxsHyBt5Qgt0lIJ+dn7tkGrHbZ5yg9o6MDmmlny\n1XMcdR4CIf6OQZO0DGAOoEQ0wYLdc4fyx2+pzbiXAjGg+twW3MMzKvfi79qD\nQt6BWFdZs55QzFVyXpVzmFVty1txr4iNPHvEj6OwtlfkjzFO5DLGH4TLXaHD\nIyCDTkQ93hc4IsKO7zSexfCjtosPuV9RMStG0CiHp0VFsn6nXogH1DULKcmm\n0SrY\r\n=Bjrl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw9z0FjPdqtghKapQAb5GxHiepDGyUUBFBf0X2Nq3c9AIhAIRpnW5CfK1jC1FWpeXIb8wz383nQ5doV+glSWWgTpkv"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202009151323_1600176214851_0.7695908770001099"},"_hasShrinkwrap":false},"0.0.0-alpha-202009151413":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0-alpha-202009151413","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"21810c38c09f4e82dcbcb154effa7ddc45274a6f","_id":"symbol-bootstrap@0.0.0-alpha-202009151413","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-aFwSw7cXw9adofbhSYX2Rj4LjCZbEHZf94+xxKgNpiC8kk4FY9sX3Rhi3J1EzQ84aoBzkoJCAGQPX+cxeXHW6A==","shasum":"52b7b783bcf5349ffa52010b929a1599cc8e83b9","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0-alpha-202009151413.tgz","fileCount":111,"unpackedSize":194017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYMwfCRA9TVsSAnZWagAA6g0P/2beF5x6K8maJJrtUiNV\nOg/MgSIWRNKKJc/fknhSys6HpOdeTr1cxr9HLlZztLGrDyZPA8ilaRah66gF\n+1qfsg6Z7MvlHsEZTAd0QgXl72DSxaJgtRFxbhzxV3lmd19nfihGaEG3uNOR\nOd1x4uIJ6nRwYNmWtH2HJAkAzdwpk4IHPrW3JbgTZO3hyJpjTFxmYzWna7vs\nEEPCbI4uDpj1juQ8OGqfZXNfiCVa851uhIuY2J6y8v0x2PggkMo0nmHnykIJ\nsGkqD4Reg0jR10Nlm+l/JlzlnN0q5inN43UAxTYJV9e2ejz2OvqUP7Q2ny4U\n5aLObFkP37H1XgIO4Tqmx3TJ8lj31fAJoFaic3snswTkShxZVQaNsBCunCti\n9BiG61XjVoUOjN6YFeo/lLeDKwu9fk2dXENMcYHOj+uD5Uf7J/GdBe0S89FN\no932e4+rlwOzdxrfZhfuaUgMOGF6oqCcP/GssjZ0Wmv+8NFc/zeXqHvWQs57\n0W6wxB6OMKjzqhujZPuf/ThwnZ6fztQTG/qlZBHFcXBk5AVz3wkDM9Q5C09V\nXbBUR4qli0FYGWxqpa8xjspiRxNb1wEaed1Ug40tFzdkE4+2pwm/ODIjengK\naYLH8ghiw43zM+ettxmFFC1cWUBFWUlXZzyhvjTXHXWMLpDL65j6xoca4W5r\nmm9O\r\n=K2+f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBD5MbVFBYPHcMAIQ9dXk4p7hAmCvWk95aWIqXpFd1N8AiEA1aGhzVr/ZDMfQIKrA6AurcQVAdtlzCUnRH5ip+qemaA="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0-alpha-202009151413_1600179231055_0.6375581182721941"},"_hasShrinkwrap":false},"0.0.0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"21810c38c09f4e82dcbcb154effa7ddc45274a6f","_id":"symbol-bootstrap@0.0.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-0pW4lMqvS33aDo6MCwpnQutv1g0KJ8fpngFrgMAcVIEjKLZIyhmFiewhMq3Q1/mn0gy/vvbTzRn0phSRwHZ50A==","shasum":"eec3595074ebaf69bb8fb0aa0c07226aec81a2ab","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.0.tgz","fileCount":111,"unpackedSize":193960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYM2qCRA9TVsSAnZWagAAklsP+weMLzYBLRclwutRkgpA\ngXwsqOuQOmTkcgyhqBVf/dJzTWhMe8lio9GJJ6liPawiiOzC8AxMiVReQvk+\nKSL+swNQ+RU/XfCHf/u3z+68DOdQtdbf8MX3R5UavfokHOmEl5R3wVQUJYC/\nVccx7pph6x+jdOBrdKr1IX49ormw1GzsicDcJWDnoKCd/qJQBT40zojP5Yff\n6PGeMm+GKouX0UME9p3VlpaSaggyk9zsxJu8bGR/Su0y8qloYq2+b91IDt/6\n8O64GM6h5C0Kgh+E/N/GOGeYcosZx/nunuvP0s0r+wLzKZgBMGzATl211XJl\ntH0M3AZokWXI001Om1xExQvwxz/qD6IBWRcoAuHuehI86vnfxhjGkl+XGwIg\n47d6dPvRGtv4uAeR+SifPllMmgLmMdmvI44p18c58bZmbZIxzk5RRCGd4xMV\nE+Sdl0klWOWFItUm7rF6ZZq4x3k0OF2RZGbDAlJZ88C5HgCkNfPuzRgAFxfS\neT8LQ8eVx33XvAXihUTqiTGd+maMCz1fdaWjpXZ9YkDqN3S7EigOujL5Pfhn\nwIO8sCSY/a+GQhqwv8KwJCK+isTpfrJbujLwkTj1eQRJWvHsiiYVwqeJDIgM\n+Cra2cZxWjJpwV5XH49/MuSy3OnzDG+0XB1RRYCji1b7bBC2Eut+A2OgknAk\nzCmI\r\n=KG6c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+ITf66AS0q1WEd8IJHgRwp3MzXvuJ/GuB9BB1kHA+eAiBnoBcf+ALLgNeEV6JaneCMI2aq6hpaW+3ZvUI2qTKeeQ=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.0_1600179625899_0.8352965297561905"},"_hasShrinkwrap":false},"0.0.1-alpha-202009151500":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.1-alpha-202009151500","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f22cc517df14525dee940e8870513f70ec9b24bd","_id":"symbol-bootstrap@0.0.1-alpha-202009151500","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-hJGPpFVCQUWXRdFHiuWN5Ptqh9oEdjW5iyZC02K61T9SfNBh54XJGkPt1lxuABU7ZoNV8gDJQoYlm6ESbrx0uA==","shasum":"61f5dddf60dc31a064807a88f0cb47d43d2f24f0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.1-alpha-202009151500.tgz","fileCount":111,"unpackedSize":194017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYNclCRA9TVsSAnZWagAAnI8QAImFC6+zZkTzEFFsvGNe\nNTbcFuR0ERzVM6v/4YxfYpzdQFXr0rZR1FGV9U70etjnGpxL9zP+5G7VhEPc\nHsW+AM3W1k/OZlCA+o5BN8+v4h4rJWK0Pxcl8DCC2mNS13hNUQsbnqMjqU1t\n1wKZCnIHy0bpZtatutyl7sN/dhLRmv6OsaOCbLknflwqyvjHN+zMUb9SKcB9\na2d8YJRYwisFiyZ1eobNXtcC0vJsBp4OqrNf47Ctv2yvX22OlX/1kjAZeOe7\nYlp0VnLNdUdq38PmU6lcjs4LApXb2b1iQIYz/FrgR3kt5h6ZnLnqIQWQ0gGD\n6CeZ7Qd0bxsyjpTl2SVw/oJLGjQthOLPiGUVS/UasuG0bpddTHliJBUItH8F\nWGhM8+2+qfZoBHVZZtM8Hs/KjWBJQevCyBAh/UNWXrGJ4vj2kofyrxIeihdS\nwaIKFpk1/Wvda+pwX61AXhNUNykA1PV/7/fOSyRUjT5NgRlwZxfwwCV3ddXW\nlKUUj9EPKES4j1M/vdcjH6ULzgaZgsrQpKTBvSFJnpYGOjzMHY3AKUAi44Vv\nr4mvrff3aWpdwhbdTV3ZENHl5chVdSWURMFUXjtzBYtrNhN/oEYDOOVOYyIB\nNbb3f6nBXWyPQbi/6vw2UnObD4FZdymxvx6c2SkUZASSixkm21OE1NtQl7pe\nIZ7M\r\n=Imvr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGp5zVZJaYPK+Yl4bdSmCRr+7YZsm8BMc3MyEF1sbuKGAiB0Xi1qbcu2HieKcoorZ6DemPHWBH/HYE/vx27KsTIuLA=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.1-alpha-202009151500_1600182052971_0.30819059540069405"},"_hasShrinkwrap":false},"0.0.1-alpha-202009181300":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.1-alpha-202009181300","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"fa621c8854f52a70fd95db8507be3c91ecb51522","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIdeally, it should replace:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose.yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [haversting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**Examples:**\n\nCustom reset image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:1.3.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\nCustom number of nemesis accounts:\n\n````yaml\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\nZero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\nNot exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\nCustom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   NPM 10+\n-   docker\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --daemon\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--daemon` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --daemon\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        daemon: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the docker-compose.yml file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated docker-compose.yml file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for docker-compose up bash call\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one liner!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap start with --daemon). This is just a wrapper for docker-compose down bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.0.1-alpha-202009181300","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-nMlEnEodK9P0t0NutVS7GjqjHMavei34H53FzxOOXfLYciEDFEmNMrepSQFXzcX9ozKPjfGTbMiOuYyql9A5jw==","shasum":"d3518389b479cf36a26c453787b87982a97fab42","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.1-alpha-202009181300.tgz","fileCount":111,"unpackedSize":194053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZK9mCRA9TVsSAnZWagAAZrkP/2cY/gD75g7/ZU4SIJZA\nqOK55gi2Igq1xfM/G68UQzVDL0nSY30b5j3F8S5hKsuZZpku6pE8IMwN0h03\nokFVfzlgvn394phvq+2pKwDE19vqa0RMDTouMZfENRFQf3lXe7PN3quKVaHH\nd4BEtcfAnNeRyV+uVerREiXi022jT7b/Lpe5vX0922OPrfIEPR7YVCCN6GSV\nahGt5smOLuD8UhA/1FcGWs0K2Q3vn/RQ6zUF4tXnIa7VebTqBpSyeZl4pNP8\nxgZeC2raJQh+2PPfc9YxAdCYOb92zkkfhTokuYHU9Qn9Aku3lMSMDV9GdM76\n2Wp8WROqfS/ZE2gNkd/NgBMiTT58qJOPbuRlg9qs7ieEw0yGcZmTN0BAk+Fd\nBzeXvD+k+dyajYDpLMnqxUt4hg4owkKbc1T1dflCKczPUArmOcTztEjDtSyd\nb3lwqmdLkynb+ASyJvQUdHoPqw816h4t1IzfJsbUupZiDkZkjQ+ZnMo6Qc2n\ngUWEvH6hY212nyhQZ0LjWIbtOValqwx2mO3MorvaXIcoFYsUEIKtrcjuULxZ\n/v+tk0kuETyyFLVcvKz5pO8C/1CzfslpE+yoILI0RIXX7GYo0j8g21oiF5cN\ntbb+xhd3dI4/mQOqtLMkBu9TT7HDn8FukinUzMpTEnDxEpH0AJIeYAsNo2YT\ncB3G\r\n=2/yE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFyiR3S9swMedIZPw1YIvJS4Nx3B6zMGzMtK3eMzescMAiEAsBEarM7oGMyKp1yEGQ2/8qQXflIcrwgSSfC8+d4bVLQ="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.1-alpha-202009181300_1600434022282_0.12243060372991343"},"_hasShrinkwrap":false},"0.0.1-alpha-202009212030":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.1-alpha-202009212030","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"edf047a92dcd7f7aec8bb954b6478115d0c6afdf","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIdeally, it should replace:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose.yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [haversting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**Examples:**\n\nCustom reset image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:1.3.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\nCustom number of nemesis accounts:\n\n````yaml\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\nZero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\nNot exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\nCustom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   NPM 10+\n-   docker\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --daemon\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--daemon` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --daemon\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        daemon: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the docker-compose.yml file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated docker-compose.yml file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for docker-compose up bash call\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one liner!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap start with --daemon). This is just a wrapper for docker-compose down bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.0.1-alpha-202009212030","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-HVbT/NofZdCRcl5sg1VoKOiI6gOceEUARzXSt1/MNu15X7f+6iHV6kZX4itcxcPWaldB3P/wubRKLn7exjZIUA==","shasum":"1c1b84bfa5b07f0604884bc30f620d561eb3d567","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.1-alpha-202009212030.tgz","fileCount":111,"unpackedSize":195485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaQ2JCRA9TVsSAnZWagAA7CAP/0gk/hGQbmVBnO5UX9mR\nfmrFLxOUJnDPcA5JmW2soiBD63XmNhEWQCJHijPAT61yJfuQCFHmSBk2Me2q\nXv4qo9CU3ZU3KmEwj/N/RK/PxHk73xHLTwyD9IMmOQjCIQgBWCs1GvaECShP\nwsjdTcPAlk807UkvxS5RaOcKznE1lmZQ9zTk5xPQc+UuJpBwvaqEapcAZP7v\nulR+foOZmsuRvnuwn+wmiwpbOAHuuqiL6iV9ApSjuW2fAaTuwTwOG4+N0Yfv\nlOXmmrdGGd+YltnyZiSvfOhRsLrNuo/Q4dQolVYdaVcfN8Y9ZQ4H784GkfWZ\nm/VJWc7X7Msfi3IlNnqFtxSB6OMfm7QIfsL0ME1aYF+h/MB0qB8KFS1QwZgo\nNPG8BeIYtdZV41b32KuTsIjAsG4WDQDdYZTABLUSiMspjZcYjYZTrES/KVyS\nm9YJVSwph3CFD8zydGmWurkNu8XooMR/dJpz6OfF6EtLW0Q26BNk97GMn6Af\n06Q4IYVU49eHcS36eeQh6x5aIxN9LKEWLYMa1f7+zrv9Hg5t5Hs4q1adSdf1\nyEBVK0KHnpdErieDfg7lGvUuHf7v0qLUhJVAmC8Jo87MsK0390nls4J3Y2bb\ntmwtZIVvpq+o/7x30hlQjepPXNO+jZJsjhK9+thOtkLm7HivVQpsaJwqF/EV\nsnR+\r\n=ha+e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDomf02XS+0WutHiCL2yyIo2xJOFmgOJyDvvCMVKi/TNAiBAuWwNFc6imr5+ENuaZOLaISEYLT7eGDeoKuNNSzxciQ=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.1-alpha-202009212030_1600720265011_0.7158155125760184"},"_hasShrinkwrap":false},"0.0.1-alpha-202009221339":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.1-alpha-202009221339","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"ed7345821d1c69ad05a695f133219811a3212de9","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIdeally, it should replace:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose.yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [haversting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**Examples:**\n\nCustom reset image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:1.3.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\nCustom number of nemesis accounts:\n\n````yaml\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\nZero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\nNot exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\nCustom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   NPM 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --daemon\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--daemon` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --daemon\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        daemon: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the docker-compose.yml file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated docker-compose.yml file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for docker-compose up bash call\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one liner!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap start with --daemon). This is just a wrapper for docker-compose down bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.0.1-alpha-202009221339","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-+CxmyhmiGn5F8MCmZw2vrd7tQJLEzHxR/K7Yx3ZQR9VNuztGng1eN4rz08y+46j9vPKmb2gxbrKhQux8CZ7fYQ==","shasum":"0ff2516baa051152dd3b5df74862b941047da9b7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.1-alpha-202009221339.tgz","fileCount":111,"unpackedSize":195923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaf6JCRA9TVsSAnZWagAA11wP/ic4SUMxVqf+W8Yn1oPU\nTpp9sxF5YeYpH+SU04KmEUQW1pY3In9dL/au1d/Svg1vcmwni3iMEawOxdxh\nAFLlVtnmviloB+jnBPhxn9hyVOCyQwckJG+OvKRSNVCO8I8kUtg3/Ejep4uL\nkqSTsO2f7DhpcxaFA2zdTDHo+UDk9ykaldN50PuvnaTd33v16sHAI7awP5u0\nFvpJV8gSZ+C5Mgl+Wooz3H+O3dROkxz8T+HMIBCN46i4UWSte6MZF2ubrxcb\nfqjI/OOztr/vabzwzvci5/YViO25OqGSnk62uFClYZ/gro5RrcjdrS647Apq\nk/GC2Ge7Y8Qliq835uAo/G5oNqYRGv7ngwXIgUVrv9RfZv9uQv+RELJPuQIQ\nUITKSyZWIH546/Jq9YPyb3XPLdFkuvb55Xx95JVqlS/Gm9ejMF3G2kLDBWKB\nYbG4lRx9bSFgT34AbW314zBSgH02iJDuBPVuaTrY6C66mOTBCx+B9QDd3G2x\ncsRNY98uu8NB8mixVMlaoYyeZMQz9f/cA3p/HyGug3EKo705QYm66gsvaBoJ\nP8NSJ0xOSgRbeFnxlRpEib1P0HFq7VidexWy3u7zsCuK021SyGpqHkey2/xD\njEPQleyjE59rXWA/jvyipxuLUTFfclxkboZlg/Ou9UTrimm+0J3kIUmgLKss\nqNUD\r\n=YkDM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUFbgHpiNklSFNdiJzKpWrg5NS5VBOgbqmXI2MSbo5YAiBODaZup12Sd6mPllHGYovMAcWm80Zzb2+iZJOGrGuFGg=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.1-alpha-202009221339_1600781960572_0.40735790085453494"},"_hasShrinkwrap":false},"0.0.1-alpha-202009231743":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.0.1-alpha-202009231743","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.20.7","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"cb0f7b155950c2adde2445ffa7b5452faddd5ed9","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIdeally, it should replace:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose.yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [haversting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**Examples:**\n\nCustom reset image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:1.3.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\nCustom number of nemesis accounts:\n\n````yaml\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\nZero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\nNot exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\nCustom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   NPM 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.0.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --daemon\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--daemon` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --daemon\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        daemon: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the docker-compose.yml file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated docker-compose.yml file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for docker-compose up bash call\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one liner!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap start with --daemon). This is just a wrapper for docker-compose down bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.0.1-alpha-202009231743","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-lo3AWPfxi/y3ipBNRmJVbtASxBF/WXy4iQ//78BQJ5VOOwg8KCzc5+1QHRZkl8otjqDnrLwFsO4YNYoOXsw36A==","shasum":"5cc6453b3f83f67e99495b090745c026e2116873","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.0.1-alpha-202009231743.tgz","fileCount":111,"unpackedSize":195956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa4lFCRA9TVsSAnZWagAAGkQP/0fnS68kyzU/mOss2w27\nAcKnxcGk3/iWh8MI/sWcO+XGnRGD/HDNIeKflL+pGc/fOzBps3karZm0wwfU\no1peEDDdFXVzJqbhsSHV2hzJIAixqpiX34det3tTr5zPDs0KbvP+Hw2FMeKx\nR/BspUtOXjRFlpt+FlJ1s495G1JEXzTwPyyc6BoJgxpMFFMubcYz2T9E6a0E\nDaxTOdJC5dTLojoIjICcooquQKmCkTzeI+gLGVXSc41m8sJPmL2OV64Ts66m\nI+4Uw2OEoFqEZLQ68ev+2O2CrNMgWJpxrzrCLbpUQQhDWBs41YsnDN+OWr5P\nuDTXFlYAJl9leCYu++jkGLOKpprwG/KPVP0Q5MN7EKQuQYWqwqpBTLpDJcAr\n+6uU/05qqSbbvib50XU7GJfMzimpVNMd7RepFxEjFOMCFkWmzHm1yIV9Qa5o\nmty8gcC2UzM9UdQxhXWTmQFsNME48DiB2DyC9R4FHpgzrDKn1Pc7BPfvjZDP\njdr2prb+3FqhFU0wXrQFOdLPC1zZ1dx9ybCfww+sUTN9aonUsOeEsTQU2+gc\nT05J+1Sr7vVIC/etV9DLCObYDA9KMN43yMgezzhQj3vjLNr5DRZ21d7/wN+O\nNQZbC2CMuCl7/HF+gsMn8aOQuU3r4B+C/xFumMq7fRGpwPrcKlk7MSlTw7A9\nmaTe\r\n=xQzT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcbIs/bIBjIk8uqKok4y8r0XU62iNxaF170LuqRf9BsQIhAOPP0U6NNR8rAnr9kdSAgbx/D4zWH5gIxbWSfAz2U+WN"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.0.1-alpha-202009231743_1600883012396_0.2893663414751111"},"_hasShrinkwrap":false},"0.1.0-alpha-202009261201":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.0-alpha-202009261201","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.21.0","shx":"^0.3.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"e2bb4a10ce8c47ed71082833538e181e1e65d79a","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIdeally, it should replace:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose.yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [haversting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**Examples:**\n\nCustom reset image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:1.3.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\nCustom number of nemesis accounts:\n\n````yaml\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\nZero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\nNot exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\nCustom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   NPM 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.0 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root privileges!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.0-alpha-202009261201","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-cuAs3SxHL3ilxlie0NomFqOmxuwBg8fHm1azTBJefpLxavRD7lkX0ylIWA7vDD/AaaOJha/Zqh0ioOt6R+VMgA==","shasum":"e3ddf05e4c8f09472b06867115e33f9164efa2c5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.0-alpha-202009261201.tgz","fileCount":116,"unpackedSize":203932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfby3ACRA9TVsSAnZWagAAYaIP+wWQRdu0HV0hO34x5yzl\n6zyX912bPVuvRJgvAIC7BZuG9whpl1tlVNgNFtpfrzo3PyvSgFeUi7nkRnxE\nFCGiZv5NLqvGJ9+tPZV37JQA5mvfl/ohWv33euoGSmbzOSXavKudKSBdmPf1\n1iV+tR3Pkcoi+MTf7hLEutZb9rKW8l1LtTsAzvK1Xb6VwdBAx/nNU9MtBZZk\nmkR4zFLCVctQz1/xDDC/9cg9HadRvjfW6UAvQ1NB9lej30a78gRJm+B4g3tA\nvR3KsUF/wtPDK8mEcE/9mCLU1NF8W7cWPsYwaeXlc3s5q6gNnyk5Yu85QXb9\nYBTVNX1pzZZtcKw1I5WwgJXEoZPTQ5dnBRr7gZdKJtWIe0k4obV1senwGAny\n+YHAWFeDjA+ePuvL4H0D3knMmjrFMxSUb85ljlgwB0LzORsRE+qzSg5d4mfn\n6InF7+r7vKWOiobuGKRfMYfx+VdGQ3r/Y9Ij25H+IeRV9mUH0TjSUO9jro5W\nUKTWpOuSM3YgHWlufi3386CqR5rLW3YJ18Gdr9nKCqk0LeIkWqu8X0GoCz3x\ns2ct6svzTMFl4HGNDQMHK5rBlt2fSCLDm3fyrQjlGQjeyC6PMeOIFAoZlMX/\nNisOwXeT8XiRwtwD6IDtqvjwwV/WrtP+FZurxTbC4xRgDzbSsqjjeZtmg2he\n1NYK\r\n=hJRs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvT4hTkKseU2CLbdRZVjgg0Ftn9OEVqfkepN55xpF9tAiA0IBJreTkP+Y9PunJU3L9Xlq5lU234XSuLH5CE5/mZKA=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.0-alpha-202009261201_1601121727452_0.07550798111064072"},"_hasShrinkwrap":false},"0.1.1-alpha-202009261425":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.1-alpha-202009261425","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.21.0","shx":"^0.3.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"bff265c74844841f21e853ba72f4c8acce1a9203","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIdeally, it should replace:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose.yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [haversting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**Examples:**\n\nCustom reset image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:1.3.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\nCustom number of nemesis accounts:\n\n````yaml\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\nZero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\nNot exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\nCustom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   NPM 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root privileges!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.1-alpha-202009261425","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-ZqxSCP+onjJg8YBtQQJmcBRPaSup+7TMu/ZfecggqSUgFwRrpf7QNhSm0zwfT0Xbzbpj8SEYih9RCwsckPz3CQ==","shasum":"c00323668ddbd1f74ae185e9d997f12077155e5f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.1-alpha-202009261425.tgz","fileCount":116,"unpackedSize":203932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb096CRA9TVsSAnZWagAAawoP/jKLY/kDNXHXHaAKh8om\n7+ewwYCu2oON9pP5u0c3oSeWfR32aMXEdg+av8gIGaZcjelanIWXWq2pdJ3u\nylOjnvwxHZFbloyAje5EdV0hvkQ9MPRddJI29hB+tCGbTemKR/Mu4j8yRdnw\netfZLN/MostvyPWxJYJp86fabyixKcwqBCUea/P+Yutc/vA6ZAuw9KRegNnB\nJEV4zW5MnxjQ9/p3yw7jkFaK4sKr4fU0FSWRpLHNEzww7T9FU019Y4kia5I8\n5DwRVjeBepjyJQe10C6i0zGYg4XdCSpE0sL2b/CRktpe1guDgdlP/T4ulgte\n96VAcKBlE34uo4lrhOq+LtEHxFWnqkIsB/lfHJlTrxf4o8gcOdPqfkTqKvxc\nTzOnmFQkvRpJxs7ME/9WmxNY33BhZRFEiuVsgburQoqY8NtLWmWdwQFP53d5\ngFXFR/N+csY3qP2FOXYtIgtGWSsW2HxCxm40pbCDswKuw++kArRTQFssMqvP\n4zWdQJlgyP6zbCiP1E7OdFRIWzzpsEhy7GWJ73GG6Tap3tvTgYYMtXcflIjc\n3HDzz9oBCXO5g6FS7jcX5c1J3dAb+gLMF63MEfl6mc+iWO2CeqBNTaq2GxXR\ntSJy7WiB3GKCAwFH26ypfgfXUogOStqpgCP5YtcF87hxpnmdWY6r6UP0LuG+\neKHC\r\n=WTvb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhE9nJWfPXZQOvpsY6K+fGHGM4B2psZK9Yf33Cixam1AiAoLhRWH8OFt7ZjOPys6tEtQPXVd2hnJNG/pDoaulgINQ=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.1-alpha-202009261425_1601130361961_0.6892234214050512"},"_hasShrinkwrap":false},"0.1.0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.21.0","shx":"^0.3.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"e2bb4a10ce8c47ed71082833538e181e1e65d79a","_id":"symbol-bootstrap@0.1.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-t7X53PsE1+ZKIbzChzw9lEiY2NZSQLA5x4oNNuKcfSX4ArK0c6AH3Z56/+VgN1mu1lXBiiMPtHJ5Vt/kyj2OCA==","shasum":"db5f5e48626c525ebd30dc1154a8e728d22b427e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.0.tgz","fileCount":116,"unpackedSize":203875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb1ApCRA9TVsSAnZWagAAHSYP/iYi2/xucHh48CiplK3A\nNY8xGB09KiOR1WE95YrMPrkMCTOsdDzavN2XMFq3g7J5qIN6H/RiciUszXkt\nDtosOKD12OzTFVp4qbk5hlF4TTReb8MQH6EJqaJJEFSvjaAcfT1BmmHDkrcU\n9OOpioDBStt1WPv0EJwkqbqQWJvDu1HKL/H8NJeKZ+dp3ZMx8kLAUFJiyrmY\n2Oah35FFAsKYzEObaRvU08FCfVCkqW59KN49gSWWR6Xco+SHdkPbGXjWiu7G\nQDdyHlKszc1WFi3qf7qLtbesBbxCHS4RC24UsyYXYfjv6H67Xqc0CaLsU2m+\nQwL01I3Y0NPK497XJMkr/Fste448T1Yotu8yV1VnwfIYD+W/iAcdhIG4epZc\nvY1UOpVQoNUdivhNUxaeicqMhBltygY2uhGyTvckAIJOGoQw4W9br6cqNmlp\nPWmv3vgmsOTNIfAXLDy0P4XlXIc8laKxoErvL5RDc57KQeMJ/0wZ10ED+GvU\n+yvPB2j8H+TrvbKHVg/2S4cseKpTmBBbKz6LMGGWuUt6GSrRCfFBlmyLtXgU\n/0tVK+bPi6NL73gZhvlHvigpZ8NC/0WOhx2JqeYFeZW41pdxmwPJktdoLG2t\npux0IhQn73dTZvPI7/gXotjwZlsa6lhBJiAL8hmq5DDLmD8lZ+vKyyrkz762\ntyF7\r\n=6FC+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEg+dn860vxc70zHBo+ckqC6Ad+ZYgeX0smbLBziL9LuAiEAgbUbRUJcuG0dPe9pLnw5liuNM6AKyUcq5iv2XZjH/lY="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.0_1601130536877_0.8252377790847472"},"_hasShrinkwrap":false},"0.1.1-alpha-202009291948":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.1-alpha-202009291948","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.21.0","shx":"^0.3.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"96e6b8f337119856963f3eef07710c2b5396e113","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIdeally, it should replace:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose.yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [haversting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**Examples:**\n\nCustom reset image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:1.3.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\nCustom number of nemesis accounts:\n\n````yaml\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\nZero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\nNot exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\nCustom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   NPM 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root privileges!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.1-alpha-202009291948","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-EghlzxbD8lBLG8JWPh4r5NycUXYJFLHA/iKUUCTL+q4u8DBN1EVEClQ+6lWKTEK2Ff3VAXaT1NbIsBkDfUK90g==","shasum":"212470cb00d68dde03e1213a10b4a036d49249e2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.1-alpha-202009291948.tgz","fileCount":116,"unpackedSize":203916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfc4+0CRA9TVsSAnZWagAA96wP/i3RWGo9iehgjdXOLmbq\n6WqbsQeO/weQvScFT9/eaC1QbWJEgrxbTg2gN+ldFEa0SIMKKuuH7AAXVW/u\nDsBALY4e45FNRoOhbgO1nYMnqKK5jRIhu7/PsbazBHTsCgeDU16spc1XjHWz\ncmGZ6OOhPOZctuHGELlQKxsuBj9WqvYYQR8ffOUwiJcO+mtLJEeuVVksugSA\n2+AxEh0WX+CYOovZVIgGv6CzQzd859o8V8mEt60UGgoe7csnmiQOPsZNDTAX\np7umh89mredqvQeFDCj48m1hE6wcDbdw2ZMfzr0AFYH9evWYPvk8DKlbukRP\nJDi4SgfC92S21L4747Rlccghb71NxHlucWam+GADib6kVb0axAqiQpbD46Sd\nhzB7DJ7GrHjrWIkurJdCW77+fL0+Wa+eyrEFQCnlCdWSNMOYD66621IRWaLg\nMiX/5JIMBzR5ctYs+q5uWar66QwBNuaxbQE/C0GKPBtqipRN01zIH5HlSx/x\n37sT0dW+SIw7BnHH/3g+GJ/fY8cYJwG0cGV+Q16qhjVuhReYVVc9944Ql48j\nRwK4V9HiWbXSkAG+uCH3Fua6Ph00sZtJw/KoGEqdgomy80Rm8OHM/yK+64nm\nHxziPuhaQ6t64t/y0Or3yBRTNZAYELmj5jNCLuSR3sI5ORFKXjk39N3634TZ\nz/7A\r\n=FMGB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3ChORsFnoejExRjCyymKAEKEMNzEp1V0C+eE/AExivgIhAPKqmDVMGqbwXWC435R+zi6YmgoKJ4dP/N3pTpclCvEu"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.1-alpha-202009291948_1601408947654_0.8249487033449432"},"_hasShrinkwrap":false},"0.1.1-alpha-202010011447":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.1-alpha-202010011447","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.21.0","shx":"^0.3.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","rxjs":"^6.5.3","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5219aced1cabe22c948f238118ea4a607d6a8384","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**If you are trying new configurations, remember to reset the previous one by running --reset (-r) or by removing the selected target folder (./target by default)**\n\n#### Examples:\n\n##### Custom Rest image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:2.1.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\n##### Custom block duration, max namespace duration and number of nemesis accounts:\n\n````yaml\nblockGenerationTargetTime: 5s\nmaxNamespaceDuration: 10d\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\n##### Zero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\n##### Not exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\n##### Custom nodes' friendly names and hosts:\n\nUpdating first node (single node presets like `testnet`):\n\n````yaml\nnodes:\n  - friendlyName: My node custom friendly name\n    host: 'myNode.custom.hostname'\n````\nUpdating multiple nodes (multi-node presets like `bootstrap`)\n\n````yaml\nnodes:\n  - friendlyName: Peer Node 1 custom friendly name\n  - friendlyName: Peer Node 2 custom friendly name\n    host: 'peer2.custom.hostname'\n  - friendlyName: Api Node 1 custom friendly name\n    host: 'api1.custom.hostname'\n````\n\n##### Custom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n##### Enable voting mode in a node:\n\n````yaml\nnodes:\n  - voting: true\n````\n\nIn order to finalize the peer or voting nodes registration to an existing network like Testnet, be sure your nodes' signing addresses have enough funds. For test environments, you can use the network's faucet.\n\nThen run:\n\n````\nsymbol-bootstrap link\n````\n\n**Note:** Full network `-p bootstrap` nodes are fully configured voting and peer nodes. `VotingKeyLinkTransaction` and `VrfKeyLinkTransaction` are added to the nemesis block automatically. \n\n\n##### Disable voting mode in all bootstrap nodes:\n\n````yaml\nnodes:\n  - voting: false\n  - voting: false\n````\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root privileges!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.1-alpha-202010011447","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-/pZiewDTuY2YxBhDGngWxK1j4rpOKqF4zTv0aGTOcQRVDd7BJ/pA4Rsh0z5RZRdeB935KPA4pZ/3Y+JrQOqrow==","shasum":"d8e2e0c961c9dc485906e6c178c0e26d893480ed","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.1-alpha-202010011447.tgz","fileCount":120,"unpackedSize":220744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdewcCRA9TVsSAnZWagAAeQUQAJoUmfhDGiYAAfT1mPFy\nsDYmBeXXk6ydgNPEu+J/woZN70r0smXIWMnUZFwY7hrc+oBUyXO1tgJT/Gnq\nNX+wQXsKFg27c/65zamVi58/v2r4dMvLmgyv+KnOLdpxewq0lGan72WYD//g\nFPkite7J+7JpDh0DNbjITkhMc2OfOhw2bldhEhA72t73hBpQSibaHE9qWP5A\nBI5ZcEVT2ZgEyw504mzBiOPvklHYlHIeezFP/PXhh8Tvwge4tns4nOylzFRi\nGA9X9TJ4BW+hzoEbco5tceMLsC4yK/3cnTbu2JmJlEKFR3vXJapSdtfAQsTt\n3EU4v7/jOZEYhyL9QKGrB/aDotG3mzBtdgP7x2PL7ZkTStaabRZrPp4h0eSu\nExqEnCN9knXsA2EBSGa3KdbsJBHsJ9DvdbgGH5o5Ed0HUCa3BtMnQrkIcRrl\n7e7+dIcAGNra0II7EiboMOaIU3SV37vhsQPkHfhrxhEs36n5w8m/by90S6Dx\nziskkFOtVPu+dDgwUyc5DimHx/8birtuLUofLLquc1tyMmQLb3Ciksga7FWs\nakPeF6XnF3GNraRtG7mSLomiMUzxpyajPFDEJFLeAq6UjkwNmIpXM6zq89Kr\nGzdT9+p6NMJAI7WXaJQB/3WJKS1okl5RKQIVv7nOKv8+B26W1IxrNY/HHMvc\nwry8\r\n=CbrL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCFmjTav2Ss+O29wwSXYrXNDvVK7uWEy78yqozhyD2zAiEAlgBck5XIZ2t0wXmAQlk0UAH/ONP3Fc+0IlbGcBrpi8s="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.1-alpha-202010011447_1601563675919_0.046467662832789136"},"_hasShrinkwrap":false},"0.1.1-alpha-202010021638":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.1-alpha-202010021638","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","loadash":"^1.0.0","memorystream":"^0.3.1","node-forge":"^0.10.0","symbol-sdk":"^0.21.0","shx":"^0.3.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","rxjs":"^6.5.3","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5326323dd0dfb964155acee4db89b36fdcd031a0","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**If you are trying new configurations, remember to reset the previous one by running --reset (-r) or by removing the selected target folder (./target by default)**\n\n#### Examples:\n\n##### Custom Rest image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:2.1.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\n##### Custom block duration, max namespace duration and number of nemesis accounts:\n\n````yaml\nblockGenerationTargetTime: 5s\nmaxNamespaceDuration: 10d\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\n##### Zero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\n##### Not exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\n##### Custom nodes' friendly names and hosts:\n\nUpdating first node (single node presets like `testnet`):\n\n````yaml\nnodes:\n  - friendlyName: My node custom friendly name\n    host: 'myNode.custom.hostname'\n````\nUpdating multiple nodes (multi-node presets like `bootstrap`)\n\n````yaml\nnodes:\n  - friendlyName: Peer Node 1 custom friendly name\n  - friendlyName: Peer Node 2 custom friendly name\n    host: 'peer2.custom.hostname'\n  - friendlyName: Api Node 1 custom friendly name\n    host: 'api1.custom.hostname'\n````\n\n##### Custom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n##### Enable voting mode in a node:\n\n````yaml\nnodes:\n  - voting: true\n````\n\nIn order to finalize the peer or voting nodes registration to an existing network like Testnet, be sure your nodes' signing addresses have enough funds. For test environments, you can use the network's faucet.\n\nThen run:\n\n````\nsymbol-bootstrap link\n````\n\n**Note:** Full network `-p bootstrap` nodes are fully configured voting and peer nodes. `VotingKeyLinkTransaction` and `VrfKeyLinkTransaction` are added to the nemesis block automatically. \n\n\n##### Disable voting mode in all bootstrap nodes:\n\n````yaml\nnodes:\n  - voting: false\n  - voting: false\n````\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root privileges!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.1-alpha-202010021638","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-nVpendEYdAuF0ONb9FoV+DySgA5KL/cnrInriENG4xNC4+CjU+8uI92wiglHPbDLyVZncbjKrJIFicYoWgUFwg==","shasum":"4849dfbad526e16e41e36624077207eb0b5f2df6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.1-alpha-202010021638.tgz","fileCount":125,"unpackedSize":252410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfd1eHCRA9TVsSAnZWagAAOikP/1cNi2oliZOu5ZuJkIdn\nDbH1blkFNfGeqI+6/1P473YuMJHeVfd4+4Z0LH6UvSSvBtzL/TeH10m+oBvp\nNyWRZcz9hN5rvzPcenrTbF5VEM2w6T0OxvroWLCT75Nr1nhgErm2vWPBpS+9\nFXnHmtfRXHdhqO/wjCts+FemJHDEh4+YljBfQg8To2T4LR82EJ3ChR5wlJhp\n8jxZmnRz0rkQPa3GB4KD3EhXYxmZCGSqKy3o83IklJqUIKtGcGB10rc5WgiJ\ncXQWbh+NoxButaBqqvU4KLLQTJpLFD1p4fyyIEM25kxIEfafKtVFcsKpkPVb\n72qddz7JZQhPLL6R+kaBSjQVY+XIVokKDSkdwlS1kMFePQ5RhQOHQYB8IlfK\nO7gTTeHAxAjcg4a5sXIL42dzsu7xJSwUgMK29Yq3pB3SraI7bCqvNVRR7tOE\nkcyURdvGgceFoeTuIhr8zqa4zFdukSQG1aZHxkOwTosecQdibchI6qhv/N2T\n2X45QnwCPr1Ghr1bVI91cJYXYMUFZyCRlIlS5ySHCR5uoZUcE5nlHElxxk1o\nab0mpk4lLVWmBIUf6yMvpz1G8EZN1H0vav2TalYoRyVicj5Ws+t4NjWS6Lw3\nR+9+VkMzqLyuHvxAujrNXZ6tyk8HEuojh7q0GjolEyE+RDB8mTITnAb8PSnc\n+l8x\r\n=Oj6t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClv2SoJY+/MrtBwzQW5xcObGMxu0aoggJxnIqLSbxAfwIhAJI2mNREm4YS/GrpYFnVFose5TakM6I0DDt4/opJrZU+"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.1-alpha-202010021638_1601656710736_0.7080412812502219"},"_hasShrinkwrap":false},"0.1.1-alpha-202010030939":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.1-alpha-202010030939","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0cecd0fa6a31a660a8ed7459a0b30f4e6e40f453","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**If you are trying new configurations, remember to reset the previous one by running --reset (-r) or by removing the selected target folder (./target by default)**\n\n#### Examples:\n\n##### Custom Rest image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:2.1.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\n##### Custom block duration, max namespace duration and number of nemesis accounts:\n\n````yaml\nblockGenerationTargetTime: 5s\nmaxNamespaceDuration: 10d\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\n##### Zero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\n##### Not exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\n##### Custom nodes' friendly names and hosts:\n\nUpdating first node (single node presets like `testnet`):\n\n````yaml\nnodes:\n  - friendlyName: My node custom friendly name\n    host: 'myNode.custom.hostname'\n````\nUpdating multiple nodes (multi-node presets like `bootstrap`)\n\n````yaml\nnodes:\n  - friendlyName: Peer Node 1 custom friendly name\n  - friendlyName: Peer Node 2 custom friendly name\n    host: 'peer2.custom.hostname'\n  - friendlyName: Api Node 1 custom friendly name\n    host: 'api1.custom.hostname'\n````\n\n##### Custom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n##### Enable voting mode in a node:\n\n````yaml\nnodes:\n  - voting: true\n````\n\nIn order to finalize the peer or voting nodes registration to an existing network like Testnet, be sure your nodes' signing addresses have enough funds. For test environments, you can use the network's faucet.\n\nThen run:\n\n````\nsymbol-bootstrap link\n````\n\n**Note:** Full network `-p bootstrap` nodes are fully configured voting and peer nodes. `VotingKeyLinkTransaction` and `VrfKeyLinkTransaction` are added to the nemesis block automatically. \n\n\n##### Disable voting mode in all bootstrap nodes:\n\n````yaml\nnodes:\n  - voting: false\n  - voting: false\n````\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.1 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root privileges!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.1-alpha-202010030939","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-r/NgkUDcEJ10lBHFWhK1FvIznAgzjxYszPg6F4Hg1NWU0Abef6/MUch5qG4wX9vKuAISODapxxAohDXsjAUbpw==","shasum":"048112a64337552a76954c5d89dd669adacab0f7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.1-alpha-202010030939.tgz","fileCount":125,"unpackedSize":253720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeEbMCRA9TVsSAnZWagAAYE8P/ixZuBCshufD+uRArw09\nZXi8j5GRWbXp9D+MYfJIJEwb4tWVq3PC4jZKRH15tJWvEWqat4k03eTEXQme\nhPYlM8/+F0MV+2EAdR9+i/vyDaVsWH26T3TlIWIZWxybHqkHqAe0J4XC/laa\n6P1Fe0YLFaMBCdbIQa/eGJDy3VpWhJsf8WwVw8F/1p9RwHAgJQ8z4tfDx5yK\n4Se/IceX+/q1zqs4G7lNd515hv9B6Y00WyEA9ldrbgnBJsJFyhQmrix9eYbm\nIC5RCyrBIkI1S+c3JUzZx6UtfXaE7Fz4OeoDRYjqUt8VH6ZR7y2CF9CIN5vG\nQeFOc4MJ86HoX0Ki7Xdsv1ROo5YhKJO2mF/VX2SpeuM0O5N6UvBjkmZ++eq6\nadcQRm34idmaJrRN9tl1W+/gAoxqx68rSGQACaulMPkkxUMvsmKdhUdEcZgj\n2USPZmc0br+I/Y2fDJ9cKNeT10YJA8fp09vfI6mxCkPZV+DV2d3fYn+8h4mS\n008UfWF8y8YRDV/LYToEW7ZPhzv7Y3gRpQampZSOPsgx5moPcqouFZrnX6Nj\n9bri8yCpB2HV7rG+yqALuwmy4rOg20SeGHgdgFmk+cudk/Aso2R4oSh0J4r5\ngS73VJnoRCuTkePjCwRGvzWVRceFd2Y0MwF2ZpyY3pWUDTxSFjg0kVz8oaTf\nNBWQ\r\n=OJGX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMFN+3Yn76Fp+XJVmMyzPS1NZK+nlw9Zu8TB5PN2CGQAiBEJV0pJuVpg4MQF+tw+V7FbuSvdhkhAnV7u1PUS1rvDA=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.1-alpha-202010030939_1601717963818_0.40688769417034987"},"_hasShrinkwrap":false},"0.1.1":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.1","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0cecd0fa6a31a660a8ed7459a0b30f4e6e40f453","_id":"symbol-bootstrap@0.1.1","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-9rFH6QIwip/G9ZNrqiABhskD2D/1yX4lxggr9N5tM0OMddKc8v0amZMyg6ubeSeAK7kA9ps3dI/D9neOcj8cEg==","shasum":"053f65da2c9bfb7c9bdf6dd3d2db9ff77e68d88d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.1.tgz","fileCount":125,"unpackedSize":253663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeEe0CRA9TVsSAnZWagAAzScP/iT4Tw4L8xtmtZZXT3O8\n7AIRJQFfOCbzDK9dxyvT8miw2UcqnrBoN9Dqoz/R2FIOcr33J1hrQbkkKxoJ\n5BdTAIZGkSrOV+dkgk5apER7rH1aeead2Jhd5mLffLQytDyJjoS08zwyjt+X\nBrxNV0e8o3I1nsH4c7Bi/fXI88ldKQ1YOp1P3o0ULxhci1Drp5cy9v4xZpdR\nQjbnKSsLXtoJaE4TPmNSzdHpeLpwlXvkf7kkORLOrJ1TfC8SXz68L89Y6t7B\nKT+5F2+l0g38+cQBmDkWkGGyTHG7pPlkqFWeovMOc8Ux4Vsnk4LWBLkHfauz\nQ0YeeAPL9e+kYNPFcIiaN5p69WIfsKtigtnc3i9p8uMFmgFsTGb4Bhadki/K\nz4aX6jpaG+Ys393fX9thMhjhFdjs5sVZhNdvdx5Bu+pWY4rkreyRMk368hIg\nUIXBwGyEuHUo7P7Nj3yfkmS4k6IcuMAbhP9lxIjKBLKaoPjxoIfKWIYDOhgv\nDtRI96C7/SkPtgH1eTkIIRt0tig8lRmrjYVyGc9ZCLD1RsUsea48guix8+Tr\nwCbbn5KTU5GfLifX5L8xxu6l1zZEIkD8VdqneTUI3fmGcsXQkbRFN0uR4Hsp\ngWdmjfapPQ9/RKXK93rHP4onCvLJlBev/6/NDVuexgwfzlOMlBHfO407Udhe\nvXCf\r\n=Rm2w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+uoP0wEsOGiJHQfjt+atAq/U8vR6EG67JnJrK3CgjZAiEAicmqqMPdsCx3wKcA9qtDV8SjmTWggnijzqrfeGTBV2A="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.1_1601718195577_0.7338033585399772"},"_hasShrinkwrap":false},"0.1.2-alpha-202010030946":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.2-alpha-202010030946","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"1aaf27045051461396363f206fac6ec35723ef87","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations. \nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).  \n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**If you are trying new configurations, remember to reset the previous one by running --reset (-r) or by removing the selected target folder (./target by default)**\n\n#### Examples:\n\n##### Custom Rest image and throttling:\n\n````yaml\nsymbolRestImage: symbolplatform/symbol-rest:2.1.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n````\n\n##### Custom block duration, max namespace duration and number of nemesis accounts:\n\n````yaml\nblockGenerationTargetTime: 5s\nmaxNamespaceDuration: 10d\nnemesis:\n  mosaics:\n    - accounts: 20\n````\n\n##### Zero fee nodes:\n\n````yaml\nminFeeMultiplier: 0\n````\n\n##### Not exposed rest gateway:\n\n````yaml\ngateways:\n    - openPort: false\n````\n\n##### Custom nodes' friendly names and hosts:\n\nUpdating first node (single node presets like `testnet`):\n\n````yaml\nnodes:\n  - friendlyName: My node custom friendly name\n    host: 'myNode.custom.hostname'\n````\nUpdating multiple nodes (multi-node presets like `bootstrap`)\n\n````yaml\nnodes:\n  - friendlyName: Peer Node 1 custom friendly name\n  - friendlyName: Peer Node 2 custom friendly name\n    host: 'peer2.custom.hostname'\n  - friendlyName: Api Node 1 custom friendly name\n    host: 'api1.custom.hostname'\n````\n\n##### Custom generation hash seed, balances and block 1 transactions:\n\n````yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n        '16963_581474': A1000000000000...(serialized hex transaction)\n        '16963_580690': A1000000000000...\n        'MyTransaction': 01000000000000...\n````\n\n##### Enable voting mode in a node:\n\n````yaml\nnodes:\n  - voting: true\n````\n\nIn order to finalize the peer or voting nodes registration to an existing network like Testnet, be sure your nodes' signing addresses have enough funds. For test environments, you can use the network's faucet.\n\nThen run:\n\n````\nsymbol-bootstrap link\n````\n\n**Note:** Full network `-p bootstrap` nodes are fully configured voting and peer nodes. `VotingKeyLinkTransaction` and `VrfKeyLinkTransaction` are added to the nemesis block automatically. \n\n\n##### Disable voting mode in all bootstrap nodes:\n\n````yaml\nnodes:\n  - voting: false\n  - voting: false\n````\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./config`: node configurations mounted when running the docker services.\n-   `./config/generated-addresses`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./config/nemesis`: the configuration used when running the `nemgen` tool.\n-   `./mongo`: mongo database data\n-   `./data`\n-   `./data/nemesis-data`: nemesis data the nodes will load. The nemesis can be generated (for new networks like `bootstrap`) or copied from an existing network (`testnet`)\n-   `./docker`: the generated docker-compose.yml and DockerFile files used when running the network.\n-   `./state`: folder used to synchronize the services execution\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.2 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n````yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n````\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements. \n\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, ``symbol-bootstrap`` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request. \nGeneral users should install this tool like any other node module. \n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder (It may not work if you need root privileges!!!)\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.2-alpha-202010030946","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-gq30+vPYBEtWgEzI6bguTnjGxqdIJoP97xY4lLC80hcE9NhH0OUDKC4qPaMDxymgQ1MCIaiZnInJM/UsKL6nIA==","shasum":"7cf530eef95820a5f200f8b67a1643f572242a9f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.2-alpha-202010030946.tgz","fileCount":125,"unpackedSize":253720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeEiMCRA9TVsSAnZWagAAx7QQAKPsdExrEaiO+FNGTTzt\nQTLw7t8Nk3aeW7uepAEOzgIz1NLb9d2YbiUXJ9AyAPV0uWe9pAAGkNRsHMn2\n/9IIsIMVfUa0W38iNOdHhm052Szc58ZtKhoYnTEl4q2Re+JcdTvWJMtjx5Gv\nfFzbwk6p5VobpbNMWgJ8RS0PWK8HY/cmMxa8G99gVomPgNWhrWzco3e0AZmx\nMsMdbd3uI2PWJdyDKbIML7GEnqC+BudiWmOvAFem5IoBiOz6hWpcvotTxbH8\n49dDeq+ibi9erDc1TQor0eKb1BbUGzAKS0cUNMGcWspIU1PUC80s9ZWIuvsE\n8ADUMxQ8+AVH8opPMn64DLKPyJvGSmE+xAKR2i2w0i8kDg/4Pk7S85ym8BKa\nkiZHEPBGkhQoDwJQfb9BXSZl+8Ao+c5M8uPVOXb1LcA6ka0+7xbLrheXVDBt\nRFD7cfeUJ85wUiy4P/sWJFwTKiPmMJFOEa6zlNxIosCSPECrISX8OaiKlxCw\n9qBKR6lRb6OrJtOA78QDvUtGP69tn+6sWkjOjhcOVtONsi6nl0uC0oxePVH4\n2BmvNy1LfW+UrWU5yldke7GbyjkPWKHpZ4i0n8MWJkTIb4b6onkIkcQuXjlL\nSJrOJnzGrtz1TxNRGD4geJ+/vvNESNITT5mQpVxx69Nwo/BeJpxCsjYeDouQ\nJXiB\r\n=yI63\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHAKKK+ls/3E5OYy0iyw4isDH7PIrPZb3WsRCfa6KKA8AiEApHTBRaTOqr8EZBDNorMaBurJal1FVgpysdZD5wOq+RA="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.2-alpha-202010030946_1601718411623_0.6046477683614506"},"_hasShrinkwrap":false},"0.1.2-alpha-202010071355":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.2-alpha-202010071355","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","dockerode":"^3.2.1","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/dockerode":"^2.5.34","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","prepack":"shx rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","update-readme-version":"oclif-dev readme --multi && git add README.md","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"cea07d42c17d8d6a98f849dfa2c9ffc63e34e8d3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [custom repeat preset for bootstrap preset.](#custom-repeat-preset-for-bootstrap-preset)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nMost people would use the out-of-box preset or tune a few attributes.\n\nThe file is a hierarchical yaml object. If an attribute is defined at root level, it overrides the default value for all the affected configurations.\nThe attribute can also be defined in a lower level object just affecting one component (node, gateway, nemesis, etc).\n\nThe best way to validate your configuration is by inspecting the generated configuration and preset.yml files in the target folder\n\n**If you are trying new configurations, remember to reset the previous one by running --reset (-r) or by removing the selected target folder (./target by default)**\n\n#### Examples:\n\n##### Custom Rest image and throttling:\n\n```yaml\nsymbolRestImage: symbolplatform/symbol-rest:2.1.1-alpha\nthrottlingBurst: 35\nthrottlingRate: 1000\n```\n\n##### Custom block duration, max namespace duration and number of nemesis accounts:\n\n```yaml\nblockGenerationTargetTime: 5s\nmaxNamespaceDuration: 10d\nnemesis:\n    mosaics:\n        - accounts: 20\n```\n\n##### Zero fee nodes:\n\n```yaml\nminFeeMultiplier: 0\n```\n\n##### Not exposed rest gateway:\n\n```yaml\ngateways:\n    - openPort: false\n```\n\n##### Custom nodes' friendly names and hosts:\n\nUpdating first node (single node presets like `testnet`):\n\n```yaml\nnodes:\n    - friendlyName: My node custom friendly name\n      host: 'myNode.custom.hostname'\n```\n\nUpdating multiple nodes (multi-node presets like `bootstrap`)\n\n```yaml\nnodes:\n    - friendlyName: Peer Node 1 custom friendly name\n    - friendlyName: Peer Node 2 custom friendly name\n      host: 'peer2.custom.hostname'\n    - friendlyName: Api Node 1 custom friendly name\n      host: 'api1.custom.hostname'\n```\n\n##### Custom generation hash seed, balances and block 1 transactions:\n\n```yaml\nnemesisGenerationHashSeed: 7391E2EF993C70D2F52691A54411DA3BD1F77CF6D47B8C8D8832C890069AAAAA\nnemesis:\n    balances:\n        TDN2CNADENSTASFK6SCB7MFQLAYNZB3JBZCBLLA: 898300000\n        TBK7C5SI3NR3ZEZTMNXRISY6FENDK3YDE63HK7Q: 98800000\n        TA45K3WZYQQKSFHJ3DSEQTOO6N7RMBQUVE7H6MA: 984750000\ntransactions:\n    '16963_581474': A1000000000000...(serialized hex transaction)\n    '16963_580690': A1000000000000...\n    'MyTransaction': 01000000000000...\n```\n\n##### Enable voting mode in a node:\n\n```yaml\nnodes:\n    - voting: true\n```\n\nIn order to finalize the peer or voting nodes registration to an existing network like Testnet, be sure your nodes' signing addresses have enough funds. For test environments, you can use the network's faucet.\n\nThen run:\n\n```\nsymbol-bootstrap link\n```\n\n**Note:** Full network `-p bootstrap` nodes are fully configured voting and peer nodes. `VotingKeyLinkTransaction` and `VrfKeyLinkTransaction` are added to the nemesis block automatically.\n\n##### Disable voting mode in all bootstrap nodes:\n\n```yaml\nnodes:\n    - voting: false\n    - voting: false\n```\n\n##### Repeat components:\n\n```yaml\n# custom repeat preset for bootstrap preset.\ndatabases:\n    - repeat: 4\nnodes:\n    - repeat: 3\n      name: 'my-custom-peer-node-{{$index}}'\n    - repeat: 4\n      name: 'my-custom-api-node-{{$index}}'\n      friendlyName: 'my-custom-{{$index}}-friendly-name'\ngateways:\n    - repeat: 4\n      apiNodeName: 'my-custom-api-node-{{$index}}'\n      ipv4_address: '172.20.0.{{add $index 20}}',\n```\n\n`Repeat` is a pretty powerful customization. It tells bootstrap to \"repeat\" the defined configuration a number of times. This will allow you to generate as many services as you want quickly.\n\nThis is specially useful for:\n\n-   Configure a really large network. The generated configuration could be then deployed into different cloud services.\n-   Load test many services together to validate how they behave.\n-   Exclude a service via `repeat: 0`.\n\nIf repeat is active, each value in the object is a [handlebars](https://handlebarsjs.com/guide/expressions.html) template. `$index` is the index of the generated service starting from 0. \n\nGiven an `$index` of 10:\n- `my-custom-peer-node-{{$index}}` will become `my-custom-peer-node-10`\n- `172.20.0.{{add $index 20}}` will become `172.20.0.30`\n\nThe default preset `bootstrap` uses repeat but with just 1 database, 2 peers, 1 api and 1 rest gateway.\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.2 linux-x64 node-v12.19.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.2-alpha-202010071355","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-emvPFCOyYosxQO605YZ1QvtyPVup0wfypCBSwECDWfnTC9CDmf00oy4L6ZEcyfFZ1Mm1vKKeDfi5Khpq+O9KSg==","shasum":"79cf1d55240209f57374f3cc97e87dfee74a3ea1","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.2-alpha-202010071355.tgz","fileCount":121,"unpackedSize":266406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffcj1CRA9TVsSAnZWagAAWs8P/38FOEma1Fun0dzHOhXR\nCGAGMA1kfiKkaxuX7LV5YpwOLVBo3C0YH+PZtsqi6g7oBzOniT0C+JmO+yjo\nuZqiMWmx1fKzsHjKxc1pSOmFKKsuyGzqioEeJ3jmk18hxlzt3KXGAQdP2Z6S\nBoNDKOXfJEk8oXEU01G17fTWjKKkIhJjRfULzirJnruyJQCRtORPwKzMyLAe\nQq9F01KSa9cE/QBLVeLzLfUQAzsd0eZHXPTJ2sMZTZpOV2i/vxONNsSvmGWY\nv74CJ2idIZpXu8gOL17LBuWAsE0wF7t9LRdefH4LgNLgpOcfnoaXn8EbNHK1\nBjKvahkR3tC4CKx5KaVNAiYctZwGrqAlgw8YuJH7VYvVAdE+xMWTUTq+65us\nCN53Q6+/I8GOMof7LGpbGuI4vW4n7vXL4OXPZqqT2+ZapDHVQhhJ/iXweJR9\nyQx/cQgZORBSjKx5Rf34X0yVCt0u9hzs20i2goiW9mA04JELNJTuYP3giomn\n+MaZFZvWFtcoP4rKkGaeDWC9I2/ma/KITTrD6n0hdijEL7NB+TaEWNZxoHf5\nYPF04gB3YRiNUEM5VyHO0HJl7zer/bSFCjb+Naj3iOACNRlMinbgEsLPuj/m\ng4jNmcd0/uefFL4eYL9wZgT0Ythsmk254icPnXWDKkI+ARScUCxxQLKO454K\nmeFF\r\n=LDtr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHVVPYd6IlCCeGLZgqxXO30KohEUp7Jgqok6Xo4gPnTAiEA9gIdiP8eQEyj1WTFDA/ej+MvfEIDXT+DFsHzHPO4mHI="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.2-alpha-202010071355_1602078964582_0.7299782362204215"},"_hasShrinkwrap":false},"0.1.2-alpha-202010121605":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.2-alpha-202010121605","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"af6e87ebfc9ed7658c20536fd04abc96fea022da","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.2 linux-x64 node-v12.19.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.2-alpha-202010121605","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-iwbDWDnX/MXpTYRhDhNPnhABDO4DAYbLkANAT3DhObpx4vazaB1+J4rc+x3WlI4w1W/ibkA6TLQOioi7GF/XUg==","shasum":"993fb58fcc37170b763cbb645336f18645da84a5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.2-alpha-202010121605.tgz","fileCount":125,"unpackedSize":271177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhH7cCRA9TVsSAnZWagAAYzYP/1pOfbfiTMZeOQOALiqj\nSuMw0A8kWyCikJK0/0z7sA7wEswKRsGWpvgiH+cQYUqB2MRknsJw1ETs4y6H\nE916FOjAK03FNSnZpysL21wnV51Rp1B2+BTXzuRKs7gGZXBm8AKrGMRzd47Z\ny6MwnXAvFKbbYMeYwOu4kZt/Mdf3b0R5daI+5dyrEEXDBCpW9iV/+lap3FnO\nzodVAEuXveScehiPdJW/3kKoiS8M6nb9mjG1J6+BGiEQbxf0N0RZIs8+8/tN\nxdn4qn5hIdL5i1GIIvGyK4mnvIqb8vEfINlaO5k8GpoA4V17jRX4cKOaI6mo\n4mJ8TDxY90kkCKVh4aMYL4bSI5hCkStESitTz1y4nD+A3xoPM2ykR2hG6jJ6\nDfn60YKOBR7nF6x26eKQsqMqo3fEI06xdyreBLpAH6QJOzASe0b7OsdDbbwS\nzCSRyb98ZFj+TsA7sWw+QK5Yi0xwal504b60cirQ+uuf0kbUvYjUN6p+eBQd\ndY34VihugvCj1tGJOL6u1dNa3T3nvTs77v2YhR6bSU3g9vNEeWcIQzlXt4Cu\nmd7yaU6BHaCQbktoM5SC2VHeU6FPhJdj2vy57xCLhcwgB+IXUfFz71E5nbbq\nR7OdiRxrXfzhLWt5ufizNmJsk1mZIZmatysM9bGVXNEEo7u8zjXT+OS0qhbi\nJlJW\r\n=MDVK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEY71WiHaHgOpT0HGIrEFQzL7rwSKPf3kL+zatAnivQGAiA1MZzYnD4mCdZ8fAGntp2Ei3mmrCcBQQ2DYE89lmybSg=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.2-alpha-202010121605_1602518747425_0.013890069004550254"},"_hasShrinkwrap":false},"0.1.2-alpha-202010121756":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.2-alpha-202010121756","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5696e17a59c4d73740be80f3f4474d129f1df9fb","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.2 linux-x64 node-v12.19.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.2-alpha-202010121756","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-rmkzqm7K3i23jIlt/9n3ppINaXXQTg/8oBIjpG4voIMtTgm2okqnTIU+zzRC0+Y7gOTen39/EYq999XBviB09w==","shasum":"d9ca2d25d97f69621a17bebc3cdd54d862bb8799","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.2-alpha-202010121756.tgz","fileCount":125,"unpackedSize":271136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhJjLCRA9TVsSAnZWagAAfrIP/j40EiIbxgc68fG/H/e2\nArMaIEWL2tJ3ZZmmJA41S8xYe7ey7uol3PX7vpFYpopdvkZoBhPLAyO3geyf\nYEgfpC0rMwbWZtodM+4vXIaBSCXO3t6frx0KptG7SCpbI3u3amOQ325bpFZ4\nZQD1pGa6tbtevr49IUdRHEHQ0A4nCTeXr6x/+bUboveqorqV2vkc6QFaSWv8\nQQ0feNv1hocFhJDxP/tjEZHg8SEMHZxuA92v97Fk+z15hzQVoVUYLkVYpvC3\n90KMSh+ZUIymao08amBYBxUJ6acopdH0YY0zzphDDkag5IAslDXoFRv06qHj\ntYsqAkjWcaCddUosVZksdYQrONy3CSpnFImylTX4Q5auVQat7M3d5MszOYdT\njmQ53Q3h6qYtIj0ByCQpfjIK1kj8uJtXbE+IF8YtfCim/NwGMU/L0UE6WokK\nr5scf3SKJ/6+k0TcF11iNkb5uFcydmhhsLceV+m+/PFHhr/uU1Q5FDoez6Qj\nWA5tQICYQ4fwwPUmbqdaBWa+9Brg5gxIg/WE+ZlLrXhRUSjxPB9NRtP5ypl4\nU+I5CcpgjDEgzdeZXgBYaKl1pkHW5BIFaaOl3bmgDKQmKH/RmMOOVZaPnk6O\nwOCabGsw/USPEdpXzRYEjZxJvSuW1Ed/7iwxpYizc7nl2zxfdnDpGyZZuPLa\nCs1E\r\n=9LpM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSfWsZrcMHmXfOSSzsPFLPMPFcZL3h2lya8YU4bT4qkAiBvCHDBfDpdBYBSSVqTaMXK5O6gSoo44Ys3/rwsorocFg=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.2-alpha-202010121756_1602525386549_0.7813990709498091"},"_hasShrinkwrap":false},"0.1.2-alpha-202010210210":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.2-alpha-202010210210","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"875f936e7d39a23298ee1a0bb5deee7e123eb6f4","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.2 linux-x64 node-v14.8.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.2-alpha-202010210210","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-JZYhZ7XIHkmJFDYklMVp+3YGekVnWYJiC27VqHoVrSjobYE4YHNnhepzgUctjrIDMSnRaah4xRNw25VHsB7FBw==","shasum":"53cdea6802ed9b5b29e5fef2b6ef4654c143afb8","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.2-alpha-202010210210.tgz","fileCount":125,"unpackedSize":271136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfj5ihCRA9TVsSAnZWagAA5mkP/3xKkqRnBeCFSLSJZkFC\nVuj5bJiIZAej3jRW/gkZiTHfquimy759e5K4vtOyLuCdkR81AlcUMf69Duim\nt7t7k5k8kIL7PgaLRSyYi+T3CcdIuhQERZ7A9X95eVUJUaedTO+9CaRt9SZS\nO9XQe28UyP6WdcDF+Vd714v+0FYtk/Us70RLmPqH3GpjMJNiE7EwAINII1Fn\nl8ZgarEkXZ1KvxcRgm3ENyU6kBli9H8GODXF78XtrtA1OYCwip3d2dMsr8nk\n2zUhETE6p5djhdTiLNWHC+Q+XlvQzkk0wPawYr0TaM67jRqamXLJq3liY5T9\nZUfGbyk/rxdKicD2QWHQHsUpNCyHQT3K+fX7hSiyhlS4NJJu7ul1/7HK1vAq\nJL7M8Wnyoi26PEecW9s8p4K2sZ5ue7d8wyGRE3qluk4ewZ6rVGvIXkdO1ws2\n55FGE9ecLAe9+ud5loEeO7pvm0ugHFvghtpU6Hriy4XzF6HaWsvIYUGwJb5+\n/hW2jLtNYBwfiNA+OPmJAbRMX5L7P+kjSo8BL+FFZZsgz09y/lckv5Y8s+s9\n5NMkLihmyQAw91CvGAw5oJTgBMy1T/IgSnPWcIpJHvsQg91UJz9fSIauPYXD\nhFN0jpWYe/5qOcKvJ/jTYYgAmrvOkBytrEpDn14fq5hVWkFjBuoJ5BS2874F\neyQt\r\n=69LN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuhlosUmW1lnRIuKMKS/T3Htt16ImWgZelzQl3lcmxwAiEA0+LCPzxc9PibUoXVPPlAbQ7aZuBYckAxKT+cR5nXdLw="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.2-alpha-202010210210_1603246241200_0.45041095049124613"},"_hasShrinkwrap":false},"0.1.2-alpha-202010210221":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.2-alpha-202010210221","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"34e26b2fcc3af7d50d518ba7639f400596e8afea","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.2 linux-x64 node-v10.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.2-alpha-202010210221","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-SCTWCvBpNi+MmHEcz9WaXCsbsX4Tl+mL1sy9gUHTzYVVwuIe01SMD4bO861Yq20kIzqg9I8Y5/Rfud0RYEdhJw==","shasum":"fcf0069507281acc4630965fe78a06352f4f3b27","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.2-alpha-202010210221.tgz","fileCount":125,"unpackedSize":271136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfj5scCRA9TVsSAnZWagAAOJoP/3BVBpmGaWjePsXqfRTx\nHeJ2iMasWqZKDaLsvsDZsOMv49NPEs4lvfI8IYpMYPqslNHGvrl7zdSwZ8hp\n0R+mB28LQLSOzNQV3TeAWk+ntow/rpCF7EpB/E+A9KVvuQhTyzDbJQkYG8Bm\nBxntkC8fS5erWvrk9LPLdzHPe6zf2NBkLbBK19MrvpxO3jHfImMACIJYPb17\nrNr2uBZL+kHAQtqnkqxeRzEVBx+icYrmilE5ydSH91eGM2ZHmNbh8l3HYC0N\n8JdOw4O6I9yHeNG2hrAHXLikvgbsYEtnVNh1DXOwa+hxdX1flZBcuFQquWPE\nZkstsvKiEOa90u/ly9e/w1SzmkDYuVht/xVTDJDQPk+zm9E1OYw9Yrw6Z4bP\nuPr1Ywf+7V9w5TqOuazxRKAOcpJhpL9Yp6TRW8j3oKGmgQIGTrFcB8vzGX74\nbKlTwHbpJOfaozAmmeuvx/HEhRMqQvuxNCTyr9aYhb+5FT1PSy2h5uanKwUD\nWEJwZWTTlCYm7m76L5RCuxHGeR/jvLuv7iQoncT3A6wS2HGmFqaQdfyYfpV+\nMJ/mSSrxgQQKdnKLG8lxsQnykz1hMAHLUKBS2I8lSiqQLTMlUrQRSKbLULmI\nTUOEdowfv36ubHMY5MzkSggN8r69GOUuEriNCZGNZRCWrh5WvKLJp42XdRRu\n8fqq\r\n=4Ezk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCBar70MkQjwg6mMHxQYNpW+hw2IdxJ/oucaMgcmdY4QIhALyCxGMZ7878Zmt8YLbygjvIs9pbv4FgTG0An1Q7tU5B"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.2-alpha-202010210221_1603246876017_0.009750071213763922"},"_hasShrinkwrap":false},"0.1.2":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.2","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"13d3866a89cb69daba74875f9c668a42f60f5102","_id":"symbol-bootstrap@0.1.2","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-k32DS4ksBkAuSmGkGmhyTfoMU1GKxB15QFlYh+6fgbe2GDWg+YeVnHtt9GRRaSoDniLM9Dg1PW42b1MSsLkhZg==","shasum":"320f4ba423c0dcf02ee4c01417e2d58a82582cff","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.2.tgz","fileCount":125,"unpackedSize":271077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfj50NCRA9TVsSAnZWagAA59IP/1rYrYeHTEo18HKokKWJ\nxkqIIkFInrG1Nucs/jqcoecHW6gZNfhsUPC4QbZGuJxN2P9QFRkUBWlbX5bM\ng+Qc/1gke/CftzS4GhSLYIP1N6GfDoThu88LiEAxFeeh1R4HMamGV1JeZ6Ow\nkJ8bJ88NuKWFMaK9wlAKUppjtCkXV8PmtTluMeHalGw5PBXt1S0cIBAPp0cC\nb4rTm2ExR4Vs0jtdiA+Rq12BeKDnQ0fLJbs+o82lExA9sii2TIcx/sJ1eqU3\n8xSQ1Mah0lrPjF7Na6GNYggSVogQ6C080JTAAqmCXjhfwrFD/sah3luRiEou\n46fzvl/REnK6OESSjJUQHd8r0595qor5bBAQRL8DzzbOIiC6qsIAH38gS7DR\neSQFStJSAPfQd7Dac49IJA6hBBpvQnLe6e10EqobQjjnd13PnSlnmIc7CBsf\nEUMQh19MafDgY3nQC9oabgbLnBzcccJStG1EHzt/ypE09S6Rgb9/g+jL7I1w\nrO4HUfFd+5jew2y0CSIUGZGcT9kKzpeHTZaCu2vpmSCLDyCxFVeI5MIIlFB6\nMqQ5B5x6ZOQxaTGxG995wwjBEp8GPlfgN5ELc605R2AGRXvzC1l6z0F9u9lo\nljt2fi92jRzyRHHO8sNpEtFKSNwebHd1ydiFBuJdn1CtJ7rgQ6DMkiVMLqnY\nfVMq\r\n=KKAv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLiIA92cgVZbDOV4hF59QGZAjmOcIbDvvou0xyBfjMkgIgCGlylwHREr6fY2m5jfNaqCj4sbXCwX194WOQOoaqVTo="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.2_1603247372962_0.26739774222715007"},"_hasShrinkwrap":false},"0.1.3-alpha-202010210235":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.1.3-alpha-202010210235","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"aa90d10890c21c5764d16a68c1a51b9f4ddc6126","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/light/network.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.1.3 linux-x64 node-v10.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.1.3-alpha-202010210235","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-j49rwWDqvtIEw8qh0NpycRbznqv5ftlio8PYrTm5d7lytPsZquYJR4+sLRu74CaanLZimkxrBQJB/7/TIN9eMQ==","shasum":"137e23eca7b9902417ec1dce51340b5ace1dd64e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.1.3-alpha-202010210235.tgz","fileCount":125,"unpackedSize":271134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfj55xCRA9TVsSAnZWagAA2uMP/1SXHrHn2kYN+UxhOmBk\ny6zjsPwKKs8aUWqEqvQnwwL7sVr2wYgkQqlRW1Qxchpnha1l7hmTewaZ32hW\njI9NG2uR58SkAhuNYmzcO4w9QnPag8WVyxZP9QLqQsE+y0gpv3wt/ht3QkwW\n4qAJYpFxVeTNTJBfHKhC8XJkUUIhENrCmqimGi9YQBT4qfjF4R1+23YAzZzX\noRfXKkdva4/rvC7FCh7Bh30NwtUmWeU8dy4iuSgjvBPhm8R4vK0lCMwfKmAp\n50KjAUFpAl6OK30fTbZ3avzHudOqJUvcsCEh9GVAy7RGhip2hS5bq7E/BUjV\n/JMNuTQf2V7U+Z70xOdB1BLcQv3fTEWQMKEs2qOfinukoy9EanvgY0nBSp2B\nIQOl/wBTxKAkQhfdZkxjuu8YNYCS7RVwfT3YxsA9N/wep64F+sGx0NPC9X49\n4CV5FAMxXf84ZsuBEBqDMyHR01WQNvJBtPlOvM2b3Aulnva4LWgqtWm2qGpp\nMiJRz5EVEJS73gC8i2GqvvExBhbF/cAxj6M5TAJ8GcDYyvKf+RWYXkWiK+20\nUpZRi+SNPdopgp5jj9qppMpiPVZgMiKzJX+cVdEOsGV/tcqVa8sy55XeIGHj\nI0asorDD0yW2h4/mn3ptS880zN3CXfkBZdkDxSp36rrvcaIcL77LosPFysrf\nhWlC\r\n=H968\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDyiZmSPGc+Yt9IcMaffA/eaXF/LdbYn0W+TzjPFihOAiEAwhySxRpzrJpFtp20V7wKroMqXZnW4em9G2UbfEg+zvU="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.1.3-alpha-202010210235_1603247728693_0.7224179320886728"},"_hasShrinkwrap":false},"0.2.0-alpha-202010211158":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.0-alpha-202010211158","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d6d2d34d2deb1d02f41e77b0da9ad7dcbeb11631","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.0 linux-x64 node-v10.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.0-alpha-202010211158","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-xxr6zIzTCoGoQ0zQjNwL0TPyb8xaVOF2w6yLO4snzQ7+/O+mbfmVL7zPxjcgkdqqzO0zAnd8HY6xiAoEDzZJLg==","shasum":"9e372a35e1041d046743a0d23b78f31e50190cd6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.0-alpha-202010211158.tgz","fileCount":126,"unpackedSize":274646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkCJvCRA9TVsSAnZWagAASS4P/jOBwbPBJFF5PZrNkYqa\nDOB97YOg/v6UXK5hRwfrMAZoPk6kQNsfKynmB07v2KCPVXR8jpfaqgazDNHt\n5zR0LzmTcL5G6xwIpurI5qipfgfELcC/OolkxgLTDaXbDy85yXexL/pT1MNI\n2aX874C2MFLO41sDVGUUPCxncTetFBcrI0QCsgPrWuuYfQPNoAuJTCXQVOd9\nGkJeIHK0DJ9ZmpcgzDARAivTXyULOpv0fQfFGnlzsvYdVFIey+uPJunO6ehV\nvLVUKIymJsP8HTCX5Pg2tSkazDo0uop3oK7Zn/BXj3HWMGXN+/WzuYv0WDnJ\n+e9qW4VzcN4eBPBTTg1N1By45pP54Nq5era29UK+CYZyqiD8xzZSmj16VaBe\nMVcnYEt20UiPjfwGownfSAMEOM5S5HOC2gV49ZDBKfbQII53PjWIH3eHrQPk\nfJNpSC+73hz66MXR83quMJP/aYRxulvxQAGrKaLOUFsxUm+pJlbSxE0CqAw9\nuKnfX0Vs2hnLgw/C2dPiew/v6kyr0gVbKYxebv0gYJy73YYjhQhFY4DGgnsg\nuL/2SvUJZ6aaXdRvls5P74jcNyz1Gt9sECrkUpbOYXV/2oR1WuIDEerty0os\n0vVrXIWYj9XuBDVglYNrLQhgsFSgvjmFNPX5XN4ZPU4J/Y8K/5Okxe3t84Ei\nEeHx\r\n=T3ec\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID0smM45/5X18AcXNjwHwTzVaMn986ZfmSfcbu5MLh3LAiEA45TuDiQ2iCmcCCC8osRKllDc4AL61mxomhGUwZifGZk="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.0-alpha-202010211158_1603281519275_0.21838296439281035"},"_hasShrinkwrap":false},"0.2.0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d6d2d34d2deb1d02f41e77b0da9ad7dcbeb11631","_id":"symbol-bootstrap@0.2.0","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-ON5eg3EBWWKMLXo+NxOgvEkjw/C53xnwQOodJOOOdoYyKxlHjcT8EiH22RVa6QFVZrOOm3KUMCGfpQMzawXFJg==","shasum":"fdbc3050a01accd80d7b71e02e921862202022b7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.0.tgz","fileCount":126,"unpackedSize":274589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkCROCRA9TVsSAnZWagAA5TEP/1fdKK/61T6zWprCudtx\nCno5pMRmnavvlQsHBL8PNw8OgZ4bbGfqZPmm8fa0s1J7bEKWpjGFcwQTU5rk\nAeWB4Sq9KR8wUplEnzSw+2szx0g9uNF27UdXw4I4qBL1BvkBBV0IbezZK93f\n8nwDMfg0IdQh4Mf6Osab322am3nARh1yeMiFNZP+hOaz3kHRq5M9reGXB/0T\nzhRNPrelX9QffzkXq9QP4/86uoMlS7g6jqx0dsw0ubQ47uduW6IXveQ350g+\nrTrF5Gxs/1wxJIJzZoWd1aKOmfWkuARiVC0EVd9CesP/uohhBWoTffF4lak7\nwH98wAf68RBDVPwM9O1y6aVwK1no7jhByCqvkWxEZctshTUElVtZ9knb0cvr\nO5SPIdxPzyJuB86THh7AOOPNFaZaGFgGxb7VkaU6PRbffqgZJHkUZwd8nx79\nNFk27jo8rKQyEwRWbAJXF55NQBukHiE9EfdAh76b6io9TWvjwryFJ4nPzrmM\nOZ+Dn2cGqI9FMQm8JvKLTtB09UAs6m+MW51QsdnwneaohEF1Iux3lctgICNH\nrMbC8lE7tPmAnSBLLRvkrzt/c+Nd96OClYmRrCV7qQsgG7Vv6qpl7OWr8C64\nLCN7yumBfaDxeZFW0QT9kAWF4Ls0ruApSQ52IzyqodnZP4DIQU+e9/gzHahW\nnsOO\r\n=63lJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA3oHBMzxGAp+A0zWgdb4Fvvy7wFDI4aPfFL6j5DBuXbAiEA7cqZ52/PeUnmDK5yysgSTXFSPzsXBKeomyGxf2DHKY8="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.0_1603281997836_0.5642393477252208"},"_hasShrinkwrap":false},"0.2.1-alpha-202010211212":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.1-alpha-202010211212","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"4ba75ea6134aa5b6a411ed223fe86fe175f5b6d5","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.1 linux-x64 node-v10.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.1-alpha-202010211212","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-1v3g9UvTqavJOGJfgm1nGwDqBtPdLT81oMgaojWbnCWKl4ihIF94AQSBGqZPQkDSUGTF7taF5pm1eBreppGWsw==","shasum":"6517ed4534612cf5bd7c7e2c9a52213222a638af","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.1-alpha-202010211212.tgz","fileCount":126,"unpackedSize":274646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkCWjCRA9TVsSAnZWagAA9eAP/jOzRZGHgOYINnZBJaCa\nJoCfhbnoPtZQqEx0QP6+eUZf1F6NhsB0/wD0vKtpqI2v6TRk+HHGBOTJ+d5Z\nUUTe2RWLnlJbZsxTLbqFDHjj3ssbBqMRnvS+RFnV4QaThJndj6a3lIk/XWmw\nclR/XpZKPLAUPoWBjfGCr31GD99U9FoXciqywzp76t9Y0EEPT8GB+UTrnC3B\nt7VU6nHGch+cTTVIjoMgFR2hz7p0mY07MgHAa+xZwBPkDNd4oGyX4Gvqj0MV\npUTn44f/g9VE4cFDBbCc2waE0SkrJLlMgmaW6kTGMKr9t6IeRkSqPVjx/h+/\nMM7QfHwWs5z+7gssLtPoVFdX9CSy32ouZKX2wmeah5pz+kea8nHApaHx4jl0\nEIJLuZjQ9/DJHXRo/jRabbqJB4sSdrCXVhl1WOLws5bWxFueoAIS/s+vbrRL\nb0PLziqrDCLJY9x8XPMgLfR0fohlG0yrqj/5U5XqPw/GKKQeai9z9TjYyPMl\nph3/HMMCE2Gqgk0C4IJtvAg7ijRItJ+kUSSHgmvyEx4QJ4ePWki/iIRUctF9\nuZMDNr6RQ2lz+1Mj4NxwAf9PV/pth09GyYKj8lQYKhAlbSdoTPcA6YO2AyxN\nWAO5gZ2qmjS2uUKwfxfOHaAr7VEu2aaE4eXOZQe97wGTVvBslFa+c2YZFYCQ\nNa5w\r\n=cSBi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFfY8EP8cEU3qQLkf1G0n0sdzarI+nGSRXonq4Ubni6EAiAIb1cAoocLxfBS+QP4p5pHkAtHqzrpwQwjjoFGjw0abA=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.1-alpha-202010211212_1603282339361_0.6717136964050425"},"_hasShrinkwrap":false},"0.2.1-alpha-202010221020":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.1-alpha-202010221020","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"47b2876432f795c13f8d7e2e12e0e099d54c5112","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.1 linux-x64 node-v10.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.1-alpha-202010221020","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-lAQUW2w09BIXcr9jTf3x1d1nOxeJBAW5dYxOiquNCfXx7nztdgnngavL8ay4hZN++8+RO7lrS8gQqXhdxv/yfg==","shasum":"43df81771fb8899d35aa49e370cc1ff4ded8b8ca","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.1-alpha-202010221020.tgz","fileCount":126,"unpackedSize":274646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkVziCRA9TVsSAnZWagAA8hoP/jeML10MpPiSdJOvtJG7\nxVSYMqqIC1+gznzKO+ZZLeHbkR6pQh5F1bxOCC+adjrs1AhmsfKPAXGWRWMz\nRsNPgWJ331YjvNXDcSrD3j3GBMzat0EG2boUq7ULR8SOgKZvCXuh8TPFBs1E\nq9MUXAVGLK3+5hTFmFjon9Q+JLEIdbrpfGAwpQjgNv3WfnUGmi3hY2vbNwu3\nojFy9WZLVmfZhTwrYccpETNXRF2RKlcq5sEM3xI5iz5FSo3ROPtZHG/aeN4J\nuDj7l1MFOk/1e0QlU9nwDcV5pZyURq+YhelrQ01ZqBuIyZZKpEZDMVLZ2t6E\nVcpAPMaKMKRWYbSJE9+7YrV0QyOaRQCKG2frghWN0N8+4FwBb1IcTTbjAIe0\nwW4fRN71b5m+LsGTeytWiLMsiq2CdPzEmwDxtykzrPOqjsB8y0X6GGupS6RM\n7zMqNslPcUKaD+9gQhWpujEJrV1DzQlX5jKgck/dsrUHAjfWQDDqbNDad1kF\nEqhjaGD2OoJZIQ0L7WH4hnx2YrosA9JOPYTirTclbS2o7+u351Zz13VZWwiL\n80itoc1OzGjtlfALZqNhVbVyCqufR9cci44saemOFRUMkSpI/V6Tfp7gjw7p\nbooFQbzzpur1/HH/PeMPZuPSEebW5BMfzLmhcSP+NcgK4mLKx6mxltrzC3vi\no8V/\r\n=9ilx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDboQFKhK4jwWLFnjiYOsDftdA4/iqqC8kyHu1w2Ao0dAIgYRu4Bt++hknkpH5QXjX3j+kj5IOb5tGFpt2IdFgFdCs="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.1-alpha-202010221020_1603362018254_0.6287075497736749"},"_hasShrinkwrap":false},"0.2.1-alpha-202010281951":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.1-alpha-202010281951","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"92d6e6eb0d4d048cc4e07479e2118abf6dd87f50","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.1 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.1-alpha-202010281951","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-ne7IlxHCyQYvqiyZIYAwxwNP34YKj2pnN/R2TpK7dtkgynS1ZkbcmWtx5hENdWvrJ50d24DyWJ+zvKy/HsSnMw==","shasum":"01566956f01565ec97ec4eab6d7ffdf35e480418","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.1-alpha-202010281951.tgz","fileCount":125,"unpackedSize":292660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmcvbCRA9TVsSAnZWagAA4RsP/3Tehf7I+0vStRXU6sTq\nzY8tvCUFXb0yXwPambv84FANRJ6XwfxsKKTeWzhfcP4N2bFI+pid5r6xYZD+\n/abxc6vQIpB9NjemimlchgAWcA6AlGWS4TVhaFAt8zItzSHDbohoQA6e2DY3\nPTs3rBMBEibVUlRVGswjCtA9/Ugsyp23MgV4e9Qiw8/KNF604AAO8byD6K31\nIj3tlYOmatDRCjunuTVzUsaj0mdXZUSBbmoYPmZYv911rCfbVwr8NWjvvLuy\nQPOTUljH+lz2F3ZVHOIcdQHJYnC+rhJYvl+J/HUqAcnM38C05kQG+8cr210R\nSQYzo2d9JKjxIjQ/CmULlSsXUJhik9zXc5+HSKs3mf95huDEvV/lV42g74Ky\neY9Qy+VufBg9TVtMD8VALqa9vKqte7+rXqLayvEjSBYITIplFgvE7Cn/BvNn\nfBK3KRAvVxV3Hh1ULnORhtPGjciBMde3I84wfLSK7B07CG7vYl2MygrJarOw\nVkEHsWQQKz6JbSz7lbrkeO0xEN8YyYEgq/ZzWNCfkfhZAtDPzes/r4GnvHMV\nVCzQiFrRMKukvJX47FnznqalkE/Bi0v3GdhhFeoe43hm55IXUbNVBtQNhIRb\n9fDmKfBGCVAzyEjqGFDU75ue/RQDQ77AiaEC1E6yxo7I5FX4o1tUIDI0D8RE\njfRd\r\n=r1J3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaCRb7C6ZwUsaLUAX33JIkP4hj7XPpmh3ix19nKnUTWwIhAJbnOUyg5OAWWVZKCctMsc2Fdp4mQ71VJFpYdgahiGnL"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.1-alpha-202010281951_1603914714789_0.4571111474585414"},"_hasShrinkwrap":false},"0.2.1-alpha-202010301106":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.1-alpha-202010301106","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"4c5481335f267da5dc0344697a41653db8e28748","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.1 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.1-alpha-202010301106","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-kKwQkFF7ghyouRqURWC49tGaj5HCzVU5HOmGg/cwBISfXjiA0W/yy3rfgkak1XS+/MTR5oZIPIc/NIqI+chLng==","shasum":"1cdfb8497a9ef6396df631304d81610eefb61d23","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.1-alpha-202010301106.tgz","fileCount":125,"unpackedSize":292667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm/O6CRA9TVsSAnZWagAAHWUP/2mFjqGpXHqggRIYDk6S\nGtrKs3m5sZB27rQuNwEpBvpEvAZaUS6pzPVGRNkCY1zMtW/gpOF045nJ6swe\njl+GubwLKRdxOR7bCEagnDSWeNRbgIaVYHWnnxttM+6kMh0X0QHdd+7635JK\n7f1RxJanPoh6IxssqpKTf3kuMDN7KKkV9DaXciZct5rjYMEoNLJFXuUNbHf9\nL73jufjZwy/iBz8SejAKM5OJlGcQ2Hr3u17ZlckGx3YSQ66EVe5uTBfuFcrx\nRv898uILo59sbYt2OtjayWIIj2rjIsiJGGBf2D2ThWyIS+0LAM8wVCxmWpYx\nGtk5Fm7C8MjKWUAbcdi9SnotGmYpY1xtQ9HdDGz4F3kB+yCw5dlWBpbMEa9Q\n+mqFfWNJs98csCtZI/jmMlIgXNuSUY4bpv/LKgDKzQ89j7XkBW6bww+ZK0BI\nkBwsJTS/0twKYslcsif0r1Zb6d//Q0btU9PNj/qmJ0u3Pn49yAaBSx23eLI7\nRIkcO7+S0brhEdbcwS/kVNnmP2+kPPUb5STHpAqX1SXdY/3pRIhheo8z8K14\nQkkW+vv/25JyPmGo9850vnFGy39zvR185x/Z6paLQedm7Y88vKb7Q2TU0O1T\nzKKj940GMoQk0NoNsECveBh7HOPapPEjyEioXRvy8Vt+PcQeB7Q52707cJ5q\nCrVW\r\n=tZTL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/4xWT/PDowQL0TbF8gWZcnrWkQlx9a4NfcMNWMe2wJAIhAKuYbnrgY4W9ijJYcABZDE+bS6RHy9tRsHQt262wtEOr"}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.1-alpha-202010301106_1604055994145_0.9430721004469222"},"_hasShrinkwrap":false},"0.2.1":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.1","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"bb6a6aa93a50b488acabd88a27558681d47bd996","_id":"symbol-bootstrap@0.2.1","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-rMe0BbuPcm+AfeiaS76T/0razR0hU7eBKmYkOutZeQt2INpn0xqV53aLzAk2AklQdi/tLiwX/etJn04O/wH6BQ==","shasum":"6c57da6397a22f332305a9330fb79e7f38fb5d71","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.1.tgz","fileCount":125,"unpackedSize":292610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm/7jCRA9TVsSAnZWagAAQckP/RA+WZBfNUEWTKq3vSrT\n6PzrDFzZ4XZiepOgOC/gcRwH9GZ9lO+D4kSPAQGsqV5b0v6/t/uSM4ec2x3g\ni3or6CziYwyPo59ouP8nwrqnqLiYav4APLK59V8pp8rrS3PJmaPDkO0Jd6fT\nb1+SfwJ3Xu3Mr6Oqw2d4rMP/9M0GgTmkIF08+kv7yiEwqnWKLW/ntrSIMn4n\n8ePZz/f+syJnzPoTU2rGAyFFsu+Nhm04cA5pEHwEPmD/0qnxkM/RKIYRon7/\nV40IC43spv1M2a7mNBQQ4tIZAStYvqe2GgZjCiUbpBynd+oagKYfrnG2pDgJ\nAkmHCG9xpwM95Exh11vW8FeiH4wW7LLrJPGhEQdm0rboV3NBFRYtaY6U4IPg\nAfSwJwq4+3PW7R9JMhD6k8mWUFr+V1y5V3rm6tyzZSQBbYw0aiEZ7l5Km+Pr\n2Y7VB1gyR5TiTJxBoMWlrHtSWqzCiu7HShYMqDYFhu+rfXMO5Jfp/Ue5HOKY\nNcyPzg0VN3J2TcUT/yxQKcCxWzIx0IwHlZ6Rb4evy15SaADcG0eSELBz66Ye\nlffIQNAV8oocWZjH9PRgIf+jhfSNow5aadbwf6KfUoNOQPr1VDx8lC6tFF+8\nytKp0uyfdDdOm0mPxwOZuXMDRkdK7fcviEF4Jbe8CWxpOQxDYMTwnHhPlXeh\nHiR2\r\n=3bUY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFAEi76+YIe9gZs3ec4XVusRDCQYn0CNwhtdYZP2WFITAiADDCXI8woqcwZVsk/ReSYXbipd7xAI9kqv5FeFwpFAOQ=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.1_1604058851225_0.5990094661549623"},"_hasShrinkwrap":false},"0.2.2-alpha-202010311031":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.2-alpha-202010311031","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"04079ecc7982f7410632e711f864934cada792ae","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.2 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.2-alpha-202010311031","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-COqgG0qlYr8AFbq+9Yesi1z7RpSoOMx8ld791kT4CY6LmVbyenPhE1bOoMl/A9AKIfo62q4+u13hojDwetbtcw==","shasum":"f6c47e3daf7b3f2432581b8147097c7b194a72e0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.2-alpha-202010311031.tgz","fileCount":125,"unpackedSize":292667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnT0KCRA9TVsSAnZWagAAlzkQAJDz5veiruHneIDu02sX\nRkuqa8olYMWqV4spjzMz2sRw2PEsR/+C46cXPioj+jBwzIdIZCD3gf5QdaQR\nBLIGfPnHCj4GMJv8wwD30AUkTTndMz0au10Miolw5KmZpi4Jkw+4jH1g2kzt\nzzJNAYZH+tCEH8pHXfsyj4dWlSflQh353Igk0gZ5X+OrvObwNZh4Q1JLebiE\nmszanL0BjR0Q+20LFulSfGOJ8owuZC4ywsZHbizcDa09MPVeI6SvKx71nAFN\nxIdF/rpMQgAfaQJ8bXu3uKhpWJ8wQ+S5GrgyTZeFxXoYn/auivs6dITAtRNs\nSlyPVd05MpKWhts3vOAKOzh3eyxd8hwjLmrQ7M9CJ9eOosg99HaVc7FK217A\nlndKSZcb75UVLg2ydBS5i7l8JBAES6vI425gvExexoE/g+rxY25xZQEURXHj\nSEBULEx/z9WIrpq0S98b6gytUMP4kw10/laKNZo0jEEQuqaarZ1POV/SCskV\n7r1MsfDe/SYwt3TlpUTrpl5ukiZ89aoldHjazh2AVYVUEq07YZjCDfli7pjX\n6Of47LGIwsRxmWZKciBSgQwZ6jn9vqrdnaLYQIN9d3O91toVhQNq2sifBVhD\nt0fSr7THj/vspSRsrydvcPzMREIrzHv4B6H7I+sheJjFajGuGtAilYT88biL\nPO6C\r\n=CPct\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGFgDG2JCyLlUDFZF+qQpKbTJty4ZrOcxy2j7UKShfLDAiBOuGelA/FRSGuIymeGND3hdFs2UC1R7PSdhX9mAw0jHA=="}]},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.2-alpha-202010311031_1604140298483_0.3281473491847815"},"_hasShrinkwrap":false},"0.2.2-alpha-202011111002":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.2-alpha-202011111002","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2c5e0ac8f602a19dd7abc3afe85006b99fa8d95c","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.2 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.2-alpha-202011111002","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-vT9TRcJQj98abO5wZpNQICWtWahIq74mt5P528p+jwKu9oe+r24GcrJLYBRUm8z+V5M1beMyZ912C/NIkgQ/sg==","shasum":"dce950ab6f79714c59af4436dda0eef731b24ddf","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.2-alpha-202011111002.tgz","fileCount":125,"unpackedSize":293819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfq7bhCRA9TVsSAnZWagAAoW8P/3gteXGp0agmsfBuq+SD\nBNqq8AH0tR/pTZj2ccKLXdZX6vrJ7hQydCPMfnS3och2+yd9mKIwl0C8xmF2\n5OUFXBriJp9Q3CX0z30cyUp/KCMIxQphLWdehV8sEB4ExmLyzy8Z9Ngv+eaL\n35+wzomuLYIdi0gXKtue3T2Upl598uRIK3JkQ7u5NlwOvdRT++Q1EuVSbB6y\nsWo1ySR2jzPsKB5UkcCb925kuMAw85r2rCNBFD+5luJmtMkimRYryuD3nXIz\nW61mQs2m1P1sfgCfrA6CX1kDXQOMP/fZTs8gOLBnizzXyF+GZ1JnwW9jfj9Q\nqDl4uvSoua9+SO3Kpn8bwf2oNEO1XXOVpWZp9Sisj+iTYOHoiSgCC1ZCSaZ9\nJQ+O2dhjr7Lsiat5gKsP1JKvVDzWNaegPI8OOLdl/jU88ahxb6EoNfT7NuRX\nZw4atwZAdAHMr+iu6mVaMkI9LY83m90n9jNMXHgBcbRAZQCfDsXB3sqVAZEu\nxhJAghFpg66btlMpFG6j3b7URUozyd1nIhpe4Vt6wH+B8vAGcdiUZaRoNFk/\nF3WpyH0teCizh+s2ryWLTJeVA7zoUXYHWvc+LftYDbFQAD28pQ9kWSVmjpIL\nOzg0p91806Vm1lu5WsItg4a2gBYs5nTQDS6qEO7No2yWvBnSyR3wiqlV1+lS\neIa4\r\n=gjZb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC435i19I6w3BxnEb/12axwX1T/njOCxwvuXJRiz9Z70wIhAJewI9CuArWNhnxfnGt0nnQhyIsGzQAtUN4xlBcsiZMs"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.2-alpha-202011111002_1605088992807_0.5982055457621904"},"_hasShrinkwrap":false},"0.2.2-alpha-202011112255":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.2-alpha-202011112255","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"7763eadeea87d8b102e6fc70cbc35de3a9ea7ef0","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.2 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.2-alpha-202011112255","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-HtdPb++P59vzpnbVIwflydWJ4YQs3nEPZ7f2eTEbvTt9cc4HBmXgtk37jpJqQ+BK7IdUTws7D0scxRmqnJKihQ==","shasum":"adfe0f395cad006c5c28c9949c4d0ff6e157663a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.2-alpha-202011112255.tgz","fileCount":123,"unpackedSize":291038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrGvvCRA9TVsSAnZWagAABmAP/iCp/JJTSrtv4tTvfqRG\nJMR+h3E70X4WZP92+9Dd+ryPMIfL3S6GQtz49Ezu0sMxF+ziLmnhUJh8gwv0\ntvasiUlvwP+n+oB3blEjgr09/vOk/ddJFKCkbRVurF8DDj4DVQMG7JUj5PHw\n5Eg+D1wQT3tRd+JwG1pveGmuYRXOzrzkvwpS6W6WBkrFDVf6LT0fPekf5xO/\nxtu1gLIihNyZl9yPpaqSx6BCHzTFXruXvuELQZ6E3o7p9+AyyZq8DhAArRBJ\nWED+jQpisIYikvY80bRSMPdTFKlEb+mUZLFZletj7mwfORWO0KZ3/+uMR3rV\nMEM7QFQpfUVm5XSeWwQdUIal6bcXj0f7rBpaOg4DtrJu2JzLBGsxT/tWvKTv\noybn6f4QOa6XnqQwz6SJUH8RL7GVF4EAK69up7qJ/mjAuP4atgzUVBtpMNku\nR91F9UZmLBDV9wm8NbED7ZZFPnZ7MoChJA1Wjv4f3W51ZWJoyfo1Vc4dvgxU\ns6Q8vu9xhUsEY+i/ClICfzbZXpCUwfgMKcCJk6UquWRuWSFTOHMPaU9cV9AV\nxeWumHVIpuzIELwy1i6W6ZqFlncL1VSyAn2C4vVhKOjvB7Svr+50iv2+EPtf\nMhQjzin7WxyrWEbbti0Qrmj3fsO1MYD9v24Lt/eGXBQgwDXAOPycutMpaMWF\nR2Yp\r\n=JvrZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGYxVkt4rCVR56pGbJliKs9wka/snnao04CkOXmXwoZWAiBhrySdkDKqwUb1tqnPkI4tO4bMBgxExLgaBlsRXG2hoQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.2-alpha-202011112255_1605135343060_0.3645104827612593"},"_hasShrinkwrap":false},"0.2.2-alpha-202011191238":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.2-alpha-202011191238","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","prettier-plugin-organize-imports":"^1.1.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8c5867a8b9d6570e7b7955e793c010679d1202b6","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.2 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.2.2-alpha-202011191238","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Hj9rRrjCeAX8fKtOvTmTOt1BlOGzFx2GASUa/1FPc3ssV2ISOVF7n5MnecTRzEyxJRSi/WVULwH6Ul2EYGQ1zw==","shasum":"8cc705453e8b29617874ed6bf4da230fc2e227e4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.2-alpha-202011191238.tgz","fileCount":127,"unpackedSize":314840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftmdbCRA9TVsSAnZWagAAP0EQAI4DY22l5eviEv1PM4F0\nq4dLZUUWU/iVZpuCFlgAU2Q6Q4lUUI/nc67kvb2z4iiDVwF3W72xcM2TWWUs\ny8Xq3fsrPXXyyHRz8lICj7t5WhO39UbOiUwsz4SgwJPYkXiJ70wWV/l83m8N\n9RgQ1KSRlENV79KUb25UV2CC36oP4GHkwdpGPAzWDBvPF6lUUA4iINcB1J2+\nI/DY9BBU1U3Y8EXCXyk2lH3dwdiEmY20gSlrm6LeykRs4qUIM+Enpv44j+xr\niA784CfgNAJ+3jF81yRH/NcxFYKpB/m9G0gYcJjNSd68v2DVQIwSPDE9UNV3\nW6bzYp2ODsUAGtXpnC3UpdGelH+pU7QdnNs7Qp3Jv2PQmCoXqV99ulJOul3e\nCAf2yg/bua1BcfE9v46tBTok0BWwud7CdEKIIo9i1kX2M+BaVvvDtpFqYeOq\nI1jAzXFtneS9sc6O4f7bhk7CQ2/oHmOoUQfg86SJKDjnSCQBJ6qa3oudU/1+\nG1pBo9QGf9ZpSrUU6oR9+lrpvrl3gSjzq63En4Hkj9t43eVUJ5zUYICbR28M\nGQkUSGJAcG/bxpxjWj96difOWRUt6Qr0EprKkTMaTc9BiBz34iZx7+8o/nRW\nwQs/5iASSyLVFtfJwpMGDGrYn7WfPsMQO0v8lTnxqy9ZnbkxmBmaWGFd0TTI\neRHe\r\n=EhKG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGPiDq54pBjqxb7bSOrxPtVJqP2kSnkxZgYPslsK8MXkAiAjf4R2ZMzpCVdE8FNI9Y4ummj5MHZEjSacMz8VOlerlQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.2-alpha-202011191238_1605789531248_0.7376606955397542"},"_hasShrinkwrap":false},"0.2.2-alpha-202011191320":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.2-alpha-202011191320","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","prettier-plugin-organize-imports":"^1.1.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.2 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"bbe559536ddc8e008de4268b00d20d9a044ae007","_id":"symbol-bootstrap@0.2.2-alpha-202011191320","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-coRlmGZJAN+ZgGXv9Y21iH2L4by8p0ejDfQhj5CO0uyPLshUhPP24+1XVtXPQRPfnwPwFrYB7/pNos9xj4Exlw==","shasum":"edd85dd524dbbf394e83f7d9618a133147c84dce","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.2-alpha-202011191320.tgz","fileCount":127,"unpackedSize":315222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftptzCRA9TVsSAnZWagAAYaQP/jn7nLO6EnFOQkvef2Q2\nMYSOYGlltW8DS9COrgjN+e4vP7Vfsv+AT1Ur7RAGGHLOrnlLrjcoE9txKhMJ\nB0dCOoByBhxVRgtn43E2D6YTH2ndcyI2vQNEfoHYC4n49g/RIDH77mq9DryB\ndUlDermqcJdgHWzj/XH+a/N3QVrKGZlKXs23P99aKvi/vMBT1bfTj3o+kPFs\nSIXIwgepCSSGf8PJSg5ikSrhMw+Q9LZVQX79dI8zfy3bBddb8PEJA2ljOC3I\nvuti8jCcOO0OdX7Wq5tbmPFjIo2deoTd1b+PWRVvpCo0STv/JNNPdYzGznEw\nfNfvXaabASDsKPsjUF9QgR+3FeYG3ARqaLTavgwvLZzlQkCKBteJqMzOZZpO\nHmAEtXYHkvMxXKC5879/EqPVBp5hgdGaxvi54WCjMlswaGhCitidBXdKetxf\nqV0EOilZY6+qtEqsLDjZ88s93gVYyOcORBwMAF+5oY1pNgIZNJws5apqZ2MT\nc88MVscWlh5H58bBM4gc4AF8RnQPRukedRGdhpQ6BI8NU33aCCbwr5tUCjVW\nIpofjaeRFBKHGTtxTpohBW6pb7305DgO6JuCaKQ0Ba/yTNoTl48YdMcO+8mx\n8A1wZzCQHwckacynLf6TghtlX0M5/BR36UlfkkaRFslJk0TY5A8rQvX7vUuf\n/C8K\r\n=8G2k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDShZRwD86TmBD/sAq7P+9JI82/8hVG7x1CE3fdc2sKcAIhAPyd+bVCPe+oj5HguHOrEALqDaKn1dEit+iEdi2LmrcI"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.2-alpha-202011191320_1605802867070_0.7282529819860495"},"_hasShrinkwrap":false},"0.3.0-alpha-202011191321":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202011191321","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","prettier-plugin-organize-imports":"^1.1.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"bbe559536ddc8e008de4268b00d20d9a044ae007","_id":"symbol-bootstrap@0.3.0-alpha-202011191321","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-A89YGHjRsUWPFduZrduQttzRgEpZ1R+/TERQZ+mDNsEHNXqNgjcVg/b9MF/6Gjrk3KGQtjsMrHi4jvkFoTo0Rg==","shasum":"8f14fdc77b6f962b926a55cdc2a9cba13c6b0931","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202011191321.tgz","fileCount":127,"unpackedSize":315222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftpupCRA9TVsSAnZWagAA9N0P/0ONrbGxKmypKFAYWmmh\nwwYJ5Pkkj9WuKt9Ws3nDjBfCVbnn+JJzhUIWBNmA9GQ8HJ57CSrwbD1ds8xr\nlGW+WbCF0Bb4gM4q+JafvFSc2zbvkbgTtTjUBbGBMX3yadNfZXM858Ga6Us/\n/w800f9XhR6mTaAmlZFexh0y6zmaOr184eiKF1o+gMJwEQgZ5TNQx1XztszL\nqa0EIpJgAG1O6mk6TY42sl0uFkcrucTdEXA9JVag2WHHkP0ZYaGCFZtNB9nb\nszhIJYZ4x6E7yzeFUq1ZHiYPTVM6mR/0/hxFi5vr1beWyGepIwNPWBPNM+C4\ndxyP9XByHTc/ug+RaNAireiQBwYhi/+O7O9DWkIozGjxsO4Un6lgajRy3qwN\nIjeJY0kMth90r5nASNm2zac8KP2Rn8EeLuRhd6YMbVQSbw4MYPn5P8lbR3hz\nTYdKIFf75hrd62iEFIFEhe/qLrxF/othyZWo9Vs77XBN99Cg79VQkQ3xiKk0\nnAbI1A8bXxc76+hKYK0PCYSOlK0yoMEgWMcKUHhxAXtUu2NnxFxxsK0+dTip\nhAuOyuFYyytf75FRAPema2WSYeZutfxA4qn40LesJ+Lu9mxoJBrH+Yh7TwKg\n1iX4Qm1hLCGG/ZoWjgm20qrkGuGL97tjti6u50+MXgHRIyhMGmg6g9pVXWG7\nKdgy\r\n=oV6K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHkhU1YnIItFlP+0IvGhKxIYJFEzJ7EZ7Z67CMqbmTeXAiBEiAQ8Qj6q4ZhcAgYrjxvPlb4YPCFPO1JZ9kwjfmPnBw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202011191321_1605802920453_0.6019623369109797"},"_hasShrinkwrap":false},"0.3.0-alpha-202011220136":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202011220136","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"b8acf945fa1288b47237f70e8f674c196f2d343d","_id":"symbol-bootstrap@0.3.0-alpha-202011220136","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-XBmpAlZzMezqogoN7xpsqSNrO6qX3fwTg9d+Sfj73f6yBUb9gjsltuzoECAIvaOoNQyb9577+BBL/6SUWvGRHA==","shasum":"a0cb7bc42f325aafaf5409ec7cb6d28c55c97dc8","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202011220136.tgz","fileCount":127,"unpackedSize":318920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuerFCRA9TVsSAnZWagAA6nYP/2gueaab+IQ5/Ulx9KWZ\nLOs2PWaogFhnrG7MtqsEVk9R9n1VzJ7BvmN7HjQxryQMV9caiRw+SmzE/h7Y\nZ1SiIKwwwpQGCAdm8HIdFDhmlNYv9KDbZ06KcEiVn93TdsVB3ZJeCs1aos/v\nUqw3hCn/QVsnDQwTgmOGq3NX98dSE2GDSRVNznnSIbl334gyRR07bdZjUJlN\n0GAW73YoQj3zjh51Fh19gyyWmj5RL0BgppSfsjOoKxpI1ZYl6cd2V0nXIchH\n9WXMNUoTqlWgkbw+0XMD0s1t+tksLtUbPDPcfCrgYROU2Fqds9E466WmvBE5\n2MCKU57Zc6Rk/DfUQImBwfSh9Y4YpyXIQ5DAHItVwhDLjBEjZU5I6WL0Okbl\n87mZD1+NfASrvxsUdHSesZesHrG3Q/LldbQ5Hab5aofMHgtmRHRU0lAPOp4Q\ncISnYyA7r/bXLTNThqg+JoOK4OeLMhAG/apjmNC/HeipxUWGZHgtc1cuUgwo\ngSmsqJ0VFHMrb4lCxvVKycGm06h6Fl2bgDsDJsLQJPQg5hIR6/BYV2grM15e\nBycYVSqmIcTocx/4r7GOQ6GS71tUvRAfzG7NVKiYMaL2DAHxOITxT5c/d3z4\n9betbrCLk4a4PFT2Bs2iTfNRoIHSJe15TbWivgdx5qQ/frkoAYda0lY3zLcR\nUmiJ\r\n=56YF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBqICRYZFipeN13r5JbTkE98/PRMVSm24N3vHc110jAwAiAbRMSmdvONL/NVg1VWydXb5eppvN6eMTLAfkOtGhoOKQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202011220136_1606019780495_0.3744171889106247"},"_hasShrinkwrap":false},"0.3.0-alpha-202011271334":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202011271334","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"72b4133bb02a3ad80584391f8c4743e8ead98208","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202011271334","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-gWFV6zZjJ3HcPRIdjqKyXJomwwGMYLvYC5PhYE6eyyhnCroMyUcCJPwxumB6w0oPTHaVfe/jQbovkqhH/xd+ow==","shasum":"7ce39232df4cd972aeba53e02f60284356d73e15","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202011271334.tgz","fileCount":127,"unpackedSize":319557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwQBiCRA9TVsSAnZWagAAG3YP+wYwrqWh/hKvwCmpWEkM\nUFwhPqQyKxHaxPRbbsVw0PQn14omiss2YamL8tMeK4Xx5A9W8QlOsK/rT8hu\n4Vq5GDz9/j+yHIaiptuKXeatoGHtoFbefRq/8toRrnzGony+YqfS3iOZoLwM\nrBC90mIY2dQJS97ZHMW8zIajru3QfB+iSWoRnt7W8jjZWBpIOfnJCAKFu4cu\nrI6vMZI4+kZLfQd7D1PsUcf4/13m/mihb6Jif9ngQ1JLiNuzeIEOk4xm2Ei7\n/b5dq7AdcUv3Z7nt777EBak6w6tPknazCd3r1xtZujqTxTtICn1x0ru6tJbM\nUm1/M7Kw1RAuSuDPtRvKVEH4oDB4xLvjUvR3Jxk2/+E/sFjjmSlxJLfztR90\nA5KrmQ7pTqRuk8LIcQ9eji+5EqVT88bhO1Hqmg+NmnTLVKAk4odP826SsyTj\nEkUUYj80adXapamoMSs1ahQ2+UOrZOxbrIarbKnLuONjOvdwxtR8HKWvkY+n\nnblNvk9KPVrKcAzUBucWKPbv6hai/FpBa1qDkK8A2AFYX8OZp8m946sBVpiq\nmQp2BwnlMXeLaQ5lDKeFJFwCz8PmaO04u77II14l9lU/h9F1db6qTbAiJyq2\nySA/SCwYRq/sLBKAoHw8QYpX+LoL/7EjG1l3I4+gtucGgxcHNX5Vd+uEqoGk\nA163\r\n=fnF6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzZqL7cS1yxMdObm5uem3kiKiBkEAtg/PVPqtFT3oBXgIgZSwJqtGcS5yA0amPsgbwC+SX623HKBusUwihtMMJp58="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202011271334_1606484066356_0.23700675741724297"},"_hasShrinkwrap":false},"0.3.0-alpha-202011301515":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202011301515","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"914d4843a32fd8ddbe13fc0441e967c3254ed0ef","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202011301515","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-FBWXSrMrQE3BOUmIYMgVCI+RLlwVg6eh5aJ+HHhKNuuts+Glpid9xE12J+MxDLEzFEx9N/qvUVT/tLx2fO9+vQ==","shasum":"737c6b9556afba4f087d6ac5ba6bbabbd4922a0f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202011301515.tgz","fileCount":127,"unpackedSize":319719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxQyaCRA9TVsSAnZWagAAXNoP/1eaEbVpae5Me8S3yYvX\nQVhkKZOiwE/E+wNQkfiSvTU5UK2tQBx6U923X4fO/ChUPjjVO8rjwQu+81pU\nlwoFcUKermqHqNxvc2ePxFc4X8uQ6rNufFDVOSdyesXlWL4kC7Mm76e1tlhz\n4z8IChXynURqumrRra7bt7N72JmfIYXVIsyydhXTcUS0wBXLgtJHqxot8vkb\n36cPeZiwCuQm57uGDprvOo6IvFDiKJXes+fjLLynm7UzEPnhm+6ize9QdxCG\nsCwqJFDeOWvVWWHs8pccOawo/E1Sgxi7xlpb5YBD+8cgthyA8xWU+SpQbf1n\nEAjb8JcN0h1HGz9QYa3ndus7mzWtWb8E0fH3tEdNgpQdbEbgyjI+3HKIHqPB\nifgP6P4HYmMu4nIIRostxz0MNObazwuiBBt0HaAKezgKT/hH5v5psXEa1tto\neVrTiEy6zTg2zrrutkegtCScjnACgsWQmacM2M1UNnxFd/SMZsOAxNgi2QGk\nZ5DgLoFDffr6AFJIuBfa/skvUjGd1y4RIEke0UH1O11oAnIa7+icmpz2B87I\n4/2djPTc0GOLVCZwyml7hXjd10epm4ov3RJqV8HdwYUDQpKfQDWWhGm/AcB8\nkT+hVgyDLJjs2buMGe8y1313I99qqADmt3eXjWD44KS3rYiMoreDpHrWW8sG\ntVSt\r\n=4JPi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/LkBhKqKlTIq1VPiTyjXWKXbrPI6UMGa9r0gWbxr3CQIhALetT1QB2SzhRfJb21A4UeRkKgXYbOPHM0Rqyc8fJemR"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202011301515_1606749337665_0.8773903281160926"},"_hasShrinkwrap":false},"0.3.0-alpha-202012011317":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012011317","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"433f7b4015c8a2beb83f1fd8e82fe34b1e87591d","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012011317","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-nLYQy+3VpyTi6wgq7Hrtg1JXXD+olZ4u+/tlYHwnjq/mpTyfVQAeWKJWq9z5buyPvuZQdUgcxG5IRytWx/uaSg==","shasum":"3a04060cf09b78a3b31818f8e44761c252ef1c41","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012011317.tgz","fileCount":134,"unpackedSize":339517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxkKJCRA9TVsSAnZWagAAPWAQAIRCF1g79Ne2W2k4xH6I\nsOZQ7A/KHvDMwhI3G6o4ko5OoaBbQS5H+gwzVZKdxifIZ4uIUsNH+pLtNVCN\nalJrRDSh2GYlO/QaKw79K03RwS3fc9NbNswODbiaLKscxeDGpHnttnXvLU/j\nlI+xeTxmK35PHF15p8l+JvypAsK2haj1YyedQabR6ITEREKj6jX0ZZJyfM7X\nM3MwfY4jiu8wc+7PZshWdHgGonaMRIjw7TuRVx4wntrFhDSTzTpWgUowwzi3\nvvHWJptpPNT7eNU0XvQssIpVME8MO7dPHP3cBgB8me6rh58gqi1Af7e6RZTP\n1y62crDoD+acuUG6d4sXPi5lKIgw/vkOX02cHmK77rsjJ0EjkKGP1wG2COF4\nvuMl+GwJrcKk4yBVHYMi7lKqNLQGX8oeUaCvkxbxZYEO5wZxtKERqz4LE83p\nXsAyv+Bb+5RKlS2HWqdUBFB0jYmv0TXPgEVNYtPpduWB0hV3aC1AHmE/l6VE\ntS21IMffdNvlHoUrJwtEVuxwsjA0JjL10atJYv0Fq/ff9dQgGcEnev3rbTR9\nBQpaYhmagpfq+lHCqgKhVV/fHfMJgOuv1kGMGOW9Wbchp22PBthPMsFB9KQB\nCoYAOtqf9P4YgPWQjmh+htEBlC+2P3mnmG9XlBasfIRYZltwyhEqZV534cE6\n3AmE\r\n=Mxww\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbPtDCxk3xTkl15fhqjoueO/lxMsvheYuDzIthFN9KRgIgZJcAIWY7r9aKLZIY7e31ygg5VyAs1n9kHqT8tS2BKs4="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012011317_1606828680403_0.4222447893179708"},"_hasShrinkwrap":false},"0.3.0-alpha-202012031159":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012031159","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f58bd3216fe837d5c2a4b4ddb0d1718eac43f192","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012031159","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-xsBcumE5MHAj7n/yXdI9uBonCofLjdXPQHdl7j7ezUvF87ACJPSiIK7uhU803byAhE9XkFj5HwHXa27LM2c3YA==","shasum":"2d92148e816a6f09e593108916a2f3c0295a5dde","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012031159.tgz","fileCount":134,"unpackedSize":339585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyNMcCRA9TVsSAnZWagAAIy4P/juq5bd3iRV5luIFcKlN\nBnhNPipVYvfnyANG6WZCLkRl09FPHJ68Q8CGZWsfYYfERSZ/eRNXbGTP5aCO\nmLvVzXB9RvHwMKKBpuiC83EDsYKkcVmp5oKXgELWIyrLPQov+MShNNKFGA71\nA1rZh+WpozteS3CJ0h/KGdCk2pRueRDz7ui0tlODpIdpX3YDJjtoP57HDblo\nM/v9tvKx1KJhodaLHaQykU4cXYUVvW6OWDy8KX914jeZwNeO80Qkfg4RrZFl\nVBdPe8awSWZIqvH3cgUKGhjyaQfPWT4Os4Bi6/NeH+Ala07UtaHSH+hacR7u\nJF9d4Gc0txN8a3LR850Iw0/J6R351cxLRUqmXIl2g6jYLASUhMr1XO9B84Xt\nJWjorvf4j6jDKJCr9kGXRQJspJLsycAHrxIF2H9ex3qEnhsd1qb2YL3A0dH8\nc4IZURNEMvBf37WY1qEkUZ1j/R14IM1O1VGI73x0I3Xvfzh1uMw6f9djxUq7\n1X8nwf1BRuIHJtpJwDBQaesOKNq73zAoi1iLtanzKFft4zco0mvODcqfJhW9\n1xtewBE1rGoKHq8gbxkmmBLgxK6ltQEhlePogK3FPR75CdqwF2eQLzpdd0uG\nuRxD+WqDaN22dxPHHtMIJNLEjIinT7+zMVjHwpPM3K3H7db1AtEXJHYs11+3\nwMeR\r\n=IY7m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlzgNWOSJQ8Z3M+Ze+GzB/aFq5/JBYAUupi0SlzWlQ5QIgB5I9oLdX5elRLMVkOJRToEK+9ccR9Zr0nQppk0y4CYU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012031159_1606996764462_0.9771121108231384"},"_hasShrinkwrap":false},"0.3.0-alpha-202012041002":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012041002","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"91a12ec7a07c64845246b8022288d1f3a62f9ac4","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012041002","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-z7FukaQTeG2gKiGwL4kGy2b57WKfx0jE9DvTh4Pjdyrg/0Hht2u9giBg385Jsf8jsfurGfbNBPESumpgfsXUYw==","shasum":"a924b4be4a679f6e710e4ddc74b90a6a94d1525b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012041002.tgz","fileCount":134,"unpackedSize":339863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfygk6CRA9TVsSAnZWagAA7q4P/A5bW2B1Ms0JyyIvHyCH\n2Z/VfUGhHvzuXR0csb31PLyb9YYJedmP53KxK9ZU0W4Qb2jVozXDeEzLLTM9\nUln6AqpDHAFY9lQSm4FGurTtN/momksDItLDReiZ4XP3C9dhWQ35Hiv28ePa\nMbDdM44aeboXX9XxiSykHGLJkNpXgBwBymkjhh+JYo6yZ5b5yybRcilfBTMY\nEtG7/hvV84Cc/6I6EUUEoR1y2R6ktjMv5AZoxBJCOsm8y5gFcbT6Cm665NM3\nS6H8pZ6OyhmZnc+XP21MsCPMFOuGC0lSLdIomvjtJ9PkcRkf02cG5DvjTiXN\nW78DQILkpVJU/pOA+OBhnOiKfKmVg6CyHI6qnlD2vEihY36FuDtPB3q+PTnu\nDQV5pTEwK46Eb/tYuR+5Qo1D50aLAXYE0HXxQ6LLE5DydmIFxs078neyA9fE\npW4J+lR8v+l2Sr8wQDAKer+K4aZRnDtWH03AZg5IjNmwt5/oJ6LfOUrQIhi4\nytQ3BcGRoFsQFfuVh+4H72d5bO+bdbNx3inn/30qozS/Qy8lxIkjooF9O8Zn\ngVUsOYCwuusqPsJScW93V7Rp+RuRxH6paB2PWb9GMBoi7GEXoospgmpJqilt\nsjts6mBGhPbsBT4sYO3rHdkPEa0SSXXvKhIGis/tU15nGu7duF016NKTJqof\nFhQH\r\n=sTdT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVRIrt67VkQYWqmRo2jB4tnP00pDbDd72cJyAADooEBAiEAhgeGVQ6tF/5TWv98bid5/guO40a+o94tbHluK2VNrdY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012041002_1607076153969_0.057797692242152365"},"_hasShrinkwrap":false},"0.3.0-alpha-202012071518":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012071518","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"845e6311505eadd493987de80e880c6196ec1462","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012071518","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-LanB7+Md+zSwl76qj758pxidElsq/Aw9SOJhonlVjLhMWA4SR9+Fkhh+N69xOLuHfDVaTIpygycIPWlcHLzLlA==","shasum":"3520fecfc8278b8f54fc773586e14543f55a3fec","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012071518.tgz","fileCount":134,"unpackedSize":340002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzkfdCRA9TVsSAnZWagAAQZgP/jIKo/sE2hCZwvLKHWWA\n2o6KJfrM0EEmbKbHPZ6dcJuqr4pdJws1/WKfizFvIFx5fgsp0iOwQfT0qI6e\nIBRusqusSS+QHZ/sHshc7ee5UJg9MVG+CThvUTOwzgo7mgL/0cLzikZn7abK\n50xZS88QErMEqudXmglMbUNhZiO9eiIhxX6bQ8Gpcc92TywqJirVTxqydopZ\nseeV3H2uR3OGdJnlVansPRwYCcQ7GMSgZAbkSTY/osN8rMwLGTBvIqy53yyz\nGMs7ieyvAmFXhEuLd1kz5YzyW4vpl72FC/mYWrB3Xon+d4Jti94ySgSs29UO\nyzomVImzlv5gCpYcOoOGgDCSAzoBThT6Od9wiTAv3R6WZlAWSEiyPqrjNgL7\nKgypCbuK9nvSBENHSsgvi3DxNGLDIPoihM9LGdDVmGhCAs0cAdVtATAqaAuY\naFkFH/eW1ShlQNEkDeuX2VphsvfOB9lZw/YbnEbpGUuQW2TuVvj2wvoZx02g\n8y53bfhOQZRfhT0gGvjzG4Q3CT3zDIpx4G7e70JMQbYobQlIaEhfNrwveXiy\nEoECaXt8lzcjuS8fYcz3qSPq2hdCMN/2jYNn76lWX9jezi8Mjnl+6mvFW4cd\nqU0kvRA1rFoMT3o8ObCZT1POgLeycFnRq2s5fGckbd26gEXr1vohOMexZym9\nBIg5\r\n=yr+P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDW7Ue9UWNDi/zYl+qTF5+bkCFOBo7AGZ22U2SO7gJeAAiAM4AzIkhO4NvX2LEAolJVtfc2q92bfMkzILPGjsUY79g=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012071518_1607354333013_0.49427576064513645"},"_hasShrinkwrap":false},"0.3.0-alpha-202012080011":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012080011","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"4fa304af03d50eba45fe190d065472286264b678","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012080011","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-PiiODNUJH9lPSjkC83YR/ePNBd3Bd/xOyHVACiCyZslkbHHOlPPAh3JrcaBXOX4ML9/nPBdTp3icR52PZ13hCA==","shasum":"6eb56b5a435d47d5d64684b9d7e84c64e93da89b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012080011.tgz","fileCount":134,"unpackedSize":339979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzsTdCRA9TVsSAnZWagAAmVgP/2Ro5ZOwLLwmtOw3aTkd\nPfeVR8BnnZZk7kJHMEnOamaPqBu3IGUhm1MmvYzlJjWRRk/TJo1RvVBZ0wuK\nNG8iJXsJNHswvvB9D0j+ypXlx9oTwclSB4pQnS2sfcBQW5x5GpsxRWZeYLUD\n3DXo+miITQxDG+0pil+9bTfTbvgL+TvWaVMI/azM22jAGhGsIyCaXa0rzqrj\ntWHiEVhlC1fplYDoA/dNMINkvnD/7vQr8jlb29tfBcWpf191hFdSnXl8H+xq\nRFaNy/4IQdkvYnMHI476GuESz9+qiKL/1aGFCiIdC/XbEhGtMmpuig0yDWyv\nLgQwBDEAMs/jBRNcuyn91N5JFaZzz+NuGhWSfKktgSreOxnZE0WjtbPLRxcZ\nEuRLOSODHGPaIqiesUzz0JeF9XAREtSVBVOVL4ENyj+Pdth3WgxF+NiNq0TM\nIh+Zm6ng0BzBCrYs2kSTbmcQArwGOR81TdA+VGkFXodjmH+LzFEmlJms+DUi\n6bGa7BVNYz/z6rjmHHCUQFpIc16Oq3wFvMSaPv+LUBv7jJriP5L/BhnpF4OR\nlCeSVHqI33b5GlXw8Gph2IFSjgrIbt1/d+IxIZ6PTvW+OaWRwWrAM86K31N/\negks92GhCQJwL2J53YAx6POLYdhUzybNGB9Q2MJrPENQt1QOEj823cB7UF3/\nFGIq\r\n=78Nt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRtEunaZG8puJ6jHv9eJ5bC1eCpAqYlYRTLZOz7sMEWAiEApM72ofYH8OeQHuEs6MQmRojs9U055QOsDkpceWlM99s="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012080011_1607386332566_0.27062165133698324"},"_hasShrinkwrap":false},"0.3.0-alpha-202012081631":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012081631","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.21.1-alpha-202011211848","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"091892f745fb20bbb8411792d967a71f8ab15ce2","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012081631","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-2N/amDgmm5foqOw6EGaKyfRC6xqrQh9T6fx/fkMefdrf54caJ9Qc/RXdcD/pF4aM4DhSzWRsCIveA3i+vIHj+w==","shasum":"ce2a50165bb513fa0c8a8423f8576e9e8b19c25c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012081631.tgz","fileCount":134,"unpackedSize":339360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz6pfCRA9TVsSAnZWagAAUt4P/iMmUA+oMt+7ALPT+h3b\n7CTPvsfHWc8Y83UBUJpP7zZnsqJCbuJcyejo0Bi9+nUYiL4Q1t7gpJ7XwIaS\nL9UHMrtT4TEuDgbou4UE8txcHrhckl5ZrjMca+gHLUO9S5LQqQxUutxxWMKU\nV65aLtup9UIgVwIECAcRob8bKaFrGvdZsHm8RMRtXftmM4ZQo9My6ZSFMSe7\np6G3B0AY0UZnborjdx4/ogSlhh52138HUwJKzQBSJ6Z601tt7/zY4Qhzmt7h\nSz1NQzzDtxHw0CtOfdk8bodRzfkdPzvNU+AxxzGxMeW010aKzmR10jPdvbMq\nTrbF1z3RVr+j28DA/lkJFDXl7qAmmCpUu+IZCqTmKhKQe2YmvQzIIIIVK6be\ngf5MWg+m1sIYmb8sw2tpYGjBvfKaC9x/Jm4ZAFWr16uEq3TwaldiiZadNk39\nsEtJF6Hk9t/iSlkCTZcjzLCUrN4u0EyKjDQABaKl1QJTeewbtOmbchQNQ1nE\nJgr2xM7nEhCzM6RkL+tL0Gh31Rurj2O2V40iZGt7wG4dGPMCWDNuWuB+Qjnw\nOLsV7pHDC3kNQFFn9iW3jKpSDg+ag7T8lfObRDACA2tDlsQgrlkHkUsrOvyy\nBJaAY/qAipW8Eln1j3cgcxR3RDSZzSEnhRFl9EAf2aO2AXzw53iYfF0H2jOL\n79mm\r\n=rTmH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN0qaF0ECJUYQraMOqiHGj18jb1b28N1loaXY6nhcDaAIgCZ9Kx/8+a7dqCTKm9sBInT6hr+KbU0o6c3kkxNcAaw0="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012081631_1607445086541_0.9927316154487393"},"_hasShrinkwrap":false},"0.2.2-alpha-202012100849":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.2-alpha-202012100849","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"^0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.2 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"6412104b7eacbeb2af540ca52d4b748815dfdaaa","_id":"symbol-bootstrap@0.2.2-alpha-202012100849","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-bNNdCeM+00d1g/k/4uPWKbGykLcRgv7VPcBSqGnuF1NUxu8X2xfCMyCdkFSSiqTqe6eqhnEc+/CBqcotzyonSg==","shasum":"cf15181a0eec55b44e6fe4c03daa804bbd261e20","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.2-alpha-202012100849.tgz","fileCount":125,"unpackedSize":292735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0gtVCRA9TVsSAnZWagAAWAgP/3CLCT8mt9fBrIPMBZC7\nvuPQWT98nw3nF9OHIpZJGAAiZhdhMgcAmmrzDs2iB+BeCyZclXfFfO6L0Jz7\nMmvgklJqyyRznEgkjryHbSYAvJBGeo8Ckh87NAPGKtuLPjFcgPP0xxvYhUwU\n8loh7JGVy2HGx87f8yjb2jItZvno9AJzcSMvyLnVKwUqacGYFv+Yp6RIMOd0\nrsBGQZIGemOjqE40adr/ZhTCtdKbR6EowHqxXCGw6TPsWAdt9nuLk6zw8CE1\nOVQk1sNy0FKziSSlcv2UMEcSo/fRDqAZTKQAOSg19OwPa0dEU6dChpiWBV0v\nNTyE/5yZMIO+8DBmte9LbkKU+SJfPN41Go2LtJDABJOYxuycDz4VGDY74NL5\nnDMRWHBS9Kr+Fn4+dieKFJ5Lqfo0rfVuYFxmMh8fvxeK2yxdsz5BDFZ9UEZM\nq/LbO+3BP0bQH7RY8bxSMv9GUOewr218Ik8BgP9dqlQkpAr3+LJH9reNDKQN\nfaE2XR5WDr7X3380CFgtUpP4nHn43XlNVNyOiypGhBDLCcxqgeJ+2hoGuEVs\nvLgNWFHtvuFr1+y55M1vGlj/GQGiXDjTnkWkjrxhqdPsbp7+sWneZ1kG4OIs\nPw6IKO34Uq54Lc8FwqB+0faEPEjop7j/5ypQu2Iz29M5zd/SytkOgAyFqPvt\nA5GV\r\n=v+KR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYFOZSy+bsMUPhIrFYS2QymTpjPvI8nGlWtDklj3RKNwIgJ0xCBcckhAOpjBnnyVaFcrmEiJL4l7s2Ql45e2PKSH8="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.2-alpha-202012100849_1607600980484_0.007671815922497549"},"_hasShrinkwrap":false},"0.2.2-alpha-202012100902":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.2.2-alpha-202012100902","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","shx":"^0.3.2","symbol-sdk":"0.21.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","rxjs":"^6.5.3","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a full network with 1 mongo database, 2 peers, 1 api, 1 rest gateway, 1 faucet, 1 explorer and 1 wallet. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.2.2 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"6412104b7eacbeb2af540ca52d4b748815dfdaaa","_id":"symbol-bootstrap@0.2.2-alpha-202012100902","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-AHzqp/w6VXE4ychGvQXxNaVGA3EaABN2HJVErvQIpbBV54+MXQ6k6oocV7AtzFpp6nZ+ur4sMEocCYKgwQd2sQ==","shasum":"69793a8f9e2335381d20dc705109cc7ef14a35ea","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.2.2-alpha-202012100902.tgz","fileCount":125,"unpackedSize":292734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0g5QCRA9TVsSAnZWagAAH/gQAIh6iJg5L/dvw+bs59iy\nVfRJgR38X4DJZY4VIrasYfdfpDWkaiIRKNn8TtKHk+UUdsC6oFePn6jiqZOx\n0KRlErNzV+PXrvpx5tZC8UZbZVgdmVAv7+pg3sAVdIdzzoD6tExD/pdEoojh\npTY6i2pn4yXKT8sVwEMCGNBoMMZrlBg5dCZEJ2//1gJWDJJ/duiyhGOZNRBa\nNInnPcXzuZASYejWJ9W8sOxmrZo2OOvaP2XSVYBRQhg50iBX7/5UQjjPOns+\nNE9Cg4DskoyhC0QOUrBh7oVRJRmZtE+AjQ4LK96txnem8O1b1BMBwtvn2N6t\nALvbhExBiWwVUCoas3XoiVy7CHqA9Day/QFIIoCehftO6+/vnh29HR2D+rcf\nuYyHUcPoPm31IK3x+egtBRuUdKaia/y8qiTLAp4mOE16lvmL0/L/wFr4e+C+\n4D+5nv6xYt6rbX3XuN7fGuD64aDNOBhhGuMAa1D0B93njuvGVHywWYUfgk8h\nYO8/Eic/g6jUz2WhaT9wZBFGTOZI/gifY89XCx9e/BGrY9xOmiFSDt3LhEqn\nkHEfc51pUy5I4lVYGx/0L7fR0m3UP5WNicVdC8XZhHofsjlegrPAG3tDwwdt\naGOGhv2wW6BpTBn0CCKvF68vvags9O0ZkQ2fZ38uZedogjRJDAMuCjRVfaTO\nCL1C\r\n=6o33\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHdFuSHk51i3nb61BFvjCBY9LbRv9E/Eet2aHxgulk67AiEAz5RHlZ60MZcrT1jYth/8/O1DDSeDQdTmfmSDaipa6OQ="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.2.2-alpha-202012100902_1607601744339_0.46218691703096937"},"_hasShrinkwrap":false},"0.3.0-alpha-202012121041":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012121041","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0aa309b7c6b1b2e51ab24b49ae324a407694c8f6","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012121041","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-jU12EzWJMIMn3NDEgvJcIIPEyO30bD/YWwQo8RLt5IqDs47Az/G72lLe51rxHzRvfR7yN4vv2cKX/4wiv5VUIA==","shasum":"995b63287dd6fda6eef9bf395484ad0a429886c3","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012121041.tgz","fileCount":135,"unpackedSize":341305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1J6FCRA9TVsSAnZWagAAruMP/Rxyvw2gk5iPrKwkYZzS\nxsWDnQXti9N9V2FTHhUmllgRDp4gSEWjFsRFJr84mmunjHH+gOTNJZQTLu5K\nNIvxmvTgKjN2GpRDGadi6f/1vSqXottskxnwz5rSDDSOwXm3bBxDAJPNjRrp\nmUzlc4eQj3NTqM8mX8o0MXI3kcOs3Le2HaJE/zreMkELAgJtGxsOzPCqaTgd\nVu9o8Nbsj/tP3crxMl3v/uAtMXkvcj4QEcGQUX64qml4umsNUaHA5CcV67c6\n+8UmpFxAXwnnyZxBVhIyCmwxNvFwkoADv57OzMnbFCmp9Itf8vOL4QGPxzH4\nzQ36nKhlwmpBo6s8IA2SeUgU7fzcwVzXk8T8cXsEf0JMjqYxCg8YbfCd69d7\nawH80OtefbS9wOttmTlLwSTdk90OqZuahx3DJIpKpdclffyO2tbc6kchd1U9\niyo/6X1VSE6OeSqCk7SdrVRBT2OhgNuHSbjJLf76EDq+dnLui8/vLj8v7M5F\nel3GjmW6Wn6vepMTAzwmbfJotTywfioyBZ0VSyq28Z+Ng++2BfPvJaSQ9H7a\nf8uDqetVBHte20HatZMGrhbRAox2iXq2oW75ydLhimJrXTzMCbtcptyQKD3D\njlRztoYhlddpZHwYxd85exxLFlHF08vQiYmet13C9mbVhpyAf9tfNa0PlP54\nS+5J\r\n=V8I0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfDSX5T1itjM8mQUZoNHImbJ+T5ga0ybmUF0UtEHHb0QIgUk35L+o2IgI/ej7OHdlNnV8UWluuMBfwM45CyG/iibY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012121041_1607769732481_0.9165183210462668"},"_hasShrinkwrap":false},"0.3.0-alpha-202012150002":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0-alpha-202012150002","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5599a849e2d3a5491ac1497d27b8402d80c17aea","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.0 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.0-alpha-202012150002","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-QXOpLfgBGvV0jq8mr5zESXdTlX/939CuLqhvfqFt8f3Ii5FMEHKLn4R/dpiU6XFOe40CDYxOYNjH9r+pcS9TIQ==","shasum":"92eb434ef3154ac63ff100dff9831d6e60dab96a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202012150002.tgz","fileCount":135,"unpackedSize":341305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1/0mCRA9TVsSAnZWagAAWRMP/3zbySE74ssBylOVzS7C\n0FqOj7FUZH9Exj52p60GyapPbxzol893E7J8q1NrtccBzJZ9o8wp9bs3dInH\n28ewvfgk0MvqfWzE9ngRcsbqGmgWlPuKpcPR9sr9laOtXQWgIzXuzvc3kAq6\njErQ0E49GadKsx5objGdXwjSHqF5qDlATAWti0gOaLvcDoNVJFXTSykFUTJ7\nM6sa1cL7QmV3s/hElH/AB+CSY9D1D8aO+D6jsk8o8hmIxEp2Y9bYS/rnxhDn\nidYcwQfuTSvS8q/TkEmwDz6ZI0qoPZWCvtUzbuIUh/5aP6EUK5qJj+CHDr3c\ntobj5NhINL40kqd2jf+tb/hxL7BIUlUC74dCkUuw99weApRX2qWuG2N8zZgo\nqS3/ZJV+tuZepJR0tDsXAl98JVM4S84C/qUVA1WZ+XXNFbGf4nEJBstsU0ev\nVStfR2wkWuvPddJvxaE0I9Ryp6e+MHb+XJYAXjuWmrq3skdLZXf5vda3F/2z\n+UGn1gyCfh2eIjP8g7Mhdain5rjA9sP+2uYkAx4rU9lv+1xhKnv0In+F9Yjg\ntVBMvseEtd4IOazpTsyKopLKXce/iFnqBGxWBSvkgnR6L3ESv5GayskvqsGP\nbhRFRdOvFk0mZXwQyaeGZPL1CfsBR+8cUYuYECUWlzmWxv5MZrgi5q/kJfGO\nWXKU\r\n=Gh4F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpkT2/NWKz+bWRv3sucdIjkqDoTZEedoi1CFYeZ84lwwIhAMmLDfA8z2YhtPxC7ug9OUK8jMPNdoSWrj67iRKC5I4/"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0-alpha-202012150002_1607990566252_0.821893338796079"},"_hasShrinkwrap":false},"0.3.0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"cd888378ed0421aebe7fe224d1bc346c22f226f0","_id":"symbol-bootstrap@0.3.0","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-2ZJw7So/MezHAiqwJElNwdxI+UY1oPoRKLP9Op8kmhIbL0LGZFs/pyBB09Y3O0DMdJkFpFoh4G3Og/p/wNzNmQ==","shasum":"463756ade658e4e2be799ab0a706f9c78fa1391c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.0.tgz","fileCount":135,"unpackedSize":341248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1/97CRA9TVsSAnZWagAAb5wP/ibsoDeLQZrFzYl7Kdvp\nZeDf/CHY9sBOy9mgj0/ntnlwzq4ilLlZ95wH8Uamlf9JtEncULILv3zbiozm\nQ6r4hh+WL1z6VAlYuhQZh4+d4KEwAJ0H6vE3BryAmzgiHTpQRAIKFyEoHDhC\nVAfbFTa0ROuf6sSYVXbXQtQTuH1tAKkbv136iuJJkf6lOClzO1dCjhz1Izex\ndw9Fro+d/ZbnhH0rfniJpA9lEloTIFk+0lp9L4g/6jMHnUmHUedvL7RGjapo\niB5Sh7rgFn2nbyS5VNZ45ZtSXAfMU5kLrR352CFO9N3SapscVFwkd0g1r3sr\nR5US8zL8tWoKK3oegNnId8u6x4raBG5p0QzcwdE1ptZxtizGGQrOIONfiulA\nEbzo8H/Sjs2wpShW39osfXm/+f8KwMNIVGooupNYMX+XE5x5GpiFNWRzmhYa\nmUD5xAtdCWoxxc2AweGcxxVDnDHXYloCFBHExj8234ECqh2cga7nIwNKq7Px\n5gUHHa/cHO2tuu0DQGAPT+OAzwysQ026o8xcSzooFhl98p0n3YT2dYNfYKHP\nYQnTHklfOUimYEqZasY52asMHjE8PJi5muLC/ZILpr1efKNroJvJ4cSwfmxg\n8o2nYD5v/wa9Lu8fFE/CCvvOyG2s49tZQlWZ5kWcdPNuHe4CzZLRzbHDyBqv\nsUr8\r\n=KaGm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjrCzzk7VkRhUZmQIMWbPgxQGckkILA7UGFGuhQb8RZAIgVIs7bpnsC3eO5D2wASONqpwkO7MC+4AWYGCdRkP+QtY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.0_1607991163045_0.4111464094740991"},"_hasShrinkwrap":false},"0.3.1-alpha-202012161313":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.1-alpha-202012161313","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2b64c6b7be58ae26051ea834b43113dcc8e0d90a","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.1 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.1-alpha-202012161313","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-lFa7cjog9va78dvbqdfGhpI9lwxXPyFbDODl5eRsrkYzfAp9SuRPQhQy2Mo/0XS0FoWeMeHKbwtm58S316Uf3w==","shasum":"15b67f05f9207e8951d1adf67906f043312cdb96","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.1-alpha-202012161313.tgz","fileCount":135,"unpackedSize":341305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2gf+CRA9TVsSAnZWagAAAPgP/RJzhH/WkjAUPqZRL+h5\n8ABjk8AZpteBv0IOF8gZDQ1gemZebCdtrr7P9ZYxnJOBOive+q5VHJ0t6oFM\n6NnLPLVB0yH/T+6MEplysOxjjyFm/LzfEhUiVob1c2uuuupZ6qtL8pJE8veW\nrxkyPFDfpafYNZ5cOGcwpQtl1gaqStR4uZqwGbmnsnEHCP6RbWZ9zfq9jC0c\nvV9dRMgaLuoBImm3J2uHJFtpgp+dkEK+NPh9Y34lhMywpH276EUCoD1TXiSY\neI1xTpZrMJVIqXk2d/lBOSs5Yw6q74RZgunYkLXfqXJ4b7geIQXoBAFSwaWO\nrW5BXWOTuIV+OE+atxMRs5Js9i33fRdlouEEmHZJpdRTyeIhjcIzhk/R6SA4\nP/jMhBoU1bJYSOROBAKfeCs3fQIL5/JpxJWr5YsHp9AiHORylC3KqyY7+I8J\n8ap2b4+RC+mJUt3RM8Y/O7/t5XV9T9MmjwzI5VyyvFjdbZx4UqQLLd6rebbG\nucBpJik90S5mBdFBIckGKmdywyQZgeA524PPt3RFFTca8FjlWWbNLzc+rVMb\nDuHH2v4MIA6bT58ZJSEBZGjK7X5RYXQSpXsR1TkZPbjtOAI1qYYTgY/9L6GZ\nhm+zMA+twet/DFPkXuaS9EOqjQA3JhZbJvVqsL9IHJvmeP+aVmmzCN0qq7yH\nfkJ6\r\n=D6iJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq6AmnUkT8GV2yQNr6/vcxMYBktJwWDK1HF/RNQV2o3AIgHvxRJY23LSlC7NDHiXQeqLWuYbPu7quy5lYytalj3ag="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.1-alpha-202012161313_1608124414402_0.038687080414955055"},"_hasShrinkwrap":false},"0.3.1-alpha-202012161609":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.1-alpha-202012161609","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"63143432be1ca17a44d7c6767ecd48d5f640579d","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.1 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.1-alpha-202012161609","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-gZTF4v5B6cJ6Cr1CALh+wOKHDvQHletKI9lMuF0Tn8/n3k2MOrYXcHhKtCdT46vrGhLFittMHV97WG/XKsFU0Q==","shasum":"966e707e96c55019cee8905464e850b079eb4453","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.1-alpha-202012161609.tgz","fileCount":135,"unpackedSize":341965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2jFWCRA9TVsSAnZWagAADtkQAJPoADXI1m9ec8GV+84I\nbLu+wSGjDNbunmMuOzm7fpXCwJbE8nnSgu5o2DV9QspVOHwMSoNTVRxNRQg4\n2R2qqseOpuezoeBe9Buihxq+2z9JsaG5ljseYu0smX6JIZ+HgKJfRM/DWDgo\nH9b9mMMs51qhmKHaaEayQ1cKw4ZI4BwcsBxbSDaoY/jULh5tz3Pj7t7/2Wly\neq9HkHYLa9ZAStzPTuUpIJG4OzVJfKGIRbG6rJEpudNFFG2qqRbAJ9Vn9x41\nfkXoUyXtTyggcjLvlBsOC3R9xjOaU6+MZ4N1bl8oWZfSlgl+ULxMAU4TE3VM\n8XwBotmkYHqOf1R3PHB8WPYVNPDhOvKeMFumLg+MpPaf+L4CWtNk/h3bWjBo\nrM9352Qb2aa2p1ADN7f/eErfKOQFfPBiusNAgPUB2d2/rQ/d0ycgCCuMB2lz\ni5Pe1+DLK6yZcOHv0CXkFfa2gmAIFvEZXOpKHmuRsHxny/DpIxhIm3g7eCp7\nrNx18Zitcwi/ySu0gTLupFvtwlGABVs2TyALUiQZYXP+XKuKiyObDOl1GWDt\nsvCfXWnj9C1hULj3dKtYLQxFuD3IF+MPvgngT7+Rh4HB3RHMFZOVL6OxThrE\nRGiC6KboAPbQs8cx2T0qc5o89LxhbpMpV6eFjVjEWc/kT+yrthP3VuCATIpt\nRMuB\r\n=Zhjk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEO8ggf4Ib/0OEOndvrk15BHQjVt+ifmoO+jn7erpzEAAiAS1Ffv9KUFoVVdShw/Z5VuUJbxQRiwQJDcgFUmGcy+Fw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.1-alpha-202012161609_1608134997879_0.5950256813393657"},"_hasShrinkwrap":false},"0.3.1-alpha-202012161729":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.1-alpha-202012161729","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"984a5df5d88dc143afec4091b7dbb52512bde19f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.1 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.1-alpha-202012161729","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-SMXrGPDiFqRww9JnMH8iIiCwsCUKkhaEYI3oLfIPR80j93OPnBNcZBEzR6lt7fXEL/ek8OfYzFuoMkLHcC64aw==","shasum":"1563b6e6cf50c031fdadacd8db9dfe93e5b6571e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.1-alpha-202012161729.tgz","fileCount":135,"unpackedSize":341840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2kQfCRA9TVsSAnZWagAAbMkQAJ/DtkMThyIs75uTtkxh\nZKhSkTgl4tzOh6u+c1IrDcFJoYMDAsksPxOPOYybfsCg+DKq6ksyz+GGxCDe\n1QFT5eOyZmsjKrrUkoBnv6fI1azihA4wf2k9EqygusgsQgp87aOftkcASbc7\nfw4/nxvTcrtbtv1nGtmyZpNqcIeA8+h9P98D/TCojXwP53JZyDKgfr8B19U9\nf61fUPTPrWk/J7JhV5XvrKHMb+Xnk0tMVefdbgS9IHr4+phBry6TaPeMtdlW\nO3HGUCTYZvxV62ri+RfSs6gb843Jo4wJOmm/ShERQsyx62DW9XvCNBw5n5OH\nX9AAE3/Ho71uI9cQLLo9P6i8Li1ZyANfeC9Sw9/L4XMy2NOkO7zhMx4If6pQ\ncGkZ0L8zjtrHkkAzMXbIbqsi0I5rIiKNyziUPPP/MhjiVxFk/FZWic3oGGJY\n5db1Rjin+8pizFoSgrny+uIHhvXz+lApPNu+seE/giJl2B1VFIaE8ts8kRLj\nK4EEkwPiywHIhKW3BSOc//hx20LHtWP4G/1mft1CnqzRgGGu2zKfgwZqSamq\nNZ1Oe9Gvc942zZAHXSd2W/ztJ6lvt5VcCCLQL+h0XJJVwrAe5d/55Gp7x6E/\nlh5W+lx+Xby0dNNBZPdD1Ll+ywuLcd/lby7oG/bhWJsA7zrcZgxA4B47aYeY\nLx5t\r\n=ihT+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBt3YwbApViKo9Bpp40rNnEzVmPRIjqVdPa8XusOJPjrAiEA/34APgUiCFmBFt4ALPeN/GdBhglo28BLXVCBm73B9X0="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.1-alpha-202012161729_1608139806708_0.18512902502797135"},"_hasShrinkwrap":false},"0.3.1":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.1","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"bfb3bb4c8f337e8af30be929986c9a96a98b9836","_id":"symbol-bootstrap@0.3.1","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-q0mYqIi10i3dXGjVycbMCybE/Qo2U/ndGFlTrgjlX+XO40wknWxF5IKjQOXwI97CboqrEBdzauvk34+ipRzzbQ==","shasum":"0097e1e9b68ebf2c548cd8763ed41145e4ab666e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.1.tgz","fileCount":135,"unpackedSize":342291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf20M+CRA9TVsSAnZWagAA0FEP/jLexHz8rK5ZEnxanMY1\n1B3K7tXiUI5Zp7ZVbyvxYOPGkHemrDxmAnUQQnnkbH+dV/rbAC2d7FvMnDMe\n/OCz4Era5YxhgCkYQA+qvGYWiD+gPOR00l8Ol7rDXxmu/Gzv4knreaotLasd\nHaE/FEHCj+bnFEOEKG+e5BQ9x3aFPqE9e32YT6M1zj73uy00dXeNf6i9rVO3\nOG5uIn6t9hv2qHtXg8rYPtE8PkQ4fC7ASohlgEibO+00RHeMoqtIJrWU2nXM\nB009899JQJFgRr+BT/LAmSPz7DPOAZpnO17LkJIJYZsxxgtCB4d2HEl9jSKs\nCyBvDwguK8U+SYa0DHpr+gkPyHhvOkQ3DxbnitN8g3Mik/nE2nlvIXCbSDuC\ngkdAKlF2k7tmM55bOcZeAHxpZFUL5212cybEBu/jW9xK6li8gF1u2FKMg07X\n/O4zz5wG4Du5WC8DgRmoDR5er8M9lp8NNe/f48kRL+PUB3TYk2c/Y2NmbrnH\n0E8k4QdZmB8LKyQfv+O7k6J174hj8ZRtCc1yad0DrJw4/MERS7o1B9+uzPbM\n+ejrXtrebzrfEdD/agUJ3jJSCOytyfDZY3bsjW3fT7jeXgoCd/fxaehHRJnf\n+45VYjwy5LOf4NbRMq+FL19O7sF27uG2Spzamu7jq8NYcZos7zK1nu+JOJrQ\nn9Gg\r\n=aE1n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFfz+dwelVIOV42gDPbToo3DKfK4tDueD7jXd7+r894bAiBjMA/TVuYletYrHJere8MdTvoXA4PG2oy8RUQFBxgh8A=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.1_1608205117918_0.5912992046489753"},"_hasShrinkwrap":false},"0.3.2-alpha-202012291946":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202012291946","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"31e6e374bb272eca6eed7e19d3fdeefbe687f168","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202012291946","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-NZfJpyZKcsRaSdm0eNAmqOxTATID3XPfzgrxtZWfj6r2NYNBi3Oc2r4xcz8hvTjhPoiboSQ30fVd4y7khI2+VA==","shasum":"994450740bfd24118ad65d22fdd904a350e1298f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202012291946.tgz","fileCount":135,"unpackedSize":344019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64e0CRA9TVsSAnZWagAAgS4P/jce9K5r0VFLau5L42ej\n80hgVUhUWgeNIXkXqs6t9ovV+E71swdCWdjIJbgwvskqU3seUqHE7YNxybpn\nbEjvCbU4M65a7v5M6gm3IyoJsQe4TLuFziBYB5bJcdIJ+R1XMtzT5ettlkQJ\nKqh4VNtj1qTiWr0lLxyC3YO9KDo7agZwQYGkkZLDPq8eSmE4nzMqVnNOQaPL\nTEDdOYrgWlH9Z71IPwiP5gpxHx/l0PbIP7UXyrM0osXAtkszk2CIXEF+lRCl\njXw4hRLWSUjFd4zUxWSf7AmomjNOeZWoWUMf+Jffq2/1KcryZe47d4VjEcHV\n5vNF+zrE3X4v3L+lQevyZgGG1IKi1gXPARXYqcSGH3gg3dQ2KvmB0kirn0wZ\nPOeyGVVMt7P4r2R4lbl/U1BcHHxFlvqjvK/T232URouIa2UJDMr7TnR9pv2W\nhtlgi7ZbqlBcUDk1y6kMzDsEMMXNDyLndwQP2bs6F7/0vUycII0GSyajhflq\nRvi2qafXEk8IQFvQOzehyPNpQu0Mzadq+Nhfa4wPhMgqAXgy6saZ2Ng5nuHU\nu76w7Na4Pwlqs42B2HqofcZi1YUJvbwhiTMzNUJC02hZ2d0KDz2GNZb80KZd\ncchs+Ww4cn8g6ogH1qBg9cn8vBdknNJle5Ci193JeFr5EsJnmvyzXtTDAxX8\nTSzo\r\n=9vRC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaUfIgsgA+/Aiybdnxl16MD3zDh3JiQhUUbK0r5Tv0+wIhAPsVfcE0sRmrjHfOeJLFNSYg0vAU51X2Wgf7M8bXfKfg"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202012291946_1609271220450_0.32490563676148243"},"_hasShrinkwrap":false},"0.3.2-alpha-202012300211":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202012300211","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2cdc7d88f874f228c07ff70d60f694cbcd662421","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202012300211","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-WpMfY8+AjWn2hUMo3xw3ELqMyVtpkPa/gYV5DkKkfSNOZtbce/STZRh5qBcFfEiCh3K3EPKZ/DNRqCdECAWWfQ==","shasum":"9467a496f4a9544a16f4938cbb94d3326400d13c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202012300211.tgz","fileCount":135,"unpackedSize":344191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6+HQCRA9TVsSAnZWagAAGQIP/2COppti0shfR1MeP4JS\nvoUFgxonk+kMCk3ebUSzD6imz73XozGIGCLRO9+RT8hJAPA7fSinBJqRVqWK\nePviKFv23YXhbniWPQvCCYQCIR8mvRcSAmEZ6jbsSNg07QhKNhj3PvWjpekN\n/NFKWUnoMbbK2PPlmi/cXzAbz49f1wkwksSMpMXa6yE9TV63fDoBl3b4VKNL\nHy3I/NAH78spvXOduh4XgnQokf5J1CdZbOaO818vtIzcwo9hc902NbdfXAsn\nASX80Nt5P8vQlZOeoc9xISWA2KjIRrRVWuJEVZxYzpDkLrWB6b86LkAnTRLA\nzbWs+bOcwWNW1TLroAkHZmh3JeFeW6Q6NwiQlBfpt5OK08b7WrKmXQRDMd6C\nIARpmTdDw+V+ePsEHJaOBfIKOA0WlT96BW/gm+RivQz/SjCGikpH2UBcsz6R\nRmwVvADtBlWnBSVmzb0XN4oIsh1KEuG8G9+Xopr69Lxhyy9ill3GEb4Tdw57\nxX7JJRPLD5O6a5j0ZgXrP7dcavxcJ1N6bQFd5vLA1zdO4pb9BgDOhtgS3hKI\nk6Cm22dSXmKhBmgiomR3SJXZNBEVfjVTivRbHk791B6fTf8xA5d42tp17Fdr\nvpRVcQB+wZdYxxLaieHblMCnmJsXCGlVMq60y6yOZeMclWujIfG14mu4i5w/\nNp5w\r\n=rDd3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEUEM/qFOokRZZGDZPW63I+W7HDZFCbEPwGkQhe5RpClAiEAk8G5pYGF2BAD6b8uKDlzDxYhVjnQmopCuI+Ap1HMeNM="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202012300211_1609294287830_0.12970422056467323"},"_hasShrinkwrap":false},"0.3.2-alpha-202101052048":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101052048","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3193f27c6dcc51218b36f99d40eb333041d503d5","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202101052048","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-LxeGFjCqx/hxDbgx3E9sBgpQweN6kuYT0AMCRYE759+FcXXl+PZWkmDSCUpwuThH3JNSUowlppBIkJ4V2UaiVw==","shasum":"fa4e2f5e6befeea6e30db49bef442782347b6c0f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101052048.tgz","fileCount":135,"unpackedSize":345027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9NC0CRA9TVsSAnZWagAAHEEP/RART0zKjLFBfUf1gwVS\nJ+hQKSOvC7xtbM2qr198UxdWLCmxwWVwxgJc6R2eUp0efJWc19Z5GHUmlSbR\nvxcsrtvOpo0bdQ6cFHunfRT5/Ip7A5LaRyTstZZdGIr5Fs632z6utza9Ddno\nZI4z2gGPsxVqctWAMy4fnVbPgMIqkqSTGS7h21kzFfNftAI9NH3zobsirYqo\n1L93x7JbWw79FfKy0QZmhu5DGlb8A1SvsnWAK7fJdEfgzoZNbkwZv20BDBzH\nrdFhGIxWrQ/WELYQwF5tSJDN0YwDQ80dLHOi0oVbLRNhPiIphdZWXqAItMKM\nSvzellfJSpSGTP/omJN8rzrh+A0dqhfVCPc45gyEKH9B16OxykPPR8b4yJTg\nUm+9NERpiZQ72np8tPQ83ODiQm/GGlAWIg7iY3jgGKca9FAJiRQ3yK6Jwyld\n+0c3+Vn27bupzM60T8OBXPyhzbsTFFsJldNwSlOUCHFIrvOW+u5lhWxtlUnm\nn8nT8/k+Xv9cxYEmj6TrTToWXiglMMSvhpfpXAY7xYpahYLRJLefMMktLha4\nMI8qXm3LC9ner87MwJ1cIWTJhjLF4FAjqosN4eWQxLyM1/L+PXU/O6s2Hxwd\nGLeTSJvCU4Oak6Se0VEEM6soRBi5q+lGmBCg6q+cAya7ImYr2eRzTIz6y8bC\nNQH6\r\n=D8er\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA32y6L5tsMSpfojuaxoqg6VoemvCwcK3zkqaieQ8qfEAiAImfUrjx1jarlw3258r7/lrnBhAmwgWWKoY3QwlL4LOg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101052048_1609879732372_0.7273392318623726"},"_hasShrinkwrap":false},"0.3.2-alpha-202101062332":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101062332","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d2383c86ffd33eec475f5f9d1f96dd00339b8dae","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202101062332","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-zGleSOEvSCXOn9dDURRwERRfw+PZ6ijKyOBwyyfM/nbRhBaJhFv+Z0xSk00E3UQW+HwyT3fMl65eermJromicw==","shasum":"91edfadc4cb3c5d4b1a0adec5a57dce0427ebf37","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101062332.tgz","fileCount":140,"unpackedSize":362566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9kinCRA9TVsSAnZWagAA6eoP+waDYTPFlwinQK4OkXoa\nD5Od0kBCtrAY8O0dEwiFybIMwcXLYkVa8RvEl7bjJeAQ36tKMPN5l2FIpSxu\nGTBFAzeJp7gg9e19SY8k3XCUSjr7h8z6VbbKpETfrCr+Oj9k0r9qQUsKPqCe\n9x/BAq/2k4N6H2OuKrqWndYbGBZrYi1Z161vLwV97BOcyTzlY8KQRuzOXLRa\ncvA72Y1cDJaQZkjvof2alB1plVSTxSHSrsqUPojhnYRo0s4ahIJ8NW7Qit7e\nQVOmkBzeyyYNdZzw8E6saRq9URWiLRQk6BE7h0JwYMbtTtpbGxYsQ5WOS2mE\n0NGZVRsjo9mG9BhSepzwwPO+eASwAuTDfdMJzZOag8K/2MrtcEi42hsQdgZM\nhGhiagR0EvGONMQkoZ4m6bYtc/TdnbPn6m3Se7PC1oJszixhFFsuYTdr/SOV\nSe7GhGWBEt+3kIO6vNZUlDQrA4gSD+jsD5v2ePCTW2HkvT3PfkMfwTGCUsou\njLyK7r9rDtdk8uQ2giT0QbXgnMaNWxuzJpoRFKVcTwR+WxRHi96oVLimH0P4\nkkWrLH8Su7fAUi7/DBVajWxkUaivJsrUOGDZRtYTs5xwfcheK3GvFRS0WLzD\nLopCebxW/Juyy4tLrytig5HvsxrlOKBPnKARs8ZMwivxzG6wDJcI6EHy6e4p\nnMxh\r\n=AW9+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeymMS+sJIIelFozTDrp1eIRhSLHikuTkxGaP/pDG7JQIhAOB46R3DngDbKoI3Bwr0tYdyhqS+AxVhUq6m+jejaMsJ"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101062332_1609975974805_0.01450298350410617"},"_hasShrinkwrap":false},"0.3.2-alpha-202101111534":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101111534","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"22b9aa9f734217f8d4bbee899b928ca67c67041f","_id":"symbol-bootstrap@0.3.2-alpha-202101111534","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-ykScxcS4VoOLgQ7Bp/A4kllmKmEwXR1m0DR1PNSzFr/i9ISHmTY+BGfpthvCB+ZpARHOCyZ2rRlxO8DiJm0eUQ==","shasum":"1314784e079d9dd812efdcfa43ac5b8cf8cca2f4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101111534.tgz","fileCount":143,"unpackedSize":370093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/JpHCRA9TVsSAnZWagAAMJAP/2gfHJVSYfl3rLeD3KD3\nOmakxEcuIbsOHCacQE3MeoXSfQYd3tH+aR7yZJJp8sn5ad7zqrgR1B9t80UY\n7gtcId1YVUIrRR7sAOEgm2OTxaHTfw+YkChJ1TluoujBMw3HXEV/vVJ1CWx4\noXOrErywwmTF5TdIs/B/ZqgnZcYeSthJiViOlUjBmig/EzEqB7U7BnmxE/yh\ny8N3jqdbQNdQTh/So7TM932lPKgmFVHtkjN4pRKKZStVcm8ntaGwwmvUkFTK\nrqzu/xuUCfMuRW9uH1+S0Nz5BlwKyhPPJYUCI3u5HIOqO6+yeLiS19wkBoc+\n5we+mg9z3mda0Mt3cUsI049fn7RX8HERs220CkQDfT007TYxoS8r2mTYkpda\nvXnV3DtX/ZQN/MpkNc7E6w6CQJ2+dMScHkR3+1yCjOU+CXLsjBuY+g4fRa+6\n675kQfiNalWmVhyW9W45mtdSjMxa0hKG4XEHH6eIpANtjRnM51LF7XvfhqY/\ne9cqOPr/HugvjV3kvc/NqWjHsg9NbdHaP+sMT6oE9xL8qnn1//+SUCLZmOmE\npk62Mr23EWnxCh4kpTcqEHyXw1Ofsg02SbwpbMuWmBPEBk5uvGoKla7G4oQk\n4RbOODdoyeyQ+ZtzqGsxx8EBwQroeCXv51K2IVczNRZccV589f9SezKdhJex\n1Olq\r\n=W4VE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnjke13d7BvjcXcypzJe/YF/T0vqs07awmfLOGb7pOAAiEAoWOLFNr85jsdUi2gRoIj7959hGGldDj+W59ccj2u7ek="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101111534_1610390086677_0.8725372559928224"},"_hasShrinkwrap":false},"0.3.2-alpha-202101111534-alpha-202101111918":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101111534-alpha-202101111918","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2-alpha-202101111534-alpha-202101111918 linux-x64 node-v15.5.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"dfbff780a766dc5539dac83d7719c9f115f98621","_id":"symbol-bootstrap@0.3.2-alpha-202101111534-alpha-202101111918","_nodeVersion":"15.5.1","_npmVersion":"7.3.0","dist":{"integrity":"sha512-Vr3IO8JHewN8cSSOr8IOhHSOL/rRnRlx/GdUtpTOvl1SqgSbbLIwunftlVu044Aq5RSGFoP4TMzZ/29vORynlQ==","shasum":"f9e9d872f27bfe7c223d9194e8a5478eedc79d82","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101111534-alpha-202101111918.tgz","fileCount":143,"unpackedSize":370203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/M69CRA9TVsSAnZWagAAPTAQAJv2vauqh3J2YMXJ91qC\nqPtem+k41XRE0FfZ0ACMpWnKikbDZ65f9CFyOnN+Wa+P/Uu3WKhLgnQHb/JU\nRpwMjmDjgZwnBVX21fmTkuxDD9aFphCgd2y/pMtlgChLGOva4mZ6fptQj/P2\nX1jdZUrHY98GmeG1OBSbGW11fIsVS5gMmkCpiA6xSx/LTYTkGmW/LqTe6s6F\nbuyMPd+SGTDGW/OWIvezn/40OdIJ5jAWhv9HqsgeU53rRQAwQu8HCAhdv58h\nZIdbaXbV/LbofswYNDrLX8s8xgtMC+HsWTq5bfQ4ib1q2+StFzARFFr5C9Os\niqVFvstBsLGqfjCvQ66BTHjHe87l4esTx+ejUnxgmTy1uXiO1KP9bE2PQV0R\nEjbycaZbzerGEny+hxuQPKDhWpbv8uCQ8/auA37TPdqyJlJqSebfcz64iXKo\nJ33qD8ZfpfLlNs4mcYg+23Bymwsw5FX22MiTU/SMfZcno+ds9E8G8Ue1+JDk\n9kwZ1D4Aw1orM1tu1TTUEN/gqQKDgTrzouFPr23Zw6bwUHqwXaDAIkXjtQlO\nb9KpNrs3OsCNURWCgykpKhepFNOSC8a63ziONc9w1oKqiz6KNI+8MA62CV9w\n+BYSSjjU3XDBdUVU6+o3Og260Ps77+WWdQBuXgYNvH8AGxx5yCR/OiAxmh7J\nrQOV\r\n=wpTs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBw9VyBGmGSV4R+9q9QQEaLmOWWpDXBV/efS+i9lX8aAiEAvE41pbe7zr1C0Cf9uc2SB5KebZ9NlV3fjBrVW6k7Q44="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101111534-alpha-202101111918_1610403517239_0.42509714049955183"},"_hasShrinkwrap":false},"0.3.2-alpha-202101111534-alpha-202101111918-alpha-202101111929":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101111534-alpha-202101111918-alpha-202101111929","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2-alpha-202101111534-alpha-202101111918-alpha-202101111929 linux-x64 node-v15.5.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"89bd698acef5d72796836eace284cbc43b78d4bb","_id":"symbol-bootstrap@0.3.2-alpha-202101111534-alpha-202101111918-alpha-202101111929","_nodeVersion":"15.5.1","_npmVersion":"7.3.0","dist":{"integrity":"sha512-jLr4rC90SyhoctOlke78zmDMAfrN9pbVD9GZZ6Lc0aj05iTUDfAmH5AhDawpP7qjGjXAVb7lTwzw6d6N6EPwpA==","shasum":"7114c770d0f80ac85a0b20cdf4df06766dc14fa2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101111534-alpha-202101111918-alpha-202101111929.tgz","fileCount":143,"unpackedSize":370300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/NFFCRA9TVsSAnZWagAAESYP/RndBRC23vBPXjlXqf2i\nYjEZMoMulKRR6eeCvOFd08LRBeSFYEUAGGnglKzjUcEe3ogiSxkJATekw+X5\nLXKvTcP9oOg66sPweimId98/w+bwSW1SeVMvwyGX6UgCjRcjQXXCixI9X3oF\naT4cOsl4adpO/6ig/qi6MEX24Iatjs3XoJWSlC5EDgPTMqWG3yB5AHe4y/ao\n+FFKMCiPk0IK5Rv616jeFQ9Us0iIqTeWlsLzvc9nLhQW/eME9KRh4IAuP0H/\nKYBgTekEaicsUzogsGp0pFCw7Qmflkar8XI776LWmFoZHw0Zk/TjbmxF8lrc\nmTi5VNh+ln3L3gCY9N+lFATlCzE56t/qbtIRtvGGR6aY8zD/xhwtgL4Aj2KR\nBV8eSVnD6OaAGDTrt/futAFToclSUT65aePJDJMUecRNmn7mkDgi/H2VsvfM\ndB4GjwGOjcsgUCyshHmoYOVr7q4J+YVTHuRWbpqjqPEke9xP5aNfnRyD572m\n3V2nsMLWjWG2BpCYFkBH1yd3qwL7cIjopCxKAJksaL2W+Qg1zHBvG0j/zOW5\nNoHCnSCSvHvfQFBfJQu5U75aqQTvVPEBaF3WR10pA4fH9GMQGOnTjhJcmcXt\nqu64HNhNApmG9vDI1KoMUoS6MIr/FDn/cCwH/yU+vQ7eoJyhAscGoI7s51pX\nROqk\r\n=G5P8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6gwHJyemp4x/IY/01SYV+7qUl4r5BsAqCqKH5H23iGAiEApWUZ9mJZv/EwW+f5Esu5a1pzDQmbj5mPapa16a8GEco="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101111534-alpha-202101111918-alpha-202101111929_1610404165417_0.6828718542784278"},"_hasShrinkwrap":false},"0.3.2-alpha-202101131116":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101131116","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a3a7477eb2f814330e026556d06b9b8ff8b9cf65","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202101131116","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-LdYE7UnNQkXf2cH2+o3cLOG3uz2gRKL9D3zh2Bgu/lGHQXZmKZRUnVxoRrFsb6D6aGpE7xpoXr27s8QDvNLGaw==","shasum":"51fbdde8329930d7b198a28921446ccd5a17fba5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101131116.tgz","fileCount":143,"unpackedSize":370042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/tapCRA9TVsSAnZWagAA8aMP/ihjPRk89EgRJ8bx76xD\n30O1AKhRl2szXq8C6WN9kYTOLpdk+QrKj40237YZHJk14TLI5VXJkLzJP1An\nCWTqS10SwBmxSkyq+IVCHhSIFuP+6DrVnn/ZcdC6+3ORH1+9dDe+o9S74399\n5blY0+dPWGyJYK2sPiKjnDudmoW38/x1urAujn0M87X3to02pnVa/b3wvW4N\nXjxqjzl7P08gUN0cT45DvohaLQMdK0KTIBD97QHtGPxLbPj5aLhmbCEGECaw\nR116SdVfHSYZPbG6e3U2QxZG23E9XnCRcSlpXh3juYW+jQnJNG3EEAn50Eb3\nlmk5V+/Q1RjTY0XyqSbiaEOq5wAKCJQ/ODsB1KXa4o7JH/aEmScz+dr8oeNm\nDWWwqZnseOHuVmwmaXK6IRMtQ3p3ni9SuCjmd3L0I3pwK/0wc5JolCEf3CkC\nJCG66fozdz+oiQ/WlB5y8WGSwuNLIH9E4pLmIwTKDT1GYde5mpXe0W/WTsVm\neUA2Ru6JNLPWdjOXJGZEVLP5QTGBrHlFyFE8cGBEvYQkhi5DaGRHI4SKA2kH\nFyfPZDWCdi3f75aUPdi2oi+nfyTGFLrbYMX3em+MT18D6b7uKj6kyIS330hd\npynX+0EdZOlM7T50JZm6w4ovT2HnMoP+AzyWgka2+40RMsHOaxBeQ1NPgmx2\ne/IY\r\n=maV3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9Rplpy+1kv1gGGVrP3Ap0v2pfa52bFNEELAhOzrmbhQIgZcayKZmKOcLsdxdKi9MuPfxd/KDD7/ahA47FsHpMtCs="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101131116_1610536616789_0.7408404814143801"},"_hasShrinkwrap":false},"0.3.2-alpha-202101141810":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101141810","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0fbe3c9a1419c3e39a98b1e40eadd701bbf84c7b","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202101141810","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-zPkCBuM/ipLkLk6hJIdA3BL28auXdTgZdO592VjNREeNjK5tBH7CXpZyGr/N+Qhf6c1TUKelk5QUEvU1RlvfXQ==","shasum":"76a2ebfa168fc37f5b6ae805e468d05c5036fd09","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101141810.tgz","fileCount":143,"unpackedSize":370039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAIktCRA9TVsSAnZWagAAnyIP/j8Fyrwiy1URiQRJ8Tij\nYgWXQc1GTWHOhH58WIDVovrvwTxSzK2vevby0vGZC7AytBL3Co0OG2f/MSpo\njR/G+PcTGihgo0wfgq2yOBAV6dojCbggP8M1VxeK8mp1JcAtegubIx+HsB1D\nn3K4mYJnTCiOMDtagSXiNgpgx7XPyGSfPXPPwH00HphOvIoPPmEbCYCQGQsM\nQuaTg2jfLRw35AU5C5S64QbiZrfdOvq7o6p2P2wtaTSEr112rozSTgyt5b/e\n1UlY6fuOn3t/FdqLByz+0c0E46Mqim9C7/8fTAQ0dbTS8hKA64eLd91HURDE\neslA0ibhmylkYL4Gpvqpbv/OuwofC1JW2xvk7T/MDgdA7eqPrBO65QjPncK3\nE9rt0UwHYis1bV1CfQSaQ/HZADvtP0yZavLOfOrGhsagJtcW0qDEbwvvTw8Z\nD61aGresiL/QgjVRNzv23ZOnA9/jJfPvLB0lkrqvwcLIld6A1J855qQMOMrs\nyPPUrc+LJWp4DKGn4v4K4PZ9dFZ2Y5lu2YOBiqfiGbU6lOuEcUVWlirqVbU8\nqmfNkp1E3tzUik6bmL6zUL7uUUxo5xjzLdiuhveJ824XViLOIGqVyLhfckGo\n/fGA+VpdWR27R44UUHOn04VatkhbDdptckTt04xCm+MGeFLQJXWwNzm5rTB5\nr4Tm\r\n=TK26\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGLWU0Xj32SY8eCYQfUvs4S6uFfIVWBjPb69cvd+H15QIhAKcNjKBlZTA9VYFTMFp0bSB5NS/3SWtKa3GLTfeKvjhG"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101141810_1610647853303_0.2782343107718881"},"_hasShrinkwrap":false},"0.3.2-alpha-202101142226":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101142226","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8f4fcf90c890b44617b825d0123715b1520c3f3f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202101142226","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-X420NNM+9MfGKVEAxpNbVXGUg33FEhi9+P68z9uczvsUAI3mn4hTnovhKb6bGA4FKE7LhT1BaHsQepd/UIW5jg==","shasum":"aa7c4fd7bb7f6568ad0c7220cbde36a3e597b4dc","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101142226.tgz","fileCount":143,"unpackedSize":371699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAMUgCRA9TVsSAnZWagAAeBUP/1F8e77Vaa+frqubLsoz\nBBF8NPVtjYaOzF5CrFtbfbe4BFKSSEIDO48HzVoOh4MmzW5nnWhn6xHfI5K4\nusSThUs2R4RU1yvGVCka+vGshgPXgDRt9O/OQTI0RWQ4oIr3uiuum9Myw06F\n2zObmWvH2TUfV+i19VB4rEvQnw/sthDvUOGfblkSRjNbRTkLUFmqy4QEsEXf\np9LhrkpzvQeFNHdkJMLex/2aolN0KRF49G9Yqs66cIjX7L6mInKbL3P9JSdK\nPici1ieiFiCh/NdfpTWfMQfqD0ll4rzB1y42jP2BP5c2KgqmFwGE0zS1AWLx\nZ7Y5Z6Yag75sK4TBk3sEXNmOsZLMOboWFG4jHRz05ahEOJtGO1B/DrTXeMlo\nuY8NpUvJFohY1AdMkI7xzB5nJBxtPZHZPCpL5D8UJQ9lnOhVQ0FEgPRymgzb\neTwXOTrnkyn3kDEBSqkKSIHhlLAxwXcOm47eUUrrLz8s0S3facJYjiShO7A9\nPFwQoFnNSu/W0yW4fsTQi/Zdv5n1DwtW4SAQzV/vFQEPAarGzF9s21r1m/7M\nZbQPd97Y+swvP+wTungRia/kHS4pJzmXME7YdOVSN3or9qkIIo61kxPe1+uF\nDT19jszRkpzG4qCensZTEJubXcHqvnGJ/+dSUVf13F8uEI/IWuLYBD8W70CH\nXTob\r\n=1ybV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICVdPN00F9nOgNc4p2DXoQug3DPaoV+HlzVXtgyHtgrdAiBUyh5VDAW4eFHsalwLMGa4tlzAideB4tVbSJmj2+U+0A=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101142226_1610663199812_0.7102153966790392"},"_hasShrinkwrap":false},"0.3.2-alpha-202101142258":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.3.2-alpha-202101142258","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.22.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"6c6f3dbf3fadf89bff9d5f3102664cfffa4639ec","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.3.2 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.3.2-alpha-202101142258","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-1jIh+Z1sS+FqmHn88zeG7uXKJtWgcgpmHfThuosOWVjz42LVXVO2jiAovGnMxOLaocKbMAtnt7vZoUCVZJhALw==","shasum":"2f72890e0e7c455971d63c228d549e760ed73ff2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.3.2-alpha-202101142258.tgz","fileCount":145,"unpackedSize":380893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAMyNCRA9TVsSAnZWagAAHLUP/iYJLRBhqi3OWJtVg6Oc\ncfxfUl0sSD1wbFOVZEZPmxDf/0suVLO2EYgjCjpzK0t2Zu7ew6I42NwyRcqK\njPAohuWm55ti/E9xNqaJ94pHGcof3LjQfPbWl47VR6Ro9IEzwFAxuJk/lRQx\naE6B82GjQPSwSdBrv/DQISMYHimB4SHwo1Z2VStpi0XkKmXPLkfoWhxAoz/F\nDu6jJ/5/EOMkdVdwHEsWDrHZB8Zuxob+qsicx6J8R9aVw5TsmuLmIpWQkuZh\nY9BWKwyCT17FOK/QW3/Pjlf4aNOI33iEMAO38JdiFMvdduGMl8KUWkAxlBCu\nN1rYWJ3GcEvQ55lJjFtxjLmaEXzBmh6GmZlFZtndhIbvcZlcUjRf50lgmHb8\nHnksG8cGgsw7MXWG280ydx35ASX6gslrOvQhTQVbbNgX8GwwPLmhQ5hajuCc\nfgOP7NLt/9yePFsc4ow81iwqPsyJjO5TPCqCn1bCKJGHz6dxy7mqY3mBlh/Q\njW1EzGUBRbh98GGfI1lGABTk+BsmKlw8q5m04xFwQ5Mv1WedzeInNh1SCW9w\nvfS0t8gL+ojrW3MpkoJ7CII1TLZwScIvUSdRiSMiRuWgnSQem4ldziBE45kg\ntS2F4HwWfwq81UBFQ1MMd12qLeI72UyPKAzauG2y6E10R/5GEh6JWA55HwO+\nnJHi\r\n=CkBi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5Kbf8mplCS+QdUt/1FJV8wbiunSBJXHOT9pEpe0Wp7wIhAPxB2r8yWW2CZC+7K4VR7NvYv1OpDvXPzwjUzddzZgdm"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.3.2-alpha-202101142258_1610665100976_0.06866446570280438"},"_hasShrinkwrap":false},"0.4.0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"14d6374ed501ff208c28a8f9802c534eaa3350dd","_id":"symbol-bootstrap@0.4.0","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-ezVsIN70QCVeWy3ntfdYj2UjqhpFfga+jRIrGExC+wuHb9cpATM+fi2Up9vxViKO4iYwAUlrETDfYLJNn6inNw==","shasum":"0d84f50fbeeea3ea20011f7e1789f5bac718a7b7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.0.tgz","fileCount":145,"unpackedSize":378404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAN4iCRA9TVsSAnZWagAA+PcP/2qK7ty82De4KaqO6nFg\nMXHxStb380OQ6yplrScEO7xAkfDGjuNF2/2TGfMrVm4DPnxx8BJI51f+QZIb\nV6coIOrr2bGs8jwdVelLZbt5OOkXEJa/aizek1AS3sHQx2gVDibFReW6z8QN\nKt3sb+5kPJQAOlvaXNWfckJtu+REv+vpZ5aPhp1F6d7YotnboKOn2Tiw6Kqh\nD4lN2zRGILglUz6YPZFkSmnKL1aeMdiXygwmwDY92Zah6aLJYR8w/0RK7dZA\nQi2kleD5M3Aahs/XeBibEdeCwYGbyA8RYKMkhFnIN6lSYamWuLz8Fv9yEw3H\nahrmB5RxoU/l6yCGdqmmRa/uFfhjYq/LBdqB+pwMOWVTkRiyWRD71qDMqm9O\nuqCW4Yl9jrMC0/ULDDyH4VvkWNKRiqjSwnSbWeV3nKE7TM73KBvuUCWadyF4\nnFcwPXHfg1apU+S419Lv7D6FjNzQRSw39u8P1yivEiD7peqmWC5DOl27jZ+r\nl8kRWkK68DLnZ2CfqAuWYcN4EPCwudyxt4mYS+RA5srHItIM2HQ72H8PKq6D\n/fqR6o7ircgMKIXVmorNgOblCtAHB57aiIWgW9hgUFkGnRwVdwMaYQB08/Oe\nyc8WnWpG7zn4FCPp2zjaPWwpoM4Z8aC/qkVTMnO+5B7Owu48Ly1Yq2YvDyrs\naZPu\r\n=RkJo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID06n07MbRD05VL5KRsuI93j70Cu+FnXkURntb0gD+FyAiEAte9Z509CBjUQE9iZv5y9dy3OjU9KkI+pjJnMDPeTTfc="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.0_1610669602087_0.8408155304546738"},"_hasShrinkwrap":false},"0.4.1-alpha-202101151722":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.1-alpha-202101151722","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"137e9d59d601c3ecb6758bd5b49de09547cbc6d2","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.1 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.1-alpha-202101151722","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-O+x//8UweoZmhfTDJmG1bJ5oJYuoUdlYNpFL2jWFQIWAnG/uz7P4sSxClOdkj88bkXp/0pq7qLXEG2oGKb2WFA==","shasum":"ce51259a38c2944d624601769e0c3ab600d66066","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.1-alpha-202101151722.tgz","fileCount":145,"unpackedSize":378461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAc9OCRA9TVsSAnZWagAApGQP/jc0S2sFYAr6938i4v62\n7zEh8z40fEmvsLMlHYfKJUecY3wDrJX0SLxClTIwkIKeZv+D96CmXfcBe0Q3\nR1bDn6pa2ixckCqUXK2XWXcAP2ZB+ejhVU7ZzAwYR7Jow34+YSFIbVb4bJAh\nR73IwPAjUyS5DFOoX8fnzvpM+uSBEEScyIAcs/EB5E+KrlQu9p16A69n0yKJ\nV9cXlq7/ToqWCJ1j1qHOAf6nctVottLCh+9bT2iMOsC0tVuD/1b5HZevNhld\nnatgcHRL4GTUrNLdvWrV1pFY0IjiVJfpY9/+ROenBSaq8PNtdfZ1FXllUlnn\nQkfyNv8QSYCAvuNCb9Ke8HluRJfzYLEWjDMutyvDq/0JbMITmvcPRWkH9iQ/\nEh9MVs3WpbaHT58yAlvLEYPvp3RgJYCc4dJT8/AndQLruoiMIcB2AlevuVuX\ndy6fyUv8cMsdUlPQ1pc0m1xbAfLYXreY40QO68eFCyiUJqouN62N5zj03GxY\nFvkG0N+4bYjh2t0qcRAzkK3M7JOuq6sOqwqKWmk7lx9Hx/ncbm8faLfAY3N9\nyp0CziFG7qUIpD6ylEmDj6KLBtrI7Dcq/UO0NzCwgT+aBzHcaUhOstyZ68w0\nndVCR/yRiuvWHBtpuvAzwTX6U0XROBgaGDsCy0HDv/Ll96Lhm0duZJ0SWt22\nu4EC\r\n=GeDb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVIW1JSiEhS7+NODAgENogo/wNp/c9NntilW5/ooaTcAiAnBtMXN65zkr1EQiriYBsKg53G2cch+5r4UTYyIaQZ6w=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.1-alpha-202101151722_1610731342066_0.9498624110799487"},"_hasShrinkwrap":false},"0.4.1-alpha-202101181657":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.1-alpha-202101181657","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"22d80eb674fac9dacc6d9b9f32ddafa75de36db7","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.1 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.1-alpha-202101181657","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-7qAw/UFnUYM4MFJkdVVaGPfnw6SYN8PcSp2pT7Eu2drd+Q0ymJVVMfuiuE0RTV/TtKvtyPCmoM1TotUAYcH3Cw==","shasum":"2a6f27f481ca97ac06c71a8e2572610199dc816c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.1-alpha-202101181657.tgz","fileCount":147,"unpackedSize":379511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBb4hCRA9TVsSAnZWagAAEuMQAJpDPFrDJ8hf0Nn3RoCP\nMmb3oVw5LXBD2KXCQn2ebdU+EDox6MGqEO7gzWAfToCn5NjJkxdLmIVCwR5K\nhOD47+VtxA5F6iYNqttq2q9swYEwR9pBAm7X0HYHCeWMs0Xg1hml4h9wV0eX\nSsrz0BYKumz/lEm3N/4Lmt25QDdq5RzBJ+S1QeebzE+fnTiKDEE5SALzzNaD\nYDaJZoRapIo7ExolyKB3Og5YIrQYlKL0SD3OyANGRTJwnumT5emKPYGpY6NG\nNE8MPOtKoBgkYgLTiO5dnamRbiREWpyoMYt1Z44KeTvpvZvXN5kJR8UGj1Ss\nQp5vnYqIkNBBCXjOMmKzFs3o5ZRxgPILB0LGfgB/z74OKab4LweCXhF0LHBU\n0UbZI+xLEyEbH0mwwWt1wFpOTUOvz9qrK1GieEj/fAXM4W83rsjCTXV1AbPu\nhxxp+ZXRKp95iSi3SMxi2YFby78RrISaeMQAO7UTt0MvR6TRA7ocpdb8MEEP\nlv0o4RSDi9LbQVp3aEjQE5cNH0YCyeZnMPdsX8W2JyrU5u5IUHRTwbBFRP0W\n58E9mtNVKseItG3rKJrMG/q82A0h4kYJgw0jWVjaWUvFBp482lXNd55GY9KU\nkEqzzKDFlYJE8dwfsgNLnG73LzA+0h9eZBION3HiBubewOIipgvVEkCbNUyx\nl2oB\r\n=v8Ft\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDPd84n9BolVlj2WinGMLZeospkmIfF78nvPwrGy41ojAiAun/Gw4FaHX8DV3P5e1sGtW3pw9u1WswiFaDVuFssuvw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.1-alpha-202101181657_1610989088550_0.5698183440562397"},"_hasShrinkwrap":false},"0.4.1-alpha-202101181823":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.1-alpha-202101181823","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"80ae3372a219a914d79e71e4a39d51f9107d971b","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.1 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.1-alpha-202101181823","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-1/xfOZStooy57QwHWP6vGjtR+V9PFcBmgh0JtZmPrPStJ5a1joOtjoxdy7WxC2JdiumnodCpKclPnLF1j/WaAg==","shasum":"ecb61325a68a4df6ca0fe1f0fc4f64958912989e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.1-alpha-202101181823.tgz","fileCount":147,"unpackedSize":379398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBdJKCRA9TVsSAnZWagAAl74P/ROvfgeD2w6dwHWYB8EZ\nX26EjGQIx6glJOAXXr7ECTFpS4iFW0+ZrTYl8zXx83PBQ16gzXR0aegpYMyK\nZxFXilXgI/KLpCu+4GhyV4xM9Y6s9zQqYC3O0bdK/L2GPT6aUw7q45YJFDae\nSxQwlqGJW164FWbDL1IS9IZSjKbuzCwGpHsSmqZ3VirXpJxKMscHgGDwNjfz\n6KMrPd2j/WGGg7NT3iOq5psNLnwDpkXtoMKhMhy+VvZVpfvbYpnU0JEeIIyD\ninS2IrZOq4pOTVyKmvPKC9pGMVNcjt8Qlhr9Wo9F7MRYk7TZnwa35cYU6+kg\nKeyVhQZPx93vgROHPs7OgF+kE0mjVvbiHzSJbZYFUnThhlncDSgkS4EvU4fF\n0n25sFUR4p6dBXxYCx73jnJifu379RurBC3EJLUVv07XO0mNcAXbKdueAMe6\n+odl3Z+CKb+MqmkPiJFxe8Rj5F0Klqg9lQDrUDXlp8EMDizaXcSN127q9FYo\ndf6LyNB+jacOWdtYsZgAjL1IPETERGEGVUKUHe3SWok5UAlqizzl+amu1gfO\nUfFPNbHgUd37wslVgXpaAqoz1DGuGlZa2p8vBXfEvlnxBeNdtsiW3RR39ZkQ\nGAkcs0wqLYOha9YAgQAFDxCCap5Hnd5vvJb5v00E8jM9tGiK+1f3VWqCTIMG\n7xNM\r\n=pFyB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6Y6F5l3RKPh0a75Dwhc60cGzz9nxEDw1uWzmuT5Rz0AIhAPKj5KSYr4FBAAJBln1nuu8lhJLfp8LFNhkBt9b/rzEL"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.1-alpha-202101181823_1610994249403_0.12853862916575665"},"_hasShrinkwrap":false},"0.4.1-alpha-202101191800":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.1-alpha-202101191800","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"83b33ebf7628d965297b47f84f039aaa617be8d4","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.1 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.1-alpha-202101191800","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-Ni4yhZoafeyJzskMk7hWuQ1c3NbUlauoWGCv5ovWhZphLFaySsMZawjJAk/Y7SaBq0e+xv8KjMDi6sOumDIoLg==","shasum":"7a9c82fa899dc1e2e59bf467d7ad8923e2bd9de4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.1-alpha-202101191800.tgz","fileCount":147,"unpackedSize":379521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBx5mCRA9TVsSAnZWagAA0fQP/1e5kWwYKgNZhrKaJyA2\nP/63dXrpfpaeF6IWqW9wPjEzNEVUQ4n2nsUYTnOSuYPF4gziFc+d+rxBzw5R\nJHl8ahl7FgwqCSnzdhVONZ0dptb/I/+GHegJ0PI78EqsTIP4f+g80Q6fSVjc\nM7Za7dPNJEt0lsVZPtJ9HrGEddBrzVhbZC0OIG0KFsNGNNGTr7OM53suVDv2\ngjjLDQ8ApCSC2B1SKvI6w63+qCeYLBFDRvLWGl7Yxtv1ulgXMKig74NjGiUO\nb+oyRjVdP2oY3MGKAKqXElY6To6/Pl1Nnc6E2rEhmW1zX8TBXNn+DWdVKkOY\nVhRsgZWg7+msCzqhHEh75IXCoxem9SjEngxmkFPO1oUxK4aRYiRdTTJpk507\nIMf1VtU/pZG/NEqQimwpOOHKkiZrxtjET6TivF6Tm0nzxZYz6xA/7d/nII6W\njxdLmp1jmhWa2G0dlZJM39cf+sjA/aO24C42tSa5/r57DZmyyfbRxxHiOEEH\nW9S0XBOefpZ1RunFRHdHcEB/F0euC31lYUlRmqAxKsmtzfjo5ETPfa3799HN\nlZdMUflzyFTc18GFtdzcOkDlVDWLGx0phzkrzW0bOu/x1wvdRHP8irsb1rXq\nWKm045pyRvS+68bW+9DIX73zJpHtHCMXnt40EzQcAi9YlnQAVETy8F+zpqcY\nwi/l\r\n=As1k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICB+URBoi5tqRb7T5yy815q23K5UAf6PTGmNt711LlhoAiEAisjZBVHE4dzQDMqjKQ9Cvsh8/ldnM6rbDJsgv/KZFEY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.1-alpha-202101191800_1611079270378_0.6874495082813146"},"_hasShrinkwrap":false},"0.4.1-alpha-202101191829":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.1-alpha-202101191829","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"092230dec5fa5f4724424451593610893d3bd2d3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.1 linux-x64 node-v10.23.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.1-alpha-202101191829","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-9lDBSlNjqZjX5rWU2wuioLXyaWhRKvivbGD67TGFGfqnnLn3aI/lOeb6RrPPHdpLURnnmRor5XhLJrNhADct0Q==","shasum":"74ce6d604685853eac98bae93dcfbe9974b3d086","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.1-alpha-202101191829.tgz","fileCount":147,"unpackedSize":379562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgByUuCRA9TVsSAnZWagAAMLAP/3EesoCdl3M8m5QXYBOM\nkeKhyWdoYyPal6nBqMzBw0SbuYiyDXba9huXPxOHBtCS8vz0TLunIl52uVPx\nYRErVjmC+JYR6nshJdPBkFnqrbVzShXX0w/mHAWiRInVbJ31PbbRQLylRD0P\nMxF+pQvIfLKtnCGEg3sDLQ8YeyQdlYc/L2poay1noVOfSijZHV2crYTS0uEE\nqw6QJx+ao8mq1uvKJy6FFUxU7P0xVROC/4nwLR14gHYyPwf4ftH1978ngU5S\nTYfiBa3/DxoTO0iqIuPXVm6ma0+h1jpcau3hM8HRBoB1fwC8exrmy2PWysGJ\nhj4naYT0RE2dyD+17siFMHj465P1A7HGS7aPo/jus2xuwQmf+Dd41TAcZv8k\nsaU/WnFi3L57oqLu037ikXb1iIK6dgfm1XdKKyEKu9zFjxB9zdDkqlHj79eH\ntlyBUrnLET60cls1O2TXpVkMzKUSM5W0aPa5BuUC9/wzt0N9jEANJHz0lhnh\nToXGRvcoyrLjj/dMWy4aGwkBOjpnTzbyE3Qly8QhiNNZqmroOzjO5XpkTP8i\n3rX9LNZNvKSeFyVjkZ9naLfGbeZyA1kL2uAMP7bjsST/PfHdfzxzPVMDvr0x\nCGzPu4pXuersC7UdZZ26FWIpSehdt8UfeLH2JjW9i1XbiOBnH00fuqUyL/iX\n3sW3\r\n=9Lcw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTCnm/fJZacBv126Q8DuxuQGd0+wockZB+BE3WExdqbAiEA1/TR6CM7jcsI93nIgLXJLdMWixiZu3kqJBHifzN1Hh4="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.1-alpha-202101191829_1611081006272_0.809714831274359"},"_hasShrinkwrap":false},"0.4.1":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.1","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"509113cc9a178991f30b3b28f75f230750a8d771","_id":"symbol-bootstrap@0.4.1","_nodeVersion":"10.23.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-Cxm8wnR+atUKvyFRRG9jV1zE03vw7MYc5gIALsAsR6Tdu1X9IGU6BiG4e9CgCPjrv4HhA6wcuW+309eMaZBw7w==","shasum":"7495c9e096ad0f4015852ec8bd329b3e48fc1756","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.1.tgz","fileCount":147,"unpackedSize":379512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBybvCRA9TVsSAnZWagAA0zwP/2uzcjPeaTJvLFPs81uF\nTM0hVhhzDmMub9cRQ8NPrMdOZouzPZf0IbwQMJ5FElxelHAImU5wHN1EK9wC\nkCNZLn2/BLLwQbKHN2M19V+izcJjz8OzcTG+NZ2H1z8GeUB2v3rIFPJwiaDs\n9+nw+9XhqG+3SIHx2WZKNX+e3lpoV2B+4jso1GKwU8tGrO0KuDgMbKrk++gL\nOZkUREgCGX0Jsb1Mwj7lvwJgQNdZO2vhPjSL1ldfB8qyp265Nd2LA1WKM0LM\nxNSFVBxr/PbEc+vC1UDFgRta3Ih9cSFVnbtS8CLT5O4RSNyFpV1KySjy0PrW\nhCpPo4WYz0l+71YNW7w9T68Ut4YvL/GdS5O6Ep0l3Rkq05nOw1isv/+6dhop\nDbDDAD0MiY2Od/WIXiszaYfo84HcNuVKECG2+e8XYy/SEGfv1+0ZetId3qVb\nVZ5vneUrD63K1EtKtuWyqXBJ1YqlF73TyHouCIVSERXAPgjddi6UrtzbM1iC\ncg1C7zEr9Hkbe1Jv1Ne+TJdjr4/HvZWzwQTwRb++o6974UsyFnjGwiERrvwo\nHLBx+v19hYbXDdfqW76bLO5EUMOCkd14TaLmLX2EkyUG7c3eySIUoznpKg2Q\n9OLiiqva42cZvVg4g1D/kEnCqxHB3bgrcjVbms2jmWZthEPkY6JQeEOn27Xy\nJNSB\r\n=i3A7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDml/5cvL0ffYzb2DfyWF2trnhiZNpE2hmMnOx5GNZToAiEA8+pYfwEc2tpgzsU9ADCCpiUplnpK0emWXt2uOs9Hd9Y="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.1_1611081455178_0.28741842615232827"},"_hasShrinkwrap":false},"0.4.1-alpha-202101271058":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.1-alpha-202101271058","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"53420b5d9627e04fba7ee9ee99061f4de010d040","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.1 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.1-alpha-202101271058","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-biDkUxYU/zcqOcZOkGAUDF2IrXYf2U0dtk8PIIBJX/wHMhUWR1b16tMmN5ImbtGxXdK7McfpIPOKWxV2VL7RmA==","shasum":"f627bcb41598a2bb9aff5e1a7771a060ed2f9c81","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.1-alpha-202101271058.tgz","fileCount":147,"unpackedSize":379562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEUdtCRA9TVsSAnZWagAAAnYP/AgTWInyRqcwe5HR6IuP\nDu+8hk8FkpU5TiW2NZyDt5wxxkiFoKoKQzpl7MnZMbteew3z/tmqMCbigJAk\nhHE+Od/66LT4mIbACoEDe7oFCn4HFmGff+EwFSlmd/WDBk70f/9Hc3ljsl+T\nQk8BOLdOapp+jS/WsROqGv61BjUV70eflL1QEbklYXGP6/TejQDaCn4SJtra\nWzkGAoDxSPPV71SnP33iPio4ZwOeDtqgdcYbsa7snVKwyTNSCw1auux/w69w\nGUZd0m/n/mnODuTG+VUU+8l3HIh2ATTKWF9n7PxPLEy9SSdlxIN8yvpBNtWD\nRpBVuNDnINPPSaIq8T6ySIJfFhjZ92QRKuSYWBbO3wGbDijYHI/0O0L6NuDL\nQMrfsaAOjND849vmiRsLWPgYb4B4/Pye1c/JjCPUHXUwq28cmJer5GzlJDjx\nxIEtGnkdJP0qduWg/mmYHQD5xTdOTq45Iyay+fL+w9L0uAXWTKZRIl6FU+de\nTtddaY89jlJQK5GdW6TYM56/CYFavOxg8b8NbkXLKnpSAFUXdDisl7AQDf3C\nSI+u0UGR6fQyhZ/oqECT/JDFsTrphBqqqlMLtZsZpjamOh5UaF5er17t93S1\nJkya8KUyBfJs2m6t34+mIi+zw2h7A7si79FL0a8f/URmeegoGAXS3tR0LIdC\njz5Y\r\n=IMju\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCciyb92LZ8Sd0zk71ywtjBmIoOkBfPeYUkswNySHUgQIhAPpSdfUDBrDtStMgld+kqbwSdDa+CN4qZMs/qNWATXtq"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.1-alpha-202101271058_1611745133379_0.7430934917231566"},"_hasShrinkwrap":false},"0.4.2-alpha-202101271107":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.2-alpha-202101271107","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"0.23.0","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5a2cba834215b4028a06f7d57052043e869d66f3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.2 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.2-alpha-202101271107","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-+ss+smO3OfXDK/Uu28C09lCQsuwUaOnoYTogq30GUj3jIvG67wTCIrYNgtN4MqMF8N0oY1tjKI/tFYJw9pVq6Q==","shasum":"925417e6007df70d78bcf4469228cdf13d912c2b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.2-alpha-202101271107.tgz","fileCount":147,"unpackedSize":379569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEUmdCRA9TVsSAnZWagAAQtUP/2SBnaAfwjEvQeU2NYou\njocR2UAx1Iy0LREJofqbFuiT7QM5JJvmmhUuLi26eDBevd0/+fB98yw5WYrL\n6/sSI982Xr7ZSVVf0Uf7Gd3/BEaZq7nQOjyT3cl27O/J6BPX+09mvGEv61rT\nBVposaj7mhhyIr9oP69i4tBlnlEuVuhw7mkjzA05o0WQSow6oxyiFEnghNfm\n7m7lLxkQcF3Q9SLQ9ZErLtwLh4RgtGXo2ALD8XI+NytWnnL+xIGKv9uTkkJz\nZLD9HYvYJuk6wmZrSEOXWK0a+B5g83cpdrcOof9ZU4RySg24l79eYLiGhupk\nO4wofnEDFuWHkXc/wZ6xhzk3XPs1+0UzQhlRah0BpnbcphOoW1PM7r0qLNVs\n2FKB0QPIC02un8G6ibsQ00QLmFsm3LY+AqunMG1Qzhc37b8Cvm97+E8tYPmM\nhFwqTpuI1bf/B5/9kDWmZbz4GF7670xqHyak7v6Vnnky2fvDz9vXBYvChtk+\nom1BjWB0h6hjMJIz9Mde7ODj0Mk8Zc+t3r3GCveNmhOPcg2yGLjNLwmI/sJO\nlNNmARMj6txZvL+Yb0+csQx38DMrUT7UxhhVu2tNG7K8stRe0mHFeNsJWTMi\nHtMmuA3sqKogq2T7D+TSAZUHQmdZepNuydbvnjbJsecmFSM3Yz/fEdyD5XdG\nvpll\r\n=LTri\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD99Jn1p3/HppjQ72+gfd14BQyceXn9RfioEYxhhSLpWgIhAOLKCKmyyoLAW91fAVqpzhLioMMYZZ2ksJ1hrQuttXoD"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.2-alpha-202101271107_1611745692718_0.9368210491678601"},"_hasShrinkwrap":false},"0.4.2-alpha-202102012126":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.2-alpha-202102012126","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"03ce110607dab3fe96c3932af18d15ae2a3c605a","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.2 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap supernode`](docs/supernode.md) - It registers the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.2-alpha-202102012126","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-zZFuXTRzv3d17/hxGpQbgpolLWfPsOGeqJVxV44Rrl3YYM//KkN2D+rmNFBHCHthRDo/Ne5fdbxaJ7o2uzxEZA==","shasum":"d436f29c8dfc42ce8fd8eddcb7c8264faff1f719","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.2-alpha-202102012126.tgz","fileCount":147,"unpackedSize":402992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGHIyCRA9TVsSAnZWagAAUfQP/AqOo6Thq7+sCYe6PQ46\nJltaeUkRjDFinB6bBV5e1gXOyZ/2a+/nksGxfTd6D9Sy8HNeroj6mwrmU0hN\nJCvoku1KTYf0WldWD1/IG/9mIbqE9czl07hyhb1SDsCn5ZvJp1L50NhvbtT8\nHhzsI7m4RvkDM6peRKrBO0gvpZ8SmMzn59XSKIVxq0uMhh8MFbQR+L5pr0/E\nhojxDH6K+9Y0fHffF6sZVunKGqiIKjQxAw/yQsks6XQNAEtyGmxqd376R84h\ncmpqvQSyUYWHhMiOX66dU4ZWeRhgzopCy440KghPyZxqF8k663WNN20yyi5T\ngGD6vZIqQGTfxLyU793zPozuR5nwWvP80n/i0mJ4zLwypSbxnzpqHE5lTegw\n9ZOSTJRBNB1W0VjyjQlqRR8ptbeljr2TpGOh40yvR01Py+ZmfgNrhF77jO+D\nALwKqVGRWnjHQDSPrchQFU7tYfKh5O3A286Eb4XjwZRq9GUEyXdxBMyKbGtH\ncZqzV4OSlwB99ccsqZ0hOr+htHGgR1U4Vsp4lUV9rUzQfKOyYup9Jo3LgnVz\nUuql+95TyLUBcvNzqeqgWO152zDKX/7uahu/36pSwUI6eZ33cG6Cna5oGL79\nP5/9l0+ydwTIF1eKuAWgXzdYeyxnOPEB8kG0gDicODeBtlDtXdwNMjpqqeHW\n7SFd\r\n=scTD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0e2tdlNcWIFRps6yOt0j5SvZR7P0r3MOekQuA+0KRjAiEAtDvOa1V5wuG3X29HxI1u9snI9+354gf/a3xhhu/+OtY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.2-alpha-202102012126_1612214833685_0.7994201025795067"},"_hasShrinkwrap":false},"0.4.2-alpha-202102021752":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.2-alpha-202102021752","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"7dc0e03f50099ee440e9ac249d8a6dc7ace2cb13","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.2 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolSupernode`](docs/enrolSupernode.md) - It enrols the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.2-alpha-202102021752","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-mwd0lZYhXAlRW7DGYzD17aIfSXXYInZv+Vn0CbOD9Kf8Xg8I2HVjw9HMVjxyzdeAy8mKQya72MTM7N2bqs5Ufw==","shasum":"bb18c69a7dff0e0d3e3b8e620a78249331cfa66d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.2-alpha-202102021752.tgz","fileCount":147,"unpackedSize":403712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGZFtCRA9TVsSAnZWagAA2WUP/iTk65jPbELWCviT26A4\n2AVD1A9Y9st2EYfub0XzsV584IyLSCfsMvJcf/ZM0BGDo27dR7/0ue8dLjBf\nImcQJY1PfuNLbsHWlPlHnrgPGGVo05tpPL9SxwtQTRtVB/MA2B6vlFwLMidZ\n8YLqOTLo6B0OMWtclpiy4DAttVlFxblc81XTb/PT7lV5jTTINn9q7X3p0GUU\nTM/ZpGGumaumBdg8NZxDoUHrjhVMGSrKYcv90p7PvEV9OK38g2zwyne1Rpg4\ne63gvX3GsPxvLBs3AVXDXfxvk2WshG4/SEjz0k8qHtPE+valz6EG3jrp8rJm\nfA6Q5710Tqdv87hLVKu45aJAGkArfj8D+1zrA5DAmOsipvztVuDMr6RHZkns\n7O3uI95hhCSCZeacSbTSSwu7EZgkpMqtUCxquZEGANJOpyJrHc3bV5O/Swoa\nl/k5Un3WiyAqXouzjqpTL8hYFKDYC0KyV74nrkBWr5Ip1yHtSyHL7H8hi5Xw\ncbqGoQllCJgzyPl3RJnNlZa92GoP7Tnx1GrazwQsv5qQtWBoP2LYe3t89vLJ\nkQsMo1+J4mx6Hq0wlsmvFgGwXJP2KNghf6boNgDXRQGbnvXJbsIHu6OnJss+\n+cFmW3kTGbfzwEKcs2Q0XsVRO3im7D/CPJVmUmJGqOSFLmnrjbnUfrB33R4E\nj+tk\r\n=Bo2p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDV2CImJDrf1YCuHEQ6Jv2FCLGjnkGFaXjZMK+nMS+BpgIhALCmdCctkQKdO5C7u6RgnapqWHi26TBG9p31ixc8VyXI"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.2-alpha-202102021752_1612288364638_0.07184791177854488"},"_hasShrinkwrap":false},"0.4.2-alpha-202102022221":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.2-alpha-202102022221","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"de1ebec14d7d2fcf93a12ce8faf6df685ca84076","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.2 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolSupernode`](docs/enrolSupernode.md) - It enrols the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.2-alpha-202102022221","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-h7ZTjhefPrHLQV33L18+GCQllI0B3JwWhxW0vTHw/hbmfBd2ymtUHisvHa4fSIblsJ3rQjN2B3ZTb1yhypmeXQ==","shasum":"104df002594456c6147b35bf04414d8e2cca8498","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.2-alpha-202102022221.tgz","fileCount":147,"unpackedSize":403998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGdBhCRA9TVsSAnZWagAAmIcP/3PYtZ/axVB6Tu9A87UB\nJPVVhwt9iAAkkfNbtDa/OEEpAUyWu0lLfa8BXSsKtiXZ3VAcXqnGAr/fPWEH\nXGa70mlX4MI59/jA2+7gmRXYt60OKTK0BY/RD8gWbL5lATD15mPsM5t6Q2Ms\nTKTZ/ML6UPlD6LuwWA6xh52dPut0JCJ1g2/zub8pdIiwhiPBnzb/Itp4zvEJ\njCd7DJs3i7B8lN3/GCRdZyn+plraCMYRVTRE+xuOg+P1cWBeao4G7SRh8qBl\neJlAg6YhjRyAf9FgL0uUBw1em4doV2zjl87NDUpBJQVsAbRIJbTN4YM9BbfM\nCgpZ8/YxN6pO1s/0lajRTkm0rPewhGqPzWZWbAbJQhJcfhEi+V2Oxbro11FH\n6sQhSYGO155ItcCOBnk9s7OUWFjjlNSP/QiS+s4EPeq6rhQ3dvzu38fINmAX\nKEV0ExakZe4XGvR5obD2jJDe9acnRSzzXsU5v/ATOqYZrsNtzcYmnOpTrheK\nZDV1f4GM6U5ZOR97cgtKovshtZ4Adu7AAKNMx9Kq6HBvv+hq1K7BaFLiEBzb\nZ82wNcdhrAyNOU1/NysfuyLN2wTebs8Z4Ljd57D2/VZxvzP2kMbhiQlvyQBN\n7YkcBvbNcHlkuQMZ78wuEtWBFGMgcrpMUEOxKu7z62eEdLn5WgDKdWY98/r4\nDr8N\r\n=YX+9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFp1p8V1QxsyFhweoV/qqaediFpHPzjiN6b1NWnqfgC9AiAxkEXoc4P9Iaq/kClyF91WIuMO9rdB4VN+bW7Uttm8QA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.2-alpha-202102022221_1612304480557_0.8170141601608043"},"_hasShrinkwrap":false},"0.4.2":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.2","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"122c6c293b8a7c509bc61c32b07775cdd94d91bf","_id":"symbol-bootstrap@0.4.2","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-DhhQ38DEVurZBKOy9TULoyuWHHj085cvl+kiGqQ4gw+INaSRg7rGdMdxdH2jy2xFIgYnYZGYRnI0B76H5zrpww==","shasum":"22c07cfe92364c338b40c831f0d2264896a51c76","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.2.tgz","fileCount":147,"unpackedSize":403941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGdMACRA9TVsSAnZWagAAdrAP/3uDCEHvswrsD7IxT1DH\nAKVIGWaOC5gu7JHWFd2admUVQXUk/IStwK7alVJu6CQLlm3/JBgDNru+TqGr\n/KwUDMVPnK7SuX4cyqgdNbtBskBo3sX8bPnoInRb/DKAIzREHxihsRdDnr9p\nS6hqlE9Wfq8ZK6xvQRT8jYWvkM3lmuFcnREoBBKOpiuPMHV+YD8V2FSaPx1z\n3+vM/A7f0w9xwhJwBy2tYax58SnXN2rGXQRHBjTZORhBluwV0FmJooBsgVrt\n4yj8sj1AxXF7J9ntHv1A9aoYuNdNKzkLExI+KPSf8zAykPuFpY9aCGlZavre\nCjVZ+3lbGJp0HOCuqc7Md2JD77TbmGLuy9O8nDoNzAItOD8psrzuzTaCu0zo\nxEIs/vOx36fCVyBCKHxmgm4cOLwo6Md0eqix4+JCNMo2SKfuDsAx+/Qmeape\nO10S22u9QqvvuKkoPcwdmdCnD5a0tQlWHLI2LmoxIUPImJKFRAEWk8hA6NPw\nY6xonwvMzTuxqAiUTYPj8mXL60BpA8q9QPKOD6v6AIdn19LpWDV/UGN+i1TY\n2yCXPO3xOsKwG+tIuIOZgvXHYEDajbNvQTFQrqZEm7s+HtGCxPVtn4kD/Uno\n3S0Mpo3sDllkHp/CNcNbcRygjsFLpQ6GxoDzMES1tPqROwCGqsavpr5f9+0U\nfa3H\r\n=9/S7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXVJvHLzY6+WGCA3em9Ayrf9o0WWrWR9SRREncShbHTAIhAIVkkipQ5i4jZOvr7otJQNIMNtztmNlOL7eqWs2jssfg"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.2_1612305151947_0.051665072549869295"},"_hasShrinkwrap":false},"0.4.3-alpha-202102031204":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3-alpha-202102031204","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a93517440996d696de59044e9ff2b6d1b113a9d2","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.3 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolSupernode`](docs/enrolSupernode.md) - It enrols the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.3-alpha-202102031204","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-TScEooQELN78yR2P6HrFigqVKkeJD1MJfx+MnLiqxyRCNDmpsy8pg4Ayvzlu40QVeCyiSqIBgF35D7BEudaI3w==","shasum":"6c4ca19fb9992f70174d6ac625a1accfc915600c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3-alpha-202102031204.tgz","fileCount":147,"unpackedSize":403998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGpFYCRA9TVsSAnZWagAAGlsP/iTmMieyZymd/PGhVI9d\nSYX+7Z0s54rbqu0pzqnzCC3GARL5Gg7l9PuQRifAcQCyuoGzYDN7RAPRFpEi\nllksAKEHuo+V0OjumCAtQq7OoUz9KeSzOQ+ZWltQS6thSa20a7plZIWnMhks\nke8TUwDmHsMbqR5DXBE/AJfNqnBv/mGDu18CBJ6ySD27YHdyJfcKZM812Ryh\nvIyATIlXQPXIDv/EfBzwmTqT9JjIeN/upljhVC4dF4TsjLVrPKw9+w3Vk3ZM\nKqbw5mFTxDyObAlyQqar7+KDlv0brVyVs9xbwFN3ipcqYHY3QBthN1/HeX1n\nEv/dwK0HSmguij80tQu7gh1pTt7z9TMC1AGUsXin0g9fkTF3+UoZww9g15pL\nBv8VSxiysZ+Dy8V3z+9fGxsJv8HFQviSJyrZlXsRBivSbkVUI+nILi2Vb/IO\nAeqcl99k0uosdgxZqohdNDtWteeKw5m3YM7uISDPnYgItQzisbZ7kn8Bk/xW\nWHm2/PW0f0357sHGViay5QAA3RSg0U+rGrdL8OZNFHM9MP702GFQerMwVFV9\nI4z757yOhoX8Or/Tw4t+7w3q/dQbZ3THXGwSs/on0gNKhgRQF9BTVOxyYyxe\nlfim6S5i0CZtyFWnOMbqP6T7ZIRDVC6HYhbhdsdHVohAUIbPf4J+myKRPTH5\n5OmV\r\n=KGDh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0+zEYkpjgN3FMISYfQ7WpqesWoO6RgKbhBMJL88hBBAiB3JzkVn5D2MOZjbagqFO9ocBZnYOImDekMUrOUruCmlA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3-alpha-202102031204_1612353880039_0.3881833101492549"},"_hasShrinkwrap":false},"0.4.3-alpha-202102041912":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3-alpha-202102041912","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0f37de7e9d71a3401dcd6c2951ef2693e71b7e5f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.3 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolSupernode`](docs/enrolSupernode.md) - It enrols the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.3-alpha-202102041912","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-Oh0VHABCdrwPmQQtVE04V0I5N2WORdTCv+RrE2vWcKIF0VZ1MCcRFU/izVnqGHZGaKJAgwak1zSvd95kj/t/QQ==","shasum":"ea8068d05bdd1d5a3fae2492e505b60bfe0a1587","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3-alpha-202102041912.tgz","fileCount":147,"unpackedSize":404903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHEclCRA9TVsSAnZWagAAWlUP/ixHe7fuEf2aVrPCaEP1\nVvNpsHwnIRmIysJwV9CDTUSKCI+JDw0ECXShR45vTbMN91LuJDePb+f434of\nud6XqvUsmppy2ec6pA0dzG0IrvQ7Mp7wV/kmEll+vbBp9D4jlptuSjG+xGlT\n3FdqmJAQF4YpWzVnXF4dnlNySmyV8iDLr9K0H6RSJLaNXu7lNYlxtxOvwZft\nP2ArwlQk8IL4rgdv+OhYbOKwicdtfQeOgQd6sldhZYQ+vlOZMeUgnLwJwLjA\n9OUVa76y1hEl9hy6GbVXr81zeQLy3UQUHujNvXfVY4+mrPiXCj6jRCGRlB5o\nRuZFCi+knaTAoDOod1+jdQ4VfaBeP19SH7+xaQ6goK5Y9VQxBySZHZlYFUnE\ndfLVtsJIB9YKE84xtaPlXi8DiJAb6/nKZi5K9qWbhmsfRkXZqf6+CB0k7YEU\nrYK1j3e6ZiKDiOSY81vhfkykLlRAHzucsz5Sy1dW2pjvzSeKggSakqoG3gOd\ngivdmucG27/6qSyZ3tETvlqsnPaXn0MynyVlU9P65OiQBVR+pDSgS6Wa2ntw\nd0uRsWxYozrrbY0BUGaq8OqlYh1DP2HY1D9ZC9pJ+Q9xbBEGpKfGfH/8jWrr\nPuEv7hj3drlK13YYA+B0kNYG1s4fk7MhGg22eFsIi3hBBpGzf3mJYNb8MSCm\nrzqy\r\n=Ti8j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICBohXuMjZvS5Nh+CJSYY1MtSG8RsPfa4BPySXH2zWlaAiAeR7cbGj6IXMvUZuIxT38XW/NB97vohilaowsysgFq1g=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3-alpha-202102041912_1612465957074_0.5623786193490534"},"_hasShrinkwrap":false},"0.4.3-alpha-202102091345":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3-alpha-202102091345","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"6f96527244e629b3635ee21f11c47db303b2681c","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.3 linux-x64 node-v10.23.2\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolSupernode`](docs/enrolSupernode.md) - It enrols the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.3-alpha-202102091345","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-knHWBEVW/z8mdo//hReHv3gNfHF8elTjyHWH3O5/dbdIIJu6Hci/ZAKKOApx0HAG/FRvEuzLpssS35oYMyTM0g==","shasum":"9f7f5ec2ce73631ab7e528901089efc669ab6dc8","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3-alpha-202102091345.tgz","fileCount":147,"unpackedSize":405100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIpHvCRA9TVsSAnZWagAAYa8P+gPvQso84Zil+Jj3ws5E\nXOxDYi6kaFVmrRfqDkcBl7rp4Zdd/c5Oe/ncK8l6sAWUnsNbWzNMDUykH1kY\n7CCGArEqcFNQ+HYqzEUJn2a0tGYJ3LP7owKjJUJvGjxE9W14oGJy5uBg7+ke\ntzfVtyBWPNQ20ljQWkJSpoX9in/awseVpPeysoPWoVZs2mkio/tThRO4FN0o\n6XrYBzw2ndxJ2Dv7ECiY+uZ2gRXmwcQEPcvJ+9nQEycmtas41yNSdMFEyCPp\nAMKjyoxtx53+1rmMYnVJb/rKbhISZlI7NteBsL9njspJy4G2jcRUkKzn1QPI\nqMgDnQp0mX/LCdshzkKEpoYWXDMtzVKRUxM7KnKOCTjfD1zZvqu84rXDccOl\nggjIy3FstCIo+vAyZIU3V7rm87eaF/VnCFLt0fBy4Sf1LDNWLo1hGDAlgdY9\neWXySuVTe0P/JV7Ksgdo1V/5krBlTVhYKRF4CrHP1QvrwUMV2lUWtcqjKrkG\nNs1PgYuHaxFmCDlUaBoR7QJjWnVy+PwkzPtweeZN/1xVFx2C1EUqU/oUk9Lp\nET7bNEhkqb6HEbacN2KDFOCSmsA1GwAXg9DqdWCIX/SNq5r56IFSfwPrWWYP\nVOgPMapdFxVg/Zp2es/mtspc/u/9gOw5j2odh8im7JFxUCBaXah5G0TXHG1j\n344o\r\n=mzqp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrc62RZVtGsyHwhIQIZp0qxvRKSKLIi3L5k4N35pbg5AIgXJ+A7WLm0pcB7xlGU92gL66OLTpPT6/g7QL7segIK4s="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3-alpha-202102091345_1612878318771_0.06649130294781491"},"_hasShrinkwrap":false},"0.4.3-alpha-202102101009":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3-alpha-202102101009","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b8a3bb723ececcd85611c6fc55210b47cd5177b7","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.3 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolSupernode`](docs/enrolSupernode.md) - It enrols the nodes in the supernode rewards program by announcing the enrol transaction to the registration address.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.3-alpha-202102101009","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-k64DSQWjbHBGDy3pfUuA/rhSBQNTr3fAj25Szra1wgFCeR6nrTF0mG8HY17VRqHd0TwTrI2S5Fw2oXmfFZoQSg==","shasum":"034b4d90480a7d0c6e4f78e2eff90d89214fe71c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3-alpha-202102101009.tgz","fileCount":147,"unpackedSize":405175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgI7DrCRA9TVsSAnZWagAAEtcP/isb4S6vldj9sQMjzRhy\nyvUF+NUgEcMM0oWO4fDHp/wnB/tPUZU6MpVzmF/UP7WtFTH19iNI28c2EfAI\nSB7NFFcVPZOgCR3jpMp/i829tJsCcrC0AO9bhs6qzrO9SRSN90c58HgqB+x2\nozgovYuUnLflCNXg+m7habY44LyTRbUnE+yBAvxx1qiKviexO1L2OskdxqHq\nIE9Hou5URO1uZVp75zelyAGS6EZoMo7QfCZeHrPnVKTypfV/z4nP8HJuTY52\nKAGSVOa8FLGoqUUN3FPhlKIk/Brmn6+J1VFFca+K6gluv65/jAPMSnnAQjrC\nZKg7YInevERMv2CqN5vZBiykTQYjdslqwbhvmakcK7eVVNiR/rEIN2epj9Xc\nsLVw5T6TIFvfKGpTdqJMVehPWuy9o4KKu6QbTs6Wz1JXelAb41oFnGtJPU2M\niiiJ+mUy/xxTPUDhPgQjGSFjxSyLKNfVBP8YZB1xDA3OGG5ouAnNh0lMDTe6\nFeQ1GG/OF5hO7Yv7LU5WTGUICctEhP6zceSU41mojvgfHTu1T7FEuATZIP07\nBMlFk+MCErLcokflfkpgYNCAbpbMzp3d2CAOjvHF2M/c0Y1fW/JeQpmWYA75\nXTVT9wvtjL/LAy7w9sCnCLWOmfhzWxjtOb+JeNHFnwSWeAR9Cl+fbnbSxdXt\ndu/+\r\n=hurX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAcV0cdj+bYEr/tAL8K+cHoTpLl5C+3EXJ+OAok9qQbwIhAMc/LWtFtJFsLemQmUaPQ/7i4jkKH3AxrcnrSrMHqhGg"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3-alpha-202102101009_1612951786686_0.8959946838225328"},"_hasShrinkwrap":false},"0.4.3-alpha-202102101040":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3-alpha-202102101040","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"da3790fc72037842ad0c6d1cc7668ba59f72e649","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.3 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.3-alpha-202102101040","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-lCLknGR/P6xvoB09SX5dtRDpRhJYiOORIfCVxtTTBlGTCFHT3G62gctxpaG+pbRy7W3ubNYcOB73vDdubyx61g==","shasum":"0ea6319bf5adc691a02a05674f11e91fffdb5aa1","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3-alpha-202102101040.tgz","fileCount":147,"unpackedSize":407816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgI7ggCRA9TVsSAnZWagAA3YAQAJhQ6NbqplA5PMV884v6\n5bE1nIBOav4GzCej+o+7S++WZXe27ONuMEnEspAyGTwElnkrx+g4ig5sivLw\nnqqE9ELANjk1/fAGBZz3Eu2Cr4fD4+AbjzUYRJhDEjB94Mo7HrweeIBfhWf5\nzG2zGYtl/27c0EipvwMBl3uAJHVk/G4e3X9/L3iEHyFyLGBrJR4CTQANhDer\nwlLQ1y1Tyy1uXmtJea5M6mcK6T1q1zp3vTYCaLvvgrtt8Nx3a3pv2gl8eSd8\n3zrj8GOzyfk222hJzL8bhyFBXbryreTMJSFXHz3jr4sizHqDo1Ugyos/FEff\n6/Ck2aE1VmNTe6Oub0gqCREOgrLWS1QRr0nTJmORSkLj/iENcSlmBCWvgW7y\n9bMy8FM2FGCBdKSF9jbnXqb52+UfXIG8W0aJm5NZgKLpzuL+PW6fQj1HJahq\nuLC6ab/q1FRMghmgrRTYMp4hZFGnqB9Jgd41MadPruB+QAYP3qccocLxe3NQ\nhYwy2957lQWZV4yb6KxAsPRS73GbaEYO5pgBENwDs2Jy0hCNHYD1QGv7pIAd\ntvpEVf+bXzDrphrDVRdZVL5XrfoHeuAIV7wYUrDjL9N2HLv8lLnPWWGlBvLh\nNh5FDaQlJpZW2R2S0ju+AactNIbxpix+tdZ7hk9t0AHVjabAy8hHZb/p8n5g\nPv8m\r\n=EX7P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDq7RUaMod04ZvE0TSgWyVAab9aoyyjI7rEfsYO+FmqmAIhAKnLMW5In2vYqH2SaaTkeY7wQmO2KhgmZ1U5JGLpN0Ke"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3-alpha-202102101040_1612953631825_0.20205089625027672"},"_hasShrinkwrap":false},"0.4.3-alpha-202102151844":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3-alpha-202102151844","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"ae9833dc20b3d617d8c82a87395e7abbbc9991eb","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.3 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.3-alpha-202102151844","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-2yvw1DCB/KMDA5vKC1iPfqYyj7mVYC22U3CO4Amp5faucQ0B4ZkvfgpJUfuh4Sn+OtEZN8YYN26GfPVMvwTx5g==","shasum":"ad3f44c58473c564188a5a0ca38630d816049d06","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3-alpha-202102151844.tgz","fileCount":147,"unpackedSize":407600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKsEMCRA9TVsSAnZWagAAP+AP/2P05YQyeKgGOsc8181s\nFHKOREwhjjTJQ5VKqQvaBjuqPZ7N1aT0SJzGzAJBW6zWjh+9DUK0aeOtpUIx\nApVnjAcO9G7bb0oXtXIoGQkKGShiZZYNgOPbUDHKfpWiJf6XRi6xQK1egGtU\n+ffuh7Z5gFdqM8GvudJcP3hbcRiRvEQTg7lGrqt6EAL0jl/I+SpiMTc0kl8N\nUIR33fAQIs9dHG2uxuufLu8aP7pIAyOWYacVC2xrDFHZ/sZzP6OokOcTRwUg\nvXqfxJY27e7ub82QohPfGTiCWJKdjXIJ4iuNkvgWcInhfznF8BuO2nSB6lY+\nUFdBL6Nb+XukKQHIP6JA/ilNuVEV56d389yhuiqKKOOoK3s3qLR4Qm+8QnJb\nOcvoK22hA89Pq+4ZnuDGEUYdWxEmnlChVO5N2UMwARaxJEOvslarRBz8QTgj\n1/wC8LPmBGipNQUhvHa8JHBjcrMpJJBgBjH/xmMuAaz2iyYvo7PwIiU7U7Ib\nUiOfcQAA816BzVrCSA56WMFKJdKqxdqRJwpB2L8XWlFif5tk0JsgS4P5zioc\nk2ICMkjrRgER3EI7myNi2cRsDcreVCaTWccvnbLag66lWQBKQTUTpeKynAx7\nF1f2kr6IQuZahRvoctHbhY8USR8l7nMj0BVBDBOe/XU8Z48n8DRXyDbz82Qs\nkKOP\r\n=ZaR2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE195VHx4UZpkaQw5KeGcRpruyrnjJ2m/tHsDK2mpUNzAiEA/RxzfoLQQcm9QnuzSWMTQHQDacJDkkcaPTFgb+dfbOM="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3-alpha-202102151844_1613414668079_0.8455921141652265"},"_hasShrinkwrap":false},"0.4.3-alpha-202102151900":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3-alpha-202102151900","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.1-alpha-202101271842","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"21d7f09a4c3c62d3037b5bb3a0cfa86eb79265b7","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.3 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.3-alpha-202102151900","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-/Q9hMLwUJWtsmnCBdg96g5YfqUSiXWJ2xTSSQl1JA68SsyLtbUnvhKUgjYzQhh6QgL/akLWz5Q/o0Vm6AVppxA==","shasum":"8449b81678098fd046f348f852b9322afd19001b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3-alpha-202102151900.tgz","fileCount":147,"unpackedSize":406181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKsTyCRA9TVsSAnZWagAAMMQP/0Xjq/MihXaRsOeAgRAD\nRYlJwgx0tFPfhccAXbjQWzSCuzZXCkMduzyiYCOjJVJRT4xDOrjOenYuiK3L\nWhmp4jPMVh8KVp6s35IMqzDJSfw7fQQBCQfyurfwpTtjzbrErM9mdW5miEql\nXADxspJtAaFm0wjfvwnNoFW+d90hjpvp3HZbK+O/bP90sqmEJrbW/ZxYohDZ\nyeFOxMLdQ0N+XCAvFjcTTNkQlJZ37i0QeflFOVx8DN/ju1buDNR4loVk3LtG\n85B9ydNyks7CIaOrToglIbzu3yoYQPPOBBjOYhPDoYElyLOXtHKlklRkW4yK\niThUX7SpRTXme91Ba14XPqNL5pXPUVefMjctXjGn+ll9Go8+eZfr1o7/JGEK\nBUwbE7vuk7Su/4vWXysnTgIZ5plADGC3nJVWlvBDrJPoCPEki2t2GDyK4r4z\neiPwoWtRImKpALnT71SKqePNGvoWYvtFzPaUOJi6ATBsEI1F6z8KPzGgjMEt\n6v/YDA5NfBi3Jsvqb0QoN5E/BopTY860or7SSzqSgiF03wmzP6TkE2PBv2Ac\npPd2EiEpZZst9ZpAKpQsUT8wVy887OV7wdFWSW31G5mYK+60/ffq7bwnB/fU\n98SKZIbNjoj82krp6oJxdpaVJetxIRrVL2ft65spD3q1U0fIcm0XzJazP/gd\nlKHj\r\n=3Uym\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVq/USbd6Vkb4Kw9pveieabktHeAZq3ULGXSMUab2hwAIgZeSRa3j4yIA6Fa0ZbfsL2KqB7aBreYpGc5TnE4viC1I="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3-alpha-202102151900_1613415665509_0.13111750180131443"},"_hasShrinkwrap":false},"0.4.3":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.3","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0811ba1ab70bea50f2c5ee997cc3a0f6bed196e0","_id":"symbol-bootstrap@0.4.3","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-swoCfvaJqWw4b5NN9YQDlvyWIK7Y+AX9pmgwVGQ5AVWfTcsNclFPgOYbHZGzsPoait+oXKjVBn8Ptxkv8MlciA==","shasum":"6d854b92c20b9a3b71e88b4b2a703f4334a3d193","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.3.tgz","fileCount":147,"unpackedSize":406401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKvNdCRA9TVsSAnZWagAAZ28P/0YQcW15Er7Q+4Qt5LFm\nBPes7czSIXumC+QDUK9YG+xKiDZL9tfn0enXiuABhAZqBx8WJci0CN6vmAoP\nJYAa5LCODvI9l+ap757OAog/mivv6/tDpaD9fXNzH/w26SFfjObIoDSCjXPv\nsgSGucBXKjusd2wacnYzJ+vNBX8oTkHaxbBOC4g6sKFr8zHX0eyP1EaRZDqQ\n5gWqGD0+GL4B/4LId+Ft2o5Yqakd2THvcosyNhbW0IrPeeF6N1FSrDXVb2U0\ncFaF9644QqNpuxKG3ATuDHOPZsKQxY8wk8IY+EAftyPumMw6Rt6aOCotA/tm\n9RXDSzL5wcnUT/HYjvn7v0L/9pGJCPqRvSvgEgSR8bH3JAbBKEDzTrhjghxh\nD2N3vGBoAsDjXbE+2N5Q1cshMFcDUEISL3ma6JNvjVNs2XmzYQCbgiWGMr9V\n6gKnqVKPslDoDPWphArBylZrzVivPVp8qS6svXBFsM9shYnie5TXBuj9kOXU\n+gUIu7ETCbB32Firn07dIFVDk0JhzGAUN2jyjYydBjZ2k8mewqugwojjIgHo\nKB4AwukL1aGIJv96FuIrkbyjuuyy0Pq3dcPJUlSB6hdsQYjjqbVYakQKTmNP\nGv8fjnttOo80Lzq0LVdJOnTnnDPxhCj0a9jPRWnp6KS5NYjYkdrXa8M0eo8M\nIuTM\r\n=xKgd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDltyg8mG6snvrsfSrlwrgeKszyPKVaHGWwmr0GQSJoBAIgISl2dS86RqodDWb9gIlleGO8JhpKP5/QVov0SjGWYTs="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.3_1613427549231_0.7445017235685099"},"_hasShrinkwrap":false},"0.4.4-alpha-202102152233":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.4-alpha-202102152233","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"03a4bafdf8e3561d2057016902f906aa78d92a9b","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.4 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.4-alpha-202102152233","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-HVX1KuvyTk3aJTCESY1Ii6/UXYEWaGWETt43sWxalu0cCHFN1mVoJjtQHaBf7KjmKiZMQzlYDEvhThB6iGC1Qw==","shasum":"d66ee7e23a2a67325b00727e2e5786a88018063f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.4-alpha-202102152233.tgz","fileCount":147,"unpackedSize":406458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKvbCCRA9TVsSAnZWagAA/5sQAJiJYwHX6WPfX/PQp1Me\nTHdchY6XA01T/x0ltORhXtg64kUbftl2QznMa9BElOaSehrteQ59E2gjeu9c\nqN+I+4faaBmp5N4ZxFcZbqEtro0cWCBQJjXdIw+d+YG3wZVP8SGHth5gKNK5\nAJlBpelJsHilMn/ZaVhrmtLW2Uvi2RW0WOt7jt8+pjETI2YL7j3h+q7xpEnW\nOFJEPB1NGQj/bQtZmwMThBsbPS2SGq+7x6izVgFDIS4kQ9MPIG96UXdHjR8Z\n/b1agtKk2oqAzEksR/pLrhDv/Y/uTh/PJTQ22rmoZH5KF/y8afBRtthNmeOJ\nxtZwaigIkbrX5RLnyetQA22GCrXQez4Fumo23AN6tq0RirNBZz9ZCnOPmRnE\n9RHbSGwlcyvHT90bh2+iUbKG2QVzu5ir3f9+Jdi07GL5lybiyyVYNhD2oxaV\nNj39m//S+MpQ4a3dLhfgJFBZn8avYLqvl/UivyT3G0xsEMVWcd+Hiv6iqjB/\nawlzKXr8PV1rwUJG0Hm5Q0YljSYbUCWRsJBWvfdCCFW1TPlaZ7dA2AcduOKH\nOfH9ACmUtcRglA9KHWEFc2F7bt9VwT/q/9AQ+1yPKldaNFx3qyP3fpHgL9WT\nKOB/TvrrH6O6eNTYiRPyoXOjKPiPbIBfwK3nSrNDp5bMK+BiZjE96KzSD36M\nI7x9\r\n=wGxF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA7/kH53MTJcAdvin9KACA6TglNr7xWsmLa79qBi/5k1AiBrzhQ0GN3xI7pqWQn+21Wh2xgLfnnBVEzxnME8fwXGpg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.4-alpha-202102152233_1613428418218_0.10695899942403342"},"_hasShrinkwrap":false},"0.4.4-alpha-202102172017":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.4-alpha-202102172017","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b162f4e2a4f756af44ac5cdc15e4fbd602bcaf27","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.4 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.4-alpha-202102172017","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ykdaHUml0qGvMLFYzqN23tm1Gw/OWZ+rbylRao95bXilqTx80x5Uve5llTiQS3kCeemJrh92pqQb1Tf9Rvd0DA==","shasum":"2f0a152123cc0014b6c2a0320863003082d03f96","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.4-alpha-202102172017.tgz","fileCount":147,"unpackedSize":407857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLXnpCRA9TVsSAnZWagAAeKMQAJiofZz1pVPgQyVZE7MT\nZY7RZGJlw+h5HNqXo2+kyqNqRwoWxngNQB7Xvm2pvQEDd/RBQNIOp6nBKo7O\nqEDaxQhjnHBuYSbF1OfQtPUzC6RiSW17mBUw5PCAU99kNWHov1T7nZyN9ZOY\ngRoW0OWkkgOXIjcKvbEF0X4IEot1zm0MPqWTzYAx0fjrM8/qpq3z9lOyUxVw\nASZNU0405IgOebrcHB5APJhRzqkJEatTZTZjReC78ExtZoYHp6brFXzOIocx\nA1BuZoUl+x2e6t6/8wMCJ7/r6AZ44/VdsZINJybGGdbFSh+zsMAGBLhE5uMz\nyJwsmAEdI6ctXUjqGqm2dDni+O2hLQ9SgjIwnzCSF1bghMQFlWr9IUYSH78V\nw3Ca6sYMBV19OoONn5lDiEpRzbihf04vIAEiRKzu6Dw30WttfwoRW+SVIHn3\nzncasi1Bf3Pi9k4MVav0CfVVST8s1pbQjXW2enV1hgPx0OL9SClznnE2chxO\nhPB9mKo5cX7Z6huXwj1M9WaH4u/IDwmWNCUr9HV9vEBEsDxbRf/8eLHQn7oq\n/M3Akxd6JloGlVeLA8KyQNJRa3y9LNdWe1wp1do9yG7aJaUEnwA6f6XwgvLL\nCB1qnCXw2j2n8MrVRUoElx1a0tTvIAuRSUN+c6vvwt4jHqEvnwrSPvZVpCIB\nx4lp\r\n=7r0a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+Ty3eGl85IobuheoaLkKAEZl8HJEp+pTUEUBz/mNK3AiAfQbFDoi6j968dTaF9f25dnWfi7qvGOg6A/CNDxe1s/w=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.4-alpha-202102172017_1613593064384_0.4772537638911847"},"_hasShrinkwrap":false},"0.4.4-alpha-202102201802":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.4-alpha-202102201802","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"7e17e57fae84ee4250787468f980410076a47253","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.4 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.4-alpha-202102201802","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-D8ewP2GmA8nDWBRMg4UjGAa1kOd7zhj4OU2gr7tIGaVGg+I6/19800emDf8jIKMMTgWnXeQ2OeVEJx7j3+1SZQ==","shasum":"1503f5e48bb928925aa47c2242ba43911e97ba3e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.4-alpha-202102201802.tgz","fileCount":147,"unpackedSize":409335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMU7FCRA9TVsSAnZWagAAxwYQAJl1mWOtgZM5dClm9laz\nR0S+40N+5hBxai/0C/JKBFmdfXYjCHftye6kah0wsljWHn2FZO6i1idzoM4R\n8HfrCrsJqKJ4iI3lE59HeKCJsBonDbXYAv1H1Htm2iTN4loU0wbYRCPMn+Wu\nIlOmnHykXriMmzkY6ToqD6O0e2lpcxwuXnru8cqiIv2UVjQuALqMfwa7SpM0\nbi2rvbXjHwmh6H2Yngf6pyONSsOC7vqPXDPqiRZidPQ5v41Sfez9/Qj5EkZB\nSKOfgF0Gi3/yUmWslEDeiBFn6dl3pO0Btk9qNc41R8cRFOBwEhUGe2RS7z+g\nyQWBDq7eEEJ7X/ECOE/PQzjj5Aqr4p0xNhW1Ca8QMvXQi8/UD8/uuhJ0QtyI\n0k9atdMl8FEAz2Lnncrnx+mYG5XIA5p8zkI1oz6O/zC8dUGfZjv+mV5pE92G\nAA2D7Ncga/zPC1JbA0ZBQhndK0ITiioWxWXtrzFubQf0/pqMtPWBSoybum6/\nYpabQ4WXzpusLEpIaXvOqAvSzzXknXxnVVJuABwB7JKEz9bJ/AkBr60ha+g/\nHEUZIGLPjk9u2CX2q+raJQ+QjV0aYvTA2thWst0jzRlmmT/vlq4oSg51E5WA\noSdW4xgplGvcrWgXVXgZB/ve6EzgY3F3KwOMHHPz615QCsT/pztXfre+jPhL\nwWIp\r\n=Cvg0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFw5k8p9m6k8HPr2x/bKT0lWrsz9mx5i3S+RoOi8cg7kAiAT+FKuvi4/QZrJtVxo8vEL1b1Cma7ezJmy8tTZGmjqIw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.4-alpha-202102201802_1613844165103_0.7940311766477139"},"_hasShrinkwrap":false},"0.4.4-alpha-202102221748":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.4-alpha-202102221748","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3e9142b74f6f89cfa4b9c88ef2a58611376ec066","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.4 linux-x64 node-v10.23.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.4-alpha-202102221748","_nodeVersion":"10.23.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-WakVfU3j0BbgrnPa+H+vAC3cRAVLY82SArN7SZasQSqZY1pfPd/dnW/AVgbaId0QwagXPsL2hro9DQU3cRU5OQ==","shasum":"56ed120fe31f6a94fa90e946222e25f7e3f5a05b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.4-alpha-202102221748.tgz","fileCount":147,"unpackedSize":411146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+5iCRA9TVsSAnZWagAAzXUQAJMatPT4ePtSB4nY2lDI\nPBLtdOQyUUB5tyNUa2RZLMQfR2LsM/lu+NCKfsDW/q1ibuzKtASemOTz8PKh\nhgq2QMHYcFPnZVKXSKteyIDwq31ongHjl4v4yKFuBnDIABE2c0SKdgOSS/53\nxvA/NZxYQqdmcxbhUCyyW5VT+LRwyGKkAJlh6tCD9sI00uMAOJRYi4+KyFeI\nmwRolp1gsj0upuRk2PJd2WpjGvxJZzLE0HpUZpGYvDctpBB8WDY7coI1NiAb\n+S6gPHxMWUsVUKNxntpeu3mqUcrQnh75Tc+Hj9nSqKEWzoGcKg0IiLMpOqrL\nAXeEj8W2mmEfwiITu41YRXdYALbclZOsRWpjOZCC48V6/w/dOSIHk2PEVsbV\nU9BoU9Mi70zR4vu/tvh5AENXbAQmoRy8uS8CGz57wDhALvnGPLdi+xTZY+Yn\nOPZGiLR1ciRy2ckNR6crdLGXQcHBuAYEU6pF447wOrvYmo9hJxZEkuD6SOj8\ntYzOBldqeBoEAkVSd6Q+D+ihnUs/4fvsZqt8PoTIhUJYEYYr4JdrE02MkSWP\nWXepOgMZBkUbjtEyjajO5HHVvE4WrihQFiXe+UY+hdkBAaNxINXgNTYhPVKx\nkEaaAEuYHDU5r1ik5pg2JnFfWnMl1L8lqCrFm6PaSNMxrUjlOUPV+9XwyIPQ\n5frw\r\n=++nd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmE3CTRKtokDi+OsoP530zJxlYm33vA7q/7NJ3y8sEZgIhAN10k2+8TZ52V1aHsclZncM6matz0WlzyRQ/2fshvHbL"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.4-alpha-202102221748_1614016097799_0.39246488672195445"},"_hasShrinkwrap":false},"0.4.4-alpha-202102231606":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.4-alpha-202102231606","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d2ab201338f26f040adcef690d424e45e652f0d7","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.4 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.4-alpha-202102231606","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-p+HIBjpeZ99tS6X5g3c11YHKKuacuUG80tcNhizCTMy/6RYnTWZ3obblilLDWoQacXAW8ab0Gohw1zSvAmuYuA==","shasum":"5633ae7c4ed45f601200fb05148ef817c2e3e6f7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.4-alpha-202102231606.tgz","fileCount":147,"unpackedSize":410287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNSgACRA9TVsSAnZWagAAJ48P/20U1mUcXX/JKDRGLWZy\noFecbzXg/7J/4duODpDtBSS1yq2VL/SMK48qID0qG5rKOldtWwUlkgEv+cel\n6RvsdqvbyR1cIYSD5eXAbNbORrQV7Vy7c5UHo2qnFKQMyO9zQ2rLOrKrDvpD\nMqt9H8KUA2vECA+NsnbpPcnC9ED7KEaMmG0sw8ZdzpvYBaH9zOE2lz96evst\nANwN8oC1RZsck34UhHiTJ2LdDgHMWNULKRL/r/hn0nhUMmFnlFaZBSVtn5gU\nO5Y32qRAKw24E7RA0Mb21/AWkBVrRyshUbjhsGXKWavoOz+otI04puYmZWqS\nOJf7/ngdpAqpm1bWoRAiSujbFs99o0KKZ0R0GMaiKZt41KNOIMdIZprGaqcP\nZZC1OTdEBk5ZR2/mnwGnEajxMjh9UPXhvyha0ZlDTNvcwY2MErcJmQ9zdV7s\nQdWYoBcvv2Fqu78XN1FYzKUqeycRIuLcrg28/WOB08DTkLUHC4qRZV+a1ZLQ\nu9uTSD2McQIX0NcJTLWULreJdUG96/zIdyiwwMBWnrXkaishUlmxXU34m8P0\n+3pyB0O8SXFy42Fj32qjnCuEQvB1SV/gGF9jnNIw2VmOrCkt6YZ8ZtMkVrBG\nL81sIurgKDze3E8mJTtIh7jPNPiJwBfHFaOg97/qeakYBwIY/uxnF+hC+FJz\nUsP1\r\n=kyhw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3lOW4nQUsRK+b7+iJdDZb7wlGgdedjaXq/aesGCycngIhAJ9gfxNesVYXmeEy+B7DbdsaV0mQhVnMh2i3uPdTfsOy"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.4-alpha-202102231606_1614096384189_0.7284874974967446"},"_hasShrinkwrap":false},"0.4.4":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.4","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"73998bd7416bc45f69f3c872a0992c9845bba697","_id":"symbol-bootstrap@0.4.4","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Q/a/wr0HHFeMcMiWLJoc1Y9BA0saZwi9NJR3MGDJ9uZfY9ILjGLbdIMi0nEaDoZcSpWkNGuQPUExIE/RGf0Q0Q==","shasum":"6d984a4da82b5e668b1be916d24321f37b87491d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.4.tgz","fileCount":147,"unpackedSize":410237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNoFPCRA9TVsSAnZWagAAMmYP/jS70b67YJkEkvYRmW9j\nMnJ3KjbqUTsFbexegjXJUIISVmznvtHJ8Z9XjGbIgGfecOc9a1CM1gKdJos9\nz9LZGyaR05bCcMcuvsNU4bpgdDEQ8KYATH/XosSFcvimoEn0X5Thk4KKypm3\nQsNbxU2TTlgXrH1C5SQvii/xMntyFTod/rTLMa+MtY+/2f2Mkcw5fsuYc4TP\nksFU3YO00Yp5ixuayV0+D/h4QCkj1oyJAs3hJgErF0fJXZFiV6LYcjenMYP+\nEXLOMoe0d7tTlFQtq1AAkhrjqSKZ+v+1QBV1PnU29a5b5iKml+h3oz1sCsUo\n/QHHWxwv6oanFtbWynO7NwB4afy+YMNMZBKy7vWQ2Q9q8EApcJWxa3N4NE8f\nCWKw0C8+Yxn5e/fRh8qIqIDwhQCPwdtFr7P1jLwl7HBsfTHvAoiu69X/5mMe\nuOAhxY/UNBhOgbe4aQb5ifUNDkdgMJglSrC+wNM1GO/m3EyKrJ3o7m8xeypz\nrke0jAZIdMSzST5H7ocyh8juglvH0UCK+ArpfCcU27wKKUYA9B4GWCR8Pu8/\nNlAYG3kbyW6VMQ4Epe271/wWm3mJdC80MFesxCZnmuiZV6LzbF19XcUSyYNG\nq74EAt4iWGrO63CmOkLTnbpLYFdBjqLDvvb22S52VALlPk/ryo56kKWIpgyF\ng3EP\r\n=7lU7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVa78CZNatuioFsJe9jI7kY//tSjNzsYa+w1LgGLBqMwIgDHBD/IiTlF8/CYARIeujlkTjIHRZ1py+8rzigBUzYyo="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.4_1614184783219_0.9222732290651694"},"_hasShrinkwrap":false},"0.4.5-alpha-202102251414":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5-alpha-202102251414","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"eca2c1fa09e2f91eed776f606bcab9550e395d26","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.5 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.5-alpha-202102251414","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-NVearS6ZfkSIHrMMuJuUfNTIHQ9ZAAFyGCE0WB1hSTw/921/hKK4YgycPUDvCiNUuwTm4nqnEdOyN4k4i+3ogg==","shasum":"c1178d8fd892d20bee378eb7bd29d2c58136cbc7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5-alpha-202102251414.tgz","fileCount":147,"unpackedSize":410294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN7DPCRA9TVsSAnZWagAAumEP/13m/hAd55b8HiWmYqoN\nwhAArXhFJ+frwdStgVf0b5kQ8FVAOtdsMQ8kXblmKBYlR2sJ6vz0GPJb9TDe\nNXlgdpYmc3S/puCTRlVVRn7ztNdUYYdERA6EWTvNaskMZCT5IpkcRIYDeVbe\nS5vtNdSPtaVbdpmhE6cKokgErtnrGhoKd3OIDjlywg40oWiHV/996nOUZRgt\nTgvHRe6P5fky61koAbeYl9i7YKSq+w8U6hLQfIpbh6cc6JtYpG46JzKpEgQR\nbCt3EQCeuKhnqwIP2gCMtsyMtE3E0a9VSh/txXqSkNrEnaOfZsYkjYWMthux\n7p5Di9WmbI37TFMUImR5rS2249kJuuoC4Eap4Oc7eLIE88MxSwl4t10C9fBk\nJwICKhn77rHIqC5SoxmWYJkNOuR5iBZYW1y418PNV0vXQPizsg8EEdiINvKJ\nOCqQHD50CMXZyWCK8fJ8MMiLw6gZJOqaGY85UUPuinzFR5wYq1c/a1ftPZWb\nD16iAy393UkLwwF9eM8kPvTmN9YG/s/spj4us1XHS7PSJ2T/Tr8e/FQts3aO\nszoiGereMzc7p+vsgucIfAoUJj4L+gyXEVSvOGVjC0li7vSnmq7y6bB0kmb+\nHWyhrTKAFSm2m1AsdA1rykaEJDK6fDWo2QD1qd+8Qr+YK85rVZZon4eaIVcB\nh4vf\r\n=wIbI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBSMrvjVHgH6Gd3ZO/6WVZvvLKWdL+AhZlC+EMDUFOvAiBGmJq5egjKvC3/fMhprf+IGS5qmlRiD7taN7/JpBu3Pg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5-alpha-202102251414_1614262478863_0.24351541519986264"},"_hasShrinkwrap":false},"0.4.5-alpha-202102251531":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5-alpha-202102251531","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@types/inquirer":"^7.3.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"dae7b480bff16d5fe98864cf0c0396c5adba5ebc","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.5 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.5-alpha-202102251531","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-T/wIaF+kfoQ+0d8Xdh6Jq9gotNjjTFHHsUyilYz5tIQtRghvsySQsSkKimo1VBLfE/o5FvU5vS2XOTDw+Tg0hg==","shasum":"f253b167a13b522021d54591362591bd2ea6f377","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5-alpha-202102251531.tgz","fileCount":153,"unpackedSize":433379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN8LbCRA9TVsSAnZWagAAD7wQAJcNRadkcmIE7c4dqpEa\n9KBWjjMgHv7lpwH6ipilXWhRyN8+9Gy+nMRrkomnmM0+FmvvG7fPfoFtaNHW\ntRQtZs18Y+TM5l/F3ZzQFK9SwzfdOjNInxJ1BQyZ99ONbKDQDMQorXHp9i6l\ny6PV/4yf1baVoVMKWNkF6Y5PQ31Dh1w3oI+mBacJ0FFBvBUFuAfRbL6nMz0F\nLiZGaPHIKXtIyB+TDYZLpaWfd2eThNWYk+jveJaFGq4kGqGdnsvXhcwi3WmG\nOi1yRCYdmL977zzR9GywRzHDdAGwYrFUazwninr1eeqEyJUOVYT7TxVMr/TN\nlxw/w+ExZJmUI8pP4iVZCLQpfz0D8m1eJbkfXl6N+HntKW92QrVb7Cyw17KH\n1wulAv6u1uFTTU6xKcalCdcmgzBQu8MCoPD6fQq680a+pMjZ8HCNMAgfIPGg\namjnJsl5XgzpaYXzP45zvA6SiMUmcx9AHVMGGqNgXh0UdlsoQBY0PYR58UYY\nPQKM5yqlRAEWCmbkNTgFEHmw4dz5lAM//uuYz05KhAlTKL0PZJp3DYVyiVBf\n45fBDlFqPSpp1t+/Cg0FExl/rJDUutpE4MJZrl4Omi7Vu/SMqoce8BhuvEtH\npN/5dwZsyMhypu2nqhnjeBYmA4CW4N5yNtYP57EokqkbQNVwR0zXgGPFvNTH\nZupm\r\n=oEjg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLKDViL3D4N83bBZiU+lMBRsDtPb1dADoDfirM+wFNQgIgdGu3PgHTmijCwJFTqg6fdoDKWxPD5MM5JeVicgffFYc="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5-alpha-202102251531_1614267098642_0.7706368571014688"},"_hasShrinkwrap":false},"0.4.5-alpha-202103011623":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5-alpha-202103011623","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"89e093167aaf1e15a5ea50f2e54f0b0f31dd618d","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.5 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.5-alpha-202103011623","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-0O6eXddPh9/MURC4L4rnMTfQnBmBOWPcjC5F+c812enCiz7wHJHtcXfgFDdoXZcthhMLVVt+oV2iGtEcLn6Dvg==","shasum":"9bcd5c39bfb649adc8e8c8e3d17d955dadf2c9f8","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5-alpha-202103011623.tgz","fileCount":153,"unpackedSize":451848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPRUoCRA9TVsSAnZWagAAjsYQAJQ0W8xnfeAI5YRzgRfe\nEWrWO+SPcFOuqrPn2jNEumZwWf7BaXREpwjrrDFxfPPkgBCt6Ynwa/fqwa9M\n7CQy8/PIyayyaZ4pRwuXmcqVOsHmy6IreCyXNFdqVvjsirVMuZZEfAXxxYBg\nYKnhF86PJBP0Y9R0T7moUY77uGosh8oaZOILCN7RGZKjZ6pqZFKkY89C/6CA\nrQC+lrrrz8JktyeK5mFfmfcY6yP0NM0HZMnWMaEzI4wk0MTh4rdpJ1A6Cdgf\nQyORwNjBbNOFWPJVqTd9ed6Yl0MHEkAfkYGqT7h51PaSWzIOo8Y89YILOp1n\nSJnbDEVly8yEysDKMxGhd4oFhSJMoINjZoznboVNZ5lLNlGoCIk0ibBQozn5\nSbzlY3eMcsmOHrm0PcsgirIcgMeawwArbGQc31py3KERKHMQ1f9GAP992tgR\n2n056iszUwy+mSjR0Sw1xzRcZWLfY2pp+fv9+HQZ57ggPbXPb8eX3eB1ycmB\nkIyw8LBUMhNIfiXl7hTMWEAHJDWwvmOiTUHKO53vUlhJoTSPuJbUQ8cgxNzM\nK34gc7e4NQYuxSwnGH2RuwCubjA2RYz9fHQC9Pk3nmnsQuOU72vzOfbW6b7P\nI+ZdLyK8m124Hz/7lt+ZM7TwS6tGX8Uy/20mK1xc6uhWd/1MngFoW+xWKIwX\n9LHk\r\n=TXT4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5NlvIOgp5HuRXd+FByYZAOzaq2U3bvRMV//W59Wkw2AIhANQbhxILdJ1upeKfvFL3AMpkhZFX4aBPjItcqOkbBhy0"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5-alpha-202103011623_1614615848015_0.7587710297569505"},"_hasShrinkwrap":false},"0.4.5-alpha-202103022034":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5-alpha-202103022034","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"35a2f976d0805da99c5e8a91d122ac224469df6c","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.5 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.5-alpha-202103022034","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-TUeFbQyStZRKbbsmCyhuzDRAWuQHKYD4+ErjIFa3cjF3xHZ+hxG2NkHUxbgymwQNRA9JzgJzqpMEO7jJzFoFDA==","shasum":"f9cb3f406ccf1f8720552bd61a804205aa704b8b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5-alpha-202103022034.tgz","fileCount":150,"unpackedSize":454105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPqFeCRA9TVsSAnZWagAAiGIQAJKUuUFc8FLt14XsiUlK\nfiLUhVU325voDO1mAE6i58bx1uYlmI682I2VKmX11yeQPQnOLB2/gKoTcgMh\nQkuv6UXZ8a4uG8KX0lZ0QQxVsD+7qgXeRQZ+IxPJpwJCTl82EsXgoRmJ3Qwa\npsJLoowIjZfhJQSZKabAeB2g+7O8477g4SrBrxiSHrECN/oX8RB/Ty6EAbJA\n7C/k6ee/fyahfo7KF8k/oQxiJmz0Kj7cph5dtu3h6cD3KVi06vUkjY7y9ocK\nz3UxnHbH5YgWA49HHlTqKQwDOHUmxheCPHAXP41y8kHdwBmrYUdsBc6kFBIX\nEM3AVzaJ31KiDO2Fu/p6y8ybFEZA+OecILnO545CwAb+Avl4hzlEjODAZ5iM\nW84ynlPZjHIevXATwXGYzZWYSQ9jBlSNA8HJnBloGqQUauEnGBo82AOIZ/Sm\njz1yNFEN4vV0QGdQlisnKPB9ysxTh+MigM1L7m2GVeZplQrGbAur2WU9+fIX\n63knpl7EZ2CJp7d93CM+sPnHBmH7361bSs7yJwyN4VNe2lhBLwYSXXzJeu3N\n07RSUSSlwqN2wexualH2g5AClxeoYlpTj9xzjkC5UvS+6hHvSvFrao1ZPOJr\nhSU+ZGYDuhYuX27UKIs1E7bIxQaKyD7GJ1zAr4s+J1MzgKC4Ob3gIrOu+vkc\nBCNZ\r\n=lMCc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHS06CqzvN/YlqJttBIfP7rLNx4A6OeLuuNP9FLENLULAiEAyL2l+9yvgRfoo1fW7+eclgxgImXDuEVPl+IUtBlzZ28="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5-alpha-202103022034_1614717277579_0.508911679258613"},"_hasShrinkwrap":false},"0.4.5-alpha-202103042220":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5-alpha-202103042220","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d6428f9dc47e98afefb216a333ed50184beb4864","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.5 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.5-alpha-202103042220","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-zo49qn0SSuOMUWaUuMz5kIaK1tk4iFiZamvXx/OcrZmybolbJSap2fug/Y33BmUWa77fEjHuOWpYjd6z3/IxGA==","shasum":"7aa298d9e473dc93646fcf04ed0d31bcc825752f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5-alpha-202103042220.tgz","fileCount":150,"unpackedSize":456435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQV00CRA9TVsSAnZWagAAFP0P/0uiUjbumUvEx21bmc7v\nKiQIwZvw2IbLHMSM6064nbC1h3fpuq60uFnsV3lKAXoBYKfQ8d5qYTwlGk0i\neEDITlP1qWuiNga6Y0K7L+woBb5qgHJnY+B7PfhkGK5KhodlwuZIyAiarFjc\nUhr9TEonbAzJoYDE9+orHWmcmQB8PwyHJgMexGyhCYuYM9BWciVSFFrD76Tv\nOn4JRnA3C//QhEvcW1BgRpkpFa168A2utEU+PN3s2dUTz/6T5MwCGgPmGLL/\nI1ng8BSHBopqS/T7olokvpWyIXiKQwyjadrFfHfCky8ot5rSQekA+0ouLkus\nlJZwapoAVtKqTU0UokupXiA0IxyMkcSC4Zf606aV2cCc++tQmmRVHg7lugou\nGhrvITvim+fWPv6zYPiiJ68vYkZy9ua8xBL0i4isvdb0z5HvXeYHUgCmQquv\n4lDrXd7tQf4Jk10uq0QOmR0jgGBNXYlKS/9ASRusdyhA9JAtAwh1IB3xtxpo\nyCuHgRy+f1gj4dnOHspXoQQTyietjgr4FXGcNqiKiwgCpMwtNCA3VDtggmkX\n3dj5S2H0mc23Pjdhn4pFCgZoklnFyY1Ba1gI8OHWJ3jlOW/jY/hIUACD5HUg\nTEf8P8Z/Fz5009pZ613T2nzPZPP3jV98xY1w7koXbPAmubXy2wzKU4SSXhKI\niCwM\r\n=ILPy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHOaoM5KDokl3B9NsLk3T1sBJpc4RhGYsEbLou6oLlyBAiAwy7KwYQehgVtJgThVdpwsCW0RkwPXvwRbqMy/CmMj/g=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5-alpha-202103042220_1614896435820_0.3784812410036875"},"_hasShrinkwrap":false},"0.4.5-alpha-202103050905":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5-alpha-202103050905","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.5 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"0c60038a4bee7e0cd91b0fc4ec0e22f48da83e65","_id":"symbol-bootstrap@0.4.5-alpha-202103050905","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-chx7D4acdlcSntFyj0ayk8o7D/lqe0ErbHRjVb8/u/x2Hu+QLvOxnyWtinzYER6+azLr4Xpa6bYXvG0NTPQdvA==","shasum":"55468d35147df7a7b7861def445cd3ca46a8cf05","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5-alpha-202103050905.tgz","fileCount":157,"unpackedSize":484911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQh6jCRA9TVsSAnZWagAAExUP/RQCt3+olps8C2XFwZpG\nZfm+5ralFPQGpqan2B8HdHuQ5J3L4DluvYow9qjMipxqaALB45R/04PHEZW6\nqidP/II16t/ZSrlll5glZa0XBTfjeUhLywt7+HjcvorU4mGP/aOfs9RM8He4\nmGWS2mIqLhfvtuuiv0BxeUXPLF9hfKjtiWEjGx0P7u2HAIc8TmRR41Ja+DfF\nJkLCswE2kuAOG4Z0hpHiw5GstZrWSjzuIrtArz79GLdZ2uNqtPfPASfR8Lpg\ncOAS3ZxzCnCLTemt0bRQq7I3kFiK/vqBTpWXn0zPeWnMEF//f58aN3CcWrXB\nMyEdevdUJqoQBp9Ft10C5EzgGjGdVT4+cxWXXiMMPAtw79RRofg7K6VgeGGw\nSr9bwo552g5eQEehMzQSB3oughoMqfz1d8G+Lu8PpPZlIeJNlpT6/+Na1BP1\nNNnhI9fwCNZln270iHvEGd1jt2PU/88ZTiWFEJRQtxLHaR1cBJ+T1894APB+\nmDYQJjRUn37mAd8erNopAmZj/xdVOeq0Y6/YzF6P4qPXOYLssjN0mcTtqQCL\nRG6UC4Gk/oM0u/hBiTNgapAY+jQYmghULWz39klI0ysTXW9XuG2nuZfpA6EY\nEL45DDmnA82YmP/vigO41YfQfQAQeGnDegbFkD0yrb8+E8UraoRXFQbYcC/b\n2g0e\r\n=mvV/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXAQG1RI8buaHmnWVTEJQrfhyc/uv86LZAMeb2cZlo3AiA7Xwvvf5hdQj0GPM4OAShH5IraD+daU9U4TmA4XUVtPQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5-alpha-202103050905_1614945954406_0.4827944706682701"},"_hasShrinkwrap":false},"0.4.5-alpha-202103051910":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5-alpha-202103051910","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"eaca041c0dc2ae0afe180e5ac8fc198f3d0b8ce8","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.5 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.5-alpha-202103051910","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-fSTXY+UVa4kXMxCU0Z9uPN6h59py4zZIUImRogh7/h7HkExGgfxzQ1GY2VL8KyinsyF4ffPg2IiqcvaxJzOjaA==","shasum":"55df7491bdae8df27d944ac1c297245caad4b1d3","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5-alpha-202103051910.tgz","fileCount":150,"unpackedSize":456554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQoI0CRA9TVsSAnZWagAAzmIP/3IwdR3+J4syMpcaTfD9\nTLHnfP2CvDgCjkp3t5WqmMsnRvTRch9gUvRlCEwhZZNNdLj2cfjxdCG3ZFZl\nedJQe8gWv4C7JXRDC6fp/ZHxRGpeq47OHbe4I9SZFw+RKxGND3a7oMJoTeh1\nN0YQl4SSyFtinbSmHjjw7LHtw0VlaRiuERDBSYtWlAJGx7110PlZr5n71RjA\nEGCyIzR/2Lq4Y/+W2S5vZUR2ytXTStnzcHLNraxjaDyHn5yRbDGLWVUTJ+jO\nHbtNrNHnL1c91u7nWGgnqFNgnVV/LP69M6F1ENWcWL3sxOOeJsL5QYl1NseQ\nNj+Ks7Dl9VtAksavtDrY6jan68oBlxsbVKilD53pNb4UGNBLgZmKv12iwLXa\nvtGWTiap+0qTvp7Q/HlAq+qVDuC9lcg8d+giR/et5KyMZtA7oI3FoLU7RxsA\nhSb9C8d3vJt+eJND/5z6Ywv7pgaxVtaC+PrkPSr7YJrpuc2IewgouUvss8+v\n++YL3aWcLYGEzdYvN1l3wbFcstWW5dkpSdVzD0hSnBEfN5YxpHef+lCVJ1vo\nlk6zszpl0WFGYkl0V7q8P8BfKpJNm2U2EDwI73dskcsLygfMIOxgMmJC53Dj\nNvsNoFN6nuU2SLIIF/4FNQRLnAXfNYFnUtT8UzifZxZd9aIXJhOIhUzzzCzK\nDdwZ\r\n=TYJb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJefiKgUz/V2TcOhTRZfovZnzo7f7C3zQpUzGnuiYzQgIhAL2nrmAmQ9N0Pew3gVRGqhAwL7Ns6vyI9s5zk+gd+hUz"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5-alpha-202103051910_1614971443885_0.14818494834426765"},"_hasShrinkwrap":false},"0.4.5":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.5","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b1da0fd94a7f8e503ac97b20417f07245d8b38eb","_id":"symbol-bootstrap@0.4.5","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-VFkiKg4AbrELjfIB3MI97LtuYsC4ZuFcLEWfp8ur1EMznDKl2bK7y1i1kuZmTfvl05l7g4UYABCsKAIAmk17Tg==","shasum":"7ba696c8edd6a62d30efef23eda0ba2e1beeb6dd","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.5.tgz","fileCount":150,"unpackedSize":456497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQoXxCRA9TVsSAnZWagAALecP/ivUVuff3zHSJBbvdw29\nUO3fRpeZhMCBswdmZ2RGC63bsd/wVmSC+kHxK+PKKPySZekUC95ez3Kw6m8y\nI71hkRd2leqAMdZlDeOLcP6fkQkybqq9rPFgubo/5q8JdW1F3tXmYTTQOWAw\ndvq4rGE9UwVfKRfxbfKTr3jcsKqU8LiJ77HE+aBljoRYgkM7WIYDWLdgx0uh\ni36JHhtg0DPix/YUWzAz/vGXI/gNiQosOIZkTHjI/cxPmvyZm7Bjo4cQsqJG\ntd72CQvKd5Q0p909Ivsrw87YkHOfi6qkw7F8MGTM6QaUEQE4xcHAwtkbBPtM\nC6/0dBnqzj7wMYZAkBEcTsw5dsCQUCqugaHd/0aZe2OBYiedOTQYTEPBGd/o\nxedrjpX73ymbRKdWtJ3/bYKoCnMxZNFRZgMrt+eaadBqQ4nBUL1vyrcX5pX+\nnIhlSZ1JYCTH23Hk8BOlBgfDhybdSlu1xADSmxI5GEp/40zpHzCxUI0EXeRb\nB/naMb+h+QKJwB0l8d3FaiDmrhqxmc8Rcqo07qh1paOs6S07Z8SquMyPQDJx\n3CCLBd8xg0CUMsAzOvsVKAzYcXbQR7V9ydguDp1GZyZhochlNkKqLu6rZmJT\n4SosxisymK0kVvBLmNrRf7smMfc5+tXNmskf+m9Oc6r2asipmq/zu39JRICC\nS9MJ\r\n=RqwH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUMFKDeUgrgs+7IH+avHq61/ukM8mwCR+qUhK9bB3LugIgJt7VavQeIUW8vYGsfLY0F0YrBGwc+OZYKDwsz0yZPZw="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.5_1614972401001_0.2853083716236038"},"_hasShrinkwrap":false},"0.4.6-alpha-202103051946":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103051946","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"9ed044aff550534ae37cf090cad08864a75071c8","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.6-alpha-202103051946","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-YElTBO87tKRCBe7R15yoiK86wnodrfW/YyTqEPoE0Ya7egQEWgeei/gqRHz1r5XdTlHXZnNKRb4/U6Xqpoiuqw==","shasum":"d6b6fa3c810dd68f4bd951557bf3b06b293e273e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103051946.tgz","fileCount":150,"unpackedSize":456554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQoq4CRA9TVsSAnZWagAAoMIQAID6ZZYRrPbvdV+FSqcW\nPcvupvoTtKjIJpB9UEVaGbgzQlAOggDa6b33mVtoSHZcnhDHz1THFPbVQHAC\nlFnFyYHMvJljSZedSvM/2DGtQt8p6lVaJj1kMfQIg63gMy7PnxgOqmlNFH40\n/15uSOvpstQho6OUkSoYvdApTaZTfZzxsMJCWcoI9WNM71GuGebjtwJj8cpA\nosB/7SBI/r2qcYJonFusU5zTbKcV/JWsfbgeb1b2A6LE1465k0YOEcmSDp9b\nfpfdraXhScrzzgRyXPe0Vjm3ZWPcCiWRCHh6AQfkohl7aeJ64dc3eyWWY5yJ\n3sV/gwHjZ4zdPylLEhno2CqCSYYkPDOX2E78cSGpbi3Ey+Qe1nQJpdU4AoQY\nADTENXFbigPXSnlhVPaYL2dnMKikRlSi3Z/VE/scHPuvUFfJZC0a6MkBQmaZ\nMP3Pr+hZ6uBv8+GGqqo7wKHW9gnQ/8PZDAhNANQyC8tzCs8JJD2s0DYmhD20\nxSSb/AhR2frBkSJm440NXGKpnSUNJh3AS1jfTqCgXJyAVkL9AEbeqQc8I1WL\nJ0zewD2GkNuRihRvSFpdJAzQZdUT7o3M32+/D3Ahwsf/2HTeenItVcEx6JGx\nyPAyWFtUg+pvvHjWPvD03PVjTm5o40zVYADBXe6T2iJMj7NNiExelP0aLBr+\nwgPm\r\n=xdof\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0ye9VP4WkZf/bAnT5J8H2+r29MtVYeLM5Wtx98cS6iQIhALU6+3lnQy26K8XfbgEDeGhcXk+DsVTpe6nuwMG8d+II"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103051946_1614973623951_0.04847950590293415"},"_hasShrinkwrap":false},"0.4.6-alpha-202103071201":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103071201","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"946d4c210bb274310b5a6ab676db7acd221e79d8","_id":"symbol-bootstrap@0.4.6-alpha-202103071201","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-uErgJ8dbE8dCVIm0MwFwOFoPkK8cQbzH6aAyDhGMF10xdcJba1ZCxwIlk3UzBC/bowZgAb6VI2cP0rmEhCJfpA==","shasum":"5b06a644652e4644cb7fb4b6ca50ec6610d5076a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103071201.tgz","fileCount":157,"unpackedSize":485414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgROrBCRA9TVsSAnZWagAAkoIP/1xG/Ic6DmwmlQOduDi+\nKAWvKJNRUYGeFs1HdZWmbdyGBZZ0eP3wMMM56G6HUX5OALCqtr4lTJM8TLGK\nvcGfBkKkFZDK7KynvCrgTam6z7BASI9tsCEOecCSREOvSxeg8tzzKoVP0SkZ\nPsgzpoD/SkiCQ/VFWDL4fdO/IYu410BGDo4OnbD8hOhPWDmjSTkybssrK/SK\nF8iXw8470jvFTAwPPQVnG6/nRkppXHHNeVPMrgzxFLfpdB5V9vQrTLWVO9YY\nxvpQvnpm0c6+0o8ecbLDCP8h44vyWolDQYhza/kPyC7MNFzJz31/kOxa4QIV\nTE9hWtktYhv4xUD+fxQtICl8p4NR9B+Nh2qUnf9oHUFx1jf3NU14i0WAmuvx\nppWH+Tic43VUQzSlEoLozcfdgHnooTrfdbga3bZMAO9OqvM4qdA0ivTSohBt\nQ2Kxm2GPoeOdYySKbrAJCoLkmgOd0qpexiY5gn8Ciplse44Ul/JLSFqdhyUf\nGEsK3N8SoMX41P8Hraz4jD0C7viZxEFG2PcM9cd9MDCb4MgPvzLoOjavQoHB\nok5Y+yGz2eU+mU5d6obfogcgvMypr3XKjSQQKUSiqrgXQwg5hci3/4nC9WqP\nyYc5vMRP9dgAve8vIOrcTTrfvaTMBSfTSQoO/OU9SkZlhLic3McQEE4eTqx5\nyJAm\r\n=duTj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEe0Cwu2hxGSJ83alWDW+n/VMzzfSVPjzfkD3N6K5iYrAiEAsACPEXKqxA5gIuCJFLPl8MucmJREG1EZdrY7V7RfIGY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103071201_1615129281059_0.9976852214898964"},"_hasShrinkwrap":false},"0.4.6-alpha-202103100016":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103100016","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"1d5bd533a1ab08b1a979213f0cfbbb0cdf2a9aba","_id":"symbol-bootstrap@0.4.6-alpha-202103100016","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-pMOt16/zImXMRmvidnczG60UrXDS834EFvCiPmn+jDnN9COHxA2pXQWHNCgZSQm3QO9zGUjvMvZtzb5GUd2hjA==","shasum":"cdc8c54e6c9df7b3c008850f2cc70480f9aa490a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103100016.tgz","fileCount":157,"unpackedSize":485462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSDo2CRA9TVsSAnZWagAAoNEP/1OC5gPh7Entbsa2DP8d\nl962MXhIxRC4gabSM9g7dpXVgXWYusmSJjppgDOS8nZNLpevLLFmySzAoZ67\n2yNQosbHmkd/aTh3JX8qjQZw07yF9KeFYE8UWxwg63eNo0SUq26+bCPe4LZv\nt6RSTHCEU9NTHkN44b1HVojB9yfLFa+e+1BDVKFXj2+Lb510B61M+f04owWo\nMEDJXzlRT4Hx422BccakDrZnZGX9u5/KFnaX1C5bx0qHJHY+MXWT2OFpVGjc\n/LHaXxuDWBuCNaV6p3tnFqEYavH1LAV0epQk5lS4roiCs+ss5ZUDXTLspiK/\ndGhay3M5HyP+DXiJ0hlDZZT95RsvbLBvBTOusNbgj3bx0hLjkaPK0f/11jQa\nBSMRD95LNFZ/vuvKlkc/7cX76LD/bNDaDT4T7VWQCeiB+H+ldWYjckTqE0Uv\ntdwv63sbVIJBgxLpAzKobtiYdVjYkGyAShjLNFR/BNcc6/7cyVUfZS7M5P1v\nm2wq+IAHKkbWSsw/jFZmWJMMXgc2V4COYuPeOn5LDo3IQUKdMfUtz1auBTV4\nPQ45Rwvd/GE+l/1ATZnW+ly7VqpBREyLGyuRyd4rSg1FABxJl5jyqzvBHGce\nwweZ3HM2o86SZK/qliBCqISvBZuqh7KkVLV70FPchzXa1mkE4FKNuKJxCId0\n5WFq\r\n=Qqs4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqbVm0mIblq2wJLRkvy7MNkf5mZNrxxOaHsRnmLzc42QIgCUg7n1UmoLsIHAar+DE1px6f/te7GS+nkR16C6nMeCk="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103100016_1615346229448_0.04540494131792894"},"_hasShrinkwrap":false},"0.4.6-alpha-202103121159":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103121159","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/bip32":"^1.0.2","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"5ca00d3d6feb4c9cabbb8e3a5371a90d043efa98","_id":"symbol-bootstrap@0.4.6-alpha-202103121159","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-SCtfZwg185ElZ2W6I5KbZqx9sBmEc/7L8TDmsybcb3SruMJQ8ScQ0aCaiGfA7a07v2eXbBsK2So/zfgSv6m0kQ==","shasum":"b5daaa9288cdf6737a4df869c3ea873ca38b6623","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103121159.tgz","fileCount":168,"unpackedSize":635049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS4HlCRA9TVsSAnZWagAAMkQP/ilPIdBnQdeyKZcku3Ri\n00I+mgncZLITbNcabJFzvNZXs5dBlJ1yt1G7s8b08HWQrQcGvGZ0pbn4Ngr+\nK37csC+qC+d1IWN9zn0Zkn4yWgCjeP1rIbroKcopzogRYAWOvLvW+zNIH0VU\nFFQGHQQRVgxZJ3Rdpd+yrpuF/qRBDRrL7ecbBLBfB675f/R2krcLC7GBPhSV\n7TZnb30mezAwR0mYQQrg+eBe5sZB1jYxRWY5m78fzfe42lCVhwfDJbceac8R\n0xmQ17a/dWPq7vF/426H8WQGLpfuKCRF0tyV2+On+XIyLpGQv8j2qx2PcvIF\nJC3sYOt4k5HA67NjF30UWcZi5iwF8NUQqQNKwrF5xjSP+BlIcpOcHF4Gjf0r\ndqDE1DdzSbHUXbaC07JJvYdU7bQ0yCvfHlFPNhjqURZgctg2AVrNyXr3L0Kl\nKFq8cH/gg2zDK8f/KA8KsFX5mFIeC3ckf0F8yQPu4oiFpEuucVu8j79DxCva\nH42BRyR9I+em4tycG7AWE7c7dCm1gp7DrUyAErpjhJeOHyDtbXJLsFo6+elb\n9y7wNMXumSEfKDNb3fNdgreMssnivhej9EyDdxzMgX/23Dk7x/JIQ1fX3VTY\nfdMSU/zXRvTSCqKBEL+LI11pej47KjI91Zp4JgQV8zUcH76HWWGuYAc5ooCk\neSi3\r\n=2nlx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJW/UWitxeBqK5dH+6DjB8PM5sMwc7JPOthxbOrSHl0QIgAJQu5m8fXmMb1jitOtz5wh8vXburOBbO9MypCOm69LU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103121159_1615561188933_0.7489055538559519"},"_hasShrinkwrap":false},"0.4.6-alpha-202103130943":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103130943","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"640f595e81e750f1af647103cfc21e200e738093","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.6-alpha-202103130943","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-R6FBZIqXbIwbAbPzyd/eek5EAo9JEqWQEkoCjoGEFhmmyGFRcmIjA2ZGiLs2DaSB+z8BtGDGnvWSkoeMsPz48Q==","shasum":"3c9c0bb3c454fe77389c85997808e1ed2ba2a15c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103130943.tgz","fileCount":150,"unpackedSize":456549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTIk+CRA9TVsSAnZWagAA4+8QAIc5+L6V0MpiWyDaGxLA\nwT9uH2ZrRTfjt0LoZarO/izSXk8q2Soj5hOG3/T05Lu8vUSasA/6i81bZln8\nSc4ZyJUmHlcXiHoBbXI39dfPXJCOvg9gcHq0ByfmFqbps4zHxC9t7VQ8Pazv\nKD0NAz/jRreQDsSCPu0sAcQu8V/pfdBhDVBWPk9WaqkqhkIc+IlKo8PILnOd\nSvJ6vu8nAANtsrQd9ar/5VBDUQinW7V4mf760YBwheYwZ9S0AW2n7E5LQ7sC\n5tQ9FI9zC2ti9Ts+wgmGe4/p9uHw55cWRkvvanHiN6pLXR508RgOHDnk6ME9\nxBXnNS8ryUgM4Ek9Xx+nkvv0j6I4JpD/0Nq0/d+kNLkW6GgcOh1IOvrd6Hvi\nDoG6zoWIfoEntnHENwyYI0lTREl21DMaKkaZgkLB/VyKhr7rrvqJsMvOJwXj\nucuLAOjuIqv4lC7DbQu1VL5l4MGRUG0sz3I1PahwD62UVeq/00M0exKMaMc/\nE3ZJee7IkDsV6zmaaJCgf48RD4js+zBif+CQZnv0GoLA3gcL6GfZW5zoAWdN\n/WmF1PZLkJD3FUDEEG5gviYtxV2rnMuAunaztSlrLEtP2l5pksiKk5tyvgHE\nc6yqJuLkIhBvO2s4tUGA+GOdZNAkzXlssDMB1JPbEcgM0mZxjp0T0KDJndFW\ncgzI\r\n=aln1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEgIIxEB5DUo6gNnPopCSGg9ikPZ//7Pb3lEkm3/CzXLAiA7rNOfAN2gloz8bXn2sQ//mE4AaSD+jXEkKmOmdpUuYg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103130943_1615628605595_0.6162321786106657"},"_hasShrinkwrap":false},"0.4.6-alpha-202103131047":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103131047","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"84cbb4a452efe2bebdc1e1e8e1b5f215d981d32d","_id":"symbol-bootstrap@0.4.6-alpha-202103131047","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-vg+7CE+DMHPzC4w+EAu035qenyFq431Fly+U1Pc9/kWEt12EDK7KoMvdwxM8scCTJBa9cNrArcWnU6lbjOnfyw==","shasum":"00ea682ce94da8584e5ae43b07dab9a54476e809","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103131047.tgz","fileCount":166,"unpackedSize":728195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTMKFCRA9TVsSAnZWagAAZWkQAIG3Q61FwCh2PfCI3rCC\nCQ8TPH3g7c7B1lziiUYQ/bWW24OrZmdlT6YOX9SiZ02NkuLE7cD95Ic795hq\ntBxCCzTTZ/QsJx4QS9m3WMGcXnT6H5KKT9Td+ASCOc+8lk3UBXung2h8yStJ\nlqGyhXJ/ejDOeD6ggf2N33Q6BVyqj/ZnmM+uLs8o4+nxqODJls5XRkd3JIGp\n40fD8LfF5Hm66qQrYjdUjuyJRyAR5hjGTgMV+aZeeKoG8P0HlN64wDhfl9e1\nC80ryVyEetKP9SnfTd5P4qfB9x3S0ukOZklZo+Gg5gH+m1We2lJiZ8aypZDF\nusQ+HgLeDgQkfrReOCO39aZ3w0ZPZ3apEpCNqVueqSR7ScM9hbHPQ5VCShF3\n41DjksvXqqExtAantEAA09ptqssRJGxT2yeK31xcEs4+GLylFkp0k5QQ9oOH\nTQn7s1TlmcVIX7wj66JzjYojbdkMapNrwF0W7MebU/0g5oAc/QWCKaUj5BjD\nEZKaJSP05Dt4ruyAWu5Wdl1WGPLC68jRCTCwZ4b2jTO3Hg4it6DE1tlgWhBB\nS6k5WiYkPzAQw20fqzbJaH519ewt7XV6CikQkiSlMSu3uYVzT7T5nF39dfIP\nID49yVVCwbF0xhhAC1Rutx3crp4F4uAPAwvUZC4pOeJnrVJXvwfsNakr1dKM\n20la\r\n=17Q/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcxxdP6tb2W/kCQ8zc1MgbBGyfKxTOtZX1obBky4VgpgIhAOImL+hbGbj6frTiamLubfP4wrrl73E8qFdbD3fhPE+V"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103131047_1615643268522_0.7403468329451957"},"_hasShrinkwrap":false},"0.4.6-alpha-202103132103":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103132103","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0ac0379a0bf455b1469f2b9b13ebf50a7ad6a803","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.6-alpha-202103132103","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-nluDPS9A0gDOCczMSEcqb5t7CE+leqdeGTW3E7F5rwTAV16D0AfBZy8NUXU0zL44HSenO7Gftoy8xZv6sAxNlw==","shasum":"c140bec32a126508904d41478ca0839c0a1dcfc0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103132103.tgz","fileCount":150,"unpackedSize":456549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTSjNCRA9TVsSAnZWagAAFRsP/355Nk+cvM9YmR7LmyUd\nTFCIgN2KkAYaohxAlFHVyT87drjlwlGAkzvmt5uOUHd4SXYSOQZbKDuc59yJ\n4mDyUQa7jb7ykSdW0nqfar8JdgDdboVGDWgMDUuIXHtfTJ5jfD0bUYP9Vx3X\nW7ykhumFJ2F4BOl9CE/3jzSwq1ejSHe8rG0zwaRMl4iCAODR5ftVBhlH144f\nCWnZnChqsrmookxpz7xuECFY71ZhDqCaGWQYHOPKc81qiO7XAX7cl1Qe402j\nvBsnwz9nWWMMpEsXuzZKUN/7IfQF/0Hy4/80v1jKpbKrP1z7Xjx06j2mSmEW\naCxcRV30w0FT2Td9aADCQ0ra344EKuJ4BfBW05W7+Y4k0j3DHdFQdM6lqfM9\nCOSg+8dziVzXSmPbCkeUWAyxJuMNhiCCBdvTbQzALkoEFD69NbFLTcxEqZsk\nZ+oZKAJv+Jq1X4csuqNl24rDHbcRSJ1LU+bqSshD2pp9REBju63qJgOvRiVI\nhmVXrcO4YE4Kp2XddFeCjlfu4LepXwl0LMmVoyUxGwux6AB0ZU2W3gqFo6XX\nkM1F4AakhRyYfJVa1orZMmoKT/Y3bk/muTuKEaUTE68r/noxYZyBkB63W5l6\na9ACURniRGEJCJvoYpA6792Y2sxqC9zbtgrFUq4XenueP8oBJfNVlDIpF6Vf\noZ0O\r\n=fdAC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICii39l4dQa12WJ4feHGwbasMnj9YqK3p6QXUV1XWzYaAiADJLJFekqMqt35eFU+ATXpQKoS9nUs4uIIMiZLugkH1w=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103132103_1615669452640_0.022113335911222443"},"_hasShrinkwrap":false},"0.4.6-alpha-202103131900":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103131900","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/bip32":"^1.0.2","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"b0b67b2527caa05204b2a7b70983fc249afba838","_id":"symbol-bootstrap@0.4.6-alpha-202103131900","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-75fyJLOBVdzS8xBt/mqfCQyiDAxCLofE3YTGwpwTsbFieQVbuSUJGNB9ovsQ2tg8zJhmnM2l841rXELxB8L/zQ==","shasum":"e74882a0666107b5cf502567cb19d062b40407a9","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103131900.tgz","fileCount":166,"unpackedSize":525395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTTX9CRA9TVsSAnZWagAAHeMP/ipgtMGoCduyT/S9ozeb\n1NVPPtglan5jpQncKHCQPtgIpap5q9wzg7Nflan3pp+GnLzljcL6xkHExzil\nr6uOVHNBMmtqcpHTLPuYElg0OwFn8TXy/MdnzjN8gCSqVBcWR5tr4cZf52iG\nR9FUYaBh/EHxIFMrO2w16Ga9IXaeRSr5h2fgO4Gb6tvSf2Zj44fkfUEsKdrB\n68U7ccnJ7WamIAgeRQrh1TVd9Qaili6y+P11NEMbL2nutYPJ5OnLt7xVB1HQ\nh75PYpt7yHDLrWYtdAhtPjBmZ5OKbRtDsz/nbi1h9rlrFmgX//GCtBA74nhp\ndHadrA3p/3MqBzBZMAPncUBrqWsSDH8TWYHhoBZsOk2V2Iwtt+I0lncMGqUy\nTDaV36knm6Yxd1hvvt3eQacN7NCWnbOi+SMVE8eu08r/akT2mnbrdzzlkxa6\niSGa5Xe1VJ+B93GENOIZ0fhBf6/iyKJv7pXBwMhoAX27De7J17/qL9TpNjAE\n7DNSDwMKVVUjxW2QFxZTjcu5QITU53iXx4Ojn0Pq6VkHk3m4fRF40a/8Arfy\n/Xeubboxtnu7sFpqHv4hNUF1OU82+qPlRQcZcatnME6rddDtL/DiarAZyDM/\nkj09M9zwPExdXyAVSUP1C+bn+/f/qhE7XOvyimMuSXFZkp+7kG6ws7sBhtFY\ng6HI\r\n=cOaG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/X3G9j3i5lovLfeBYCJuRpfisnUOf9CIQk1DU024cBQIgUHR4SSIWLosftJWm2y4YSq2PbcOGukhY6uedotjJ4eQ="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103131900_1615672828578_0.7147088094859981"},"_hasShrinkwrap":false},"0.4.6-alpha-202103131907":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103131907","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/bip32":"^1.0.2","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"2f1bb6460c4bd5e19764fb043ad2f3bc5f939b25","_id":"symbol-bootstrap@0.4.6-alpha-202103131907","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-xUFqnNJiQPW2OXTuMkZiw13fmKCWp3PIvoqhQ2zFkesLD6LbVUUYQBRM5olClRrKEBueqXPRs7tqdufQVO9qQw==","shasum":"965eeb0c1879aafbc1d28a75123242fb9e0c3e51","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103131907.tgz","fileCount":166,"unpackedSize":526485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTTe5CRA9TVsSAnZWagAA4bMP/2dyJgXSc3a1qlZv0VwR\nQTR9DVW9ilsed3Ra61sTbqzh/sE/zX/IS5TUPiVz25QWvFeY2W73T+ibQMVL\n4FRdU9u0j10/8sOW/uSxUO+rZpa6foTbT1Ca5JKaStytLQwJ0j6g24nZ0Bto\nBPpoSISqOYkVLp3uX9fmIvlJ2vzTUqpuEdqjfuWelizh5sHMsr0DQVuMIXnu\n7Aw5kCPSrxOeS7BSKrB5eYuVmjFcLYc9u1efa3CJleE0m7R2GEsZBSqH0CD7\nk5O40dnUj6WhCG8AStDd0t4cEHKg+TlpfusEEcYpwRUO1vyZqFSm5WW4kLBt\nasnuMM4Rem6qc7eo1KCjh20eXVTLlCVg4PXhuoa63xueVogV4BGNhpWAlkfb\nkcZT6/PfY0YqcQIyclhCLNHGPFLW3TrX70opQAjncPlIRFFQ+a78U6L3FBdt\nNAa3UvpZMhtOtRTId5Ck8E8RtdJjg3QE4VaJXyEnPOvyb/6373O3t1cJxtUI\n7beORH1Xc0hidPw8U2LTMz7HW+ZOefZmAkrfUNVmMUcHjJeQkL8myeC8GwTf\nvY3SXhAKba0L9yflhO3/lUJSoNCf2zzbVnfTw0ybCKZ+oA7WEIt9c9m7Q4bW\ndEm/YsVrYAWD6kIZFceynGub53nb2MgD2F2EDqf6cDZbIstxzjzdlWurLfcP\nG95E\r\n=kylq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3aWP7fOtZZTaLUvei85hSGl0PnA5Jy5JHHU+sKceGBAIgYr4AN2suKiwHm2Y9vggqShK00Za4DEEA1d5+UzyrX4Y="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103131907_1615673272785_0.6166262376294351"},"_hasShrinkwrap":false},"0.4.6-alpha-202103140740":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103140740","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/bip32":"^1.0.2","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"1a4a1327975bb526a5e3f59077635e1c6a3f29bf","_id":"symbol-bootstrap@0.4.6-alpha-202103140740","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-oSe9eRYJYAnMdleQWdtqfxM9EDoEBx4/freFUcrmAcuErc0S33SY7qM7r7soI03VwF/DalPT2Cc2qjwRuSs0Tg==","shasum":"d4cb5400a16cc7cc55405d5b1bea5acc76dd9a60","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103140740.tgz","fileCount":157,"unpackedSize":490463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTegQCRA9TVsSAnZWagAA8acQAIpXKFarCXqJzFAdrkLx\nAvamWip16hGHzidRVZ4kd8yLlWx4OMP6eRo1SglY1it9Y5X9cTVsC4w9SqeB\nSB1gmyOmJNj6ksaJ0hCDbwB9eo+w5yNyJAfd/lB6WJYcjh58+JcU3U7NrwqZ\nNP15CxH0rZGueMGrVE61CLD9WKezpRfOhN4Pv4PM1PZIaNIJwn+xUMnDfIkl\nMqS9ygf/616HD3SnxihywPQkfY36RBbEIbd2Xm1vKtP0gNpFQeoXLi1ehllm\nDktqzR/y9Z+jSIbkUY6v8UDmd2jRv211p4KIYJRamGbZt8oRNGLHESXASJEv\nzIGzi4sNmUq+aOpnbj1rEnfVpllWLdDJkYV5N795jcbHNKiJV+ijamZ+XxFv\nUDn+/4UhMbqsBlJKm+G4UKszVw24VYflDNKbukxOvZpR/r0ej7CUO+E1KrJ5\nccp0qEtV1088j5U/1QJBadQDDKCs/updfrtwWkAWf41DYYAhtR07/MkTVYeX\nG8rbUMOiAZqFZTK7ta657LQlAAvcGD3flsxNgorftVZFbdO4iVXuyoiAzFcz\nZX2MlNT10tw9Aavd+YFcigm/BHygXy1naqOHcf9zyeGCQQdEaJuGVmjvoIXz\n9RRLBsFf19DWoKj8XLX/yNigHkRDPyEy2ReAwqRwK9DZLq3qrnf5xmuK+R5o\nthQB\r\n=4E4X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbVRb8Y6b6gX4fooc2sQmNYSD99PhbFH/RNlMmI/1eqQIhANK2vp2TYIhQk4pnqrcbL+rDdYJxxcVBnSaHLGTnF5qD"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103140740_1615718415539_0.1010151204028511"},"_hasShrinkwrap":false},"0.4.6-alpha-202103140853":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103140853","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"1a4a1327975bb526a5e3f59077635e1c6a3f29bf","_id":"symbol-bootstrap@0.4.6-alpha-202103140853","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-tdjXjW/UpsW+7BlGsZGu9JZDPcGLHhYJ7ujxzUuZIU8o0irqPFZq7+5Esl68xNp3fhzxEBVSVwpf6tlxqOQErw==","shasum":"ed9b1d4d7f8858b605f3e602645c516caba350cd","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103140853.tgz","fileCount":157,"unpackedSize":490817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTflFCRA9TVsSAnZWagAAZ6wP/0Ww4RR/mLLmdrTpWfi2\n+OMaKeNF5Vlf+MLiH5uskjhRkU+qu/b+j21IdadVfUvcL6f9v+7x3mvCDEVv\nCaLGnClsK/d93IKf/+MkrlKLPl5lQpHdQSijbiKFXLaRIGy9b+AuTCBf2A8T\n+fKMyXriJk159GQQIwbRrBNTY9bT4m0h3bCauN7u8yihd2/VfCmYADo1Mxbg\n6Cn0z6gEQh7KYG03g4bqos/WYgmDERw+0kXKTPU60uROw4g9VgOa9dJ0kbiW\nNCbVqlrSwJmtXBmR0wYxaYAcQLUvAdIy1BTDI8qcq5EcxY2IskqgPNtfEvqO\n0HOhmfWWUuaqPzcbeKMgOAFRtZsrKlnzOAFOP9PHDWrutCuqhNWa93Dxn9GQ\nrZ2evNbWWLxjn3dvBTK6OL1l5Wdd3g79mcblDZZRBzxARq5BqXRxgM+XEEkR\n+6iNTGNFmWe/VBDc1qzLS8JuCr4xkRvBEutdxZt9kQNuWbF+30EEfkNhYkfx\nYJfwFhyLQ02ULfI6gzjB9OnjAZbaVP6xRBeAnxrXaijLhvpty5Cm1BAxno2i\nmlkIXFnHteMY8KvizrtE1nzXYWCAXTSh4VcFBYWoIEQPrEBYHGs1YbRJEkzv\npBYGXRZFpSOvTS0ohu1nqHSKhb0Bkrc32F4EqibHYYJVJBbyA9wFIQU3uHXk\n8sFZ\r\n=jsbc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZhI0wv7rrfExcdur8RcT4lB+Bf01f7q7uIgEba7zmXAiBHQkxFds9XY6bgQiLsIb/9oAkV7B6Hvw8tJkHmLeQMGQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103140853_1615722820384_0.27159246116787594"},"_hasShrinkwrap":false},"0.4.6-alpha-202103141843":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103141843","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"9053070e7f4250b3809ebc1a6e5cfd4b705e8534","_id":"symbol-bootstrap@0.4.6-alpha-202103141843","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-UPdIszaXp7+dPkwsrjO9TmZFgjfmvZKtxkV92GktSK4cs3NzJ5XGdpkTevrW6RuVhlbOCPl0qVM/XWpydCQ1Jw==","shasum":"7a875fc355d1de826905d594cedfa8b14346270a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103141843.tgz","fileCount":157,"unpackedSize":490834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgToOACRA9TVsSAnZWagAAe18P/3uAWRVmEBKe9fn1j4Vx\nLYT7kLi6sW0nhYTjKyBsM9blf00tHrYFOGiWHzI3zXZYdWdYsyaZz8u95uKG\n/QzVp+4KQPXZACMyfGnJYhKmo32gNjo5FKQUg8WB4vgJr4KTEwp6ppGFuzDy\nZ6t8HANCQNMw/AGo6TrRzfgWshbmZhKjpyPRyWxbqrWRyYv7kJbg4odgDe4A\nRBEYubbgUHJHv0EOswRiwo8Ig9Q+wuaib8odOX6vPxaA5wpqlPrqfcvx0bHK\ntYXFdtIRduaPdyn08bb+Ky4X91E9Vyz57c8QDjTfM0TqQWq5Ic08JbDQsPtJ\nmifhDaJh+mi6asxJzUWSMpz8yuIPozwQMkJnKSto/CCCFtf1/kIDe44Qk422\nRCHufgumhoJjrSXJpfcEX7FDrrFJgu9QHGt/71IDAmhJ0WzSOl0uUfFgNpV4\nNK1LrsWaYPbM6a2h7/qNN0cPtPUi8dDmRL9fS0HP/hmKpKNDm0WxSW4w1Yh7\ngujUCAis8A2IBEp3mMZIrqX+XM1pOiBxNnUqOR2UO8Nl9C+lVgiXyENKJqvN\nQorZCYRcZClA3odBsFknBtFTkUEQtKINWUW67p9AMHBgCMiX/NZLu4BNUtr8\n4RSTavp+uL1f66zjW/aBvL/X3iIQAQ5o1BI/t5U6cPdODGI2g3cUKgxNPseA\n6hLW\r\n=lFPn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGtgEkVSkoonZcsqR5R8Nef25epz0fwto3LQn23wRMOAiEAqX1Pq7e7yWCV3iqr9BTSUh1SViR8tJywABd8cAvErzg="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103141843_1615758207382_0.634407336551374"},"_hasShrinkwrap":false},"0.4.6-alpha-202103141942":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103141942","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"5f464e8ad5e112f1c39063fc1b8ef70cf81df9bd","_id":"symbol-bootstrap@0.4.6-alpha-202103141942","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-nPJhEPFLZWnXnKJWX+dDfZ0/P5xgUMbq/9bsGNEHT+jCCbmx+F5sLmiBoMI+KVL5F1/4A/5RcZhbwkJG+lGmjg==","shasum":"56e70512ddeb8cd99080b6668e36b2c1325d2c6a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103141942.tgz","fileCount":157,"unpackedSize":491025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTpF3CRA9TVsSAnZWagAAd3wP/RSrzodTOYumtdOJTuy4\nLyEXK+5WoFbmahIB/GedPGTfeEDwAzxqNkFjN9UX+rYIqdRTuNSIjhrG7/yE\n70dj1jQdZPcFhZ8WKk3imsfv/To35HWXbfhNZYn24pWGQGWwAeL32j1HbGGT\n8hHyFsSMEdBf88Yy1fLaEG5HJfLN6tkWSkAk4NTmPVjTj2FZfKbERWHIc73O\nCT1bfzFJUAZOrtnLkDeeWp1ibPdBEqfXLER9KarSVmP9RhqqCLKkwbOEk0No\nWA86udUcWb5xwlXiSlIcXB0ahCI2p9L0M87Obl1ri78kmeIAy3Ex/fpK+XzQ\nF+jRYAyOqEbGVmcTrnpV1EbUXwTEotbJ5DBx3KXXEkGp/4+DCby9Qyya0/xo\nC8lmlTLsrxvxuqnBgk2xGjT+5M7X24FG1Qgu/EqU0GNWEYdfSomn4VcwvEp9\noso/3TEOg18JuD6VAe2IFshXaDxNL+3bq9kzpfgK1M2HzaW03IAlYfwGKk5u\n71W5hI6UjDGV2lJXZBCkmS4LfBbAsu2cgPC1+S2DaAqpc09jbcUmmZITVlRU\nMeITB6ljVqq5Kkjf9njBGeKIZuYUcvo7lKkHvz2wMwmdmpjTQx7jVmGqvA7+\n0JxK6y+oxIRNHAfBbqN9XBKo1VPAhXjr5qzAW8eWbkyDm6TH9BbqAmRR0/pb\nprOt\r\n=sGAh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDEuP3wGujq/FkLXYu/uBoLQGRINLhzOnoDtqm+8WhcAiBQU5ENupjZRdMMLfZghqpKeZCjIUr71oX9q3enQALnYA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103141942_1615761782817_0.9696551217741036"},"_hasShrinkwrap":false},"0.4.6-alpha-202103151535":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103151535","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"84c58ec4afa06d87de8bae7a38db3baaaea7c2d6","_id":"symbol-bootstrap@0.4.6-alpha-202103151535","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-S65DMIVH5WV3aN1ChR+Y7TDKI1cPm5euBBfjEdH8ElEY/idbPbkL4yv3odj9giI4Ac8F4lKkRPpRO7PEu51LkQ==","shasum":"32a126c83ec47368597bf1aad5e8a44b74e4ad17","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103151535.tgz","fileCount":157,"unpackedSize":490112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT6jkCRA9TVsSAnZWagAArawP/3aDqYgNxcoQPG6QLjxd\npIsGHWeXgZUDm6F2hYyrjEo+pMBDYTsFECajvL4obBX0xOBCkQKIyAbcM9Jm\n8tPK6BbkoO73uTjTd+Jv7pXtzwiRXtQhJjGZJU2S2doUGdNFv3XDP4E/uwkn\nz8aqZNQWwAJSB/noRmjnQMQBjgHhoknvteoITFYXinb67VW+1+Y6s+IiNsfF\nelgXntLkWoJr3o+CoGK3LqFvN/BY1VqKVTZAqzdV4RimXnUqxXLRt5CNjjOx\nOTKm8M+gb3Owku420oUxrn0dFiF/NpGfYx3s1KVXVq2taJwiyXXLaSgGRTJM\njo79FoT8l0gZrA+s43fivZCV3lo/rN7Fg5c2dAZ1hcYpwQw3p+n2VSdjBfMx\nSfBF8ynIsGMR2LURIb/jPU9SQwfFdWHkpKy5fXW/iDwc/Aslg7M3C1mJZowt\nksku0yDXIrcGx3Haf+rDdhd91EWZewMVfzm2O1z6LMvl3gqM/biDC2Uvh2gS\nW/rbIY3AWcK1Rofrj1aItqimzH50qrok5ZpA0gx4Bngwd0MhKxdybwsTWont\naVUeUCWc0JQ/fHKdMfW/JC/nPAnPjiNq0+iG0Zmn4vLrnYaF95VQEPF+OG+1\nA7gUtg183SStEfNKXUFjozLn0dkMm3pkxY6TKYe3fkRVzlOjdv5SSCiVKVwF\nHvUw\r\n=uTpy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJ/RJh6Pn16P+OiadBvdGX/QTbUx0Oj792FWku3GtThgIhAKEwLalO4mhZgKzvZC742fk5GO2dYYw8JWi4rgOHe/4f"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103151535_1615833315607_0.8281400222674478"},"_hasShrinkwrap":false},"0.4.6-alpha-202103152154":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103152154","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"92ee1945f9f41d94ce4105f35eabc924b175658a","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.6-alpha-202103152154","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Tzttr/R0olbojPYZWHHDBc6Qk9an198wR7ObJZuJqzVVsfpAfyGIr2RkoekP/bFfsHntL4KFL22BacxlUXchjg==","shasum":"6794bec129bfb5db99bf3c0ca160558fb8b3ba54","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103152154.tgz","fileCount":150,"unpackedSize":458362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT9e/CRA9TVsSAnZWagAA0g8QAIIbMgCpVhxdT8ckDR1L\nm5xVFnmpFN2dtb3PNqRIa2MVY62CK00TTZ7m6jypHpazVqCInidKVliK0jjC\nZ6jqmk+uGobzfZJo6qWei2DG+ybibIFmwufFT2Uagvs2/4WbkCcPjEB7qU36\n5YhVvF/AsJiKZX7XdH2jS921fP9pNlbYbvxl9wGn0GYtJwf0zYvyoojk/6QH\nhpca6xuKdzhEarAFu82HbFpwh3SDTVw+9qkKsv2SdSeIvlPSs8g2/1CG9CkZ\nMnoRRKzyzevZfn6UGR+pLgpfJ5xTSAQVbk0MMRaqNgEtaUQP1uSNdy0R3YyH\nwKz+KIkLHyvsraVsPeXtJv6MVd2mzIhPNAFMBDCfeVWUyo0RbTNQ16Dg1eSx\n3D/sDyVG3/UzETwikj9oBZQrmUTTQ0fpd1vJUfd4ApCuWPNJJT7UYw2g/vR7\nPxuYorKjqoTab2XZSzlHeyG1rK3nBNxrkrbcUNKfMjx+UfcvflOfdBPoFRjw\nXQ5p/s0rOOiWPk/T/UVeP8qIxmc6/ea+713m3TBVkm3Wom0MVo3w3CpJ1pe6\n7ifnyyRlRW/LlThLZ0fS1BjQF/yWaYXx4IWHyuvTXROywwAreBr6cOxxecDi\n0enYwcGXRWJcnsa7hlk4r0tX8BFeMaSztoFPsIvg4XiYiBxlfcgYH0WpRTVu\nV4UO\r\n=fTzG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHiIGSdstfjKh1JTUoPVb8ZImCabKKJiKC9soj0jSPyyAiBFk+dffuKeWNwWFAQWFKgFQefplQv3/T23WnLpctaWrQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103152154_1615845310862_0.840045910335468"},"_hasShrinkwrap":false},"0.4.6-alpha-202103151907":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103151907","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"a1f7b2fbf77f8c1078b556db48180f232a565dcf","_id":"symbol-bootstrap@0.4.6-alpha-202103151907","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Rno0MOJiHBVGepTGlMdKGAk6CAkDnk4o88maACtvP2pEgAMwXtJ0yyjTwN6YQ9BhsrvGLROx3RXp81cQwWwO6Q==","shasum":"e2ea00697419a46c1263b541a589a34b42cae67d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103151907.tgz","fileCount":157,"unpackedSize":491567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT9q+CRA9TVsSAnZWagAAut8QAIHBrtVTJTl4Z+G8Jwl6\nvLkBjQ/Aqg4rzXGwQTWtYgupoC/oPWirr8B6mSAY2oiQbxOKKcjRO+J67y42\n10IlvNtSz2t7MBbammcUrvBJoDHZISwmYPCsj1+GX2zJln3NBCM19ShNAFEU\n9s6Vg1sc4/uj6KapdeNSD8RXd08qwevfoi2qSiJ4BpMPlJF1IkRG//lKnrRQ\nm2FhIO6sxZf9orHzBFt0rcBHNm1es4AY1wfgjEsjTNAWv57lN3YfTjhnQVfh\nmF7u534vg6ArgCxAuTWEZjc0RqM1CNfLZ/8R9qxjpprHI3W/5XENPaRckbgA\n7Us0rq/orKpMAEOIpWpAkm35WzjJhWVQHQuOvtaO3OSdVhTtt+geSXJ/W3fv\nt9tMAEZl+FklEgR2xcH+2KYMqc2xmB7GGKZXYJAEt7c+aRGQNv4vGMosfcjM\n7U/zkzdfD50YxMVy76yMOx2ToeLkS+Oy1S+nQYMaUAxEd8QkcsO7B4F+vrX9\n8afJGCQH8tF4T23cPv7UwbEwzSg+cDZLEGYqjmccrI1FQ+8TeLDaEMB5DFD/\nDnIPICuRwk6/YMdxCVIb0fBPC+/UfEcXIHgMfohoftFef3w5lSiV99EP0NrY\nt2AVNbmkfDz9x4mMaV0vf/rQJo4N3+kD/fSysZtvReY3GmziXCP7DOdC2iaM\n5LZH\r\n=2TcB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBGTPvwq4oWu9uNb455C9TjgDWXwUxB+Lp+O9xWYkIyoAiEA+jO+oF0F+WeSN3zS/UFmOxaoUGgXu7/dZVrFrjxr5nE="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103151907_1615846077562_0.1272419102375819"},"_hasShrinkwrap":false},"0.4.6-alpha-202103152307":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103152307","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"00eb23b0b45c77bbb8835a22b2a841db5bef9ca3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.6-alpha-202103152307","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-M07S8eesOKuseLmp9MUQSttBbho/CfIxw+NOyN5bY67z3P4djZauuNkPg2ohvQ6cmO6tj3I2z04L9cU9zDrUww==","shasum":"e072a070f3c601ac26048b8b7b37281ab5c2f28e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103152307.tgz","fileCount":150,"unpackedSize":458568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT+i2CRA9TVsSAnZWagAA3wMP/AklMtFVFE399pwZdIUg\n7zfmPki9DM7oZbnIg36QTkE+VxR+nRESutvg5/1zhvZ81m3SQVoThzdR2Jtj\n0xrFNnbD2T3jlLTXMlwOMbBw9DlrQZF6TnHgSMsWmkyZQxfY0RukwJiSxyee\n2wBurWU4qhKi5ccoJpNpbbqfeDPYWauurUG2gOJdc+ORep0svX3rX5QxHH9r\nWbB4bviDZ58RuBOFFmSm2nGwU92oZxnBwWkCcwap94uK4fItz2SLnk46ENLI\nUGJRKWIYc4Csq1AV2TmfRIbCHw0GZCPaHxnybu96F6vcX5PcqAbWP58pMrgS\nzubmJkf3bl+7FbK1LXVgyBFQNvOsGqpx+xPQ8kNWBvIdIKptUM4ogALfIdG2\n602/fTWfZmoGHvE9lUzM+y68s+nU3cy81/eO27EzGSvvHPs3rb+eUT6fulRG\nw0oLeYfulzo1IYEu3qet90HghAMth/H+0Eg2PPvgshEFyOhyDRLGxVrPGu4m\nvXuMMb9+klMgz4tihr9nSmGmyqARidhoMQ3F8XDTGb7RXk2T6bIHRvFRsVqt\nVoFi+hvAMhnb4Vr7WFMzONMo6XzH4PAIPP4F2lxoiVYTDBbVuEPrAkhCCJRO\nI/xpprbXx31jPyocoHKj/KhPeC/ghT+iZLHV5BAwjmOfz9wD5PCdqu3FR4Co\nPFUO\r\n=TFYt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJWDVOwNXjonUPz8DdRl+HLkzlagD1qXg3gc6bbacd7AiAtEft2ePYe7/nZSdaO7ZMqwLOQsrBZYemAzLe+7jfcfA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103152307_1615849652929_0.5806941498703315"},"_hasShrinkwrap":false},"0.4.6-alpha-202103152058":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103152058","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"2e8a42bc145ec9af9d17f4f88f320f918440ab94","_id":"symbol-bootstrap@0.4.6-alpha-202103152058","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-C+lFbLngBV11FGWvI27OyrN7wP715B6lS4j+vtpwVGq9wyb5Uh6uI9CZDB1aW0RCflf0jXOOdTNflhzV1SvncA==","shasum":"492f7905ae71bf41b40ec9c50db3bb2c7b9e9a18","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103152058.tgz","fileCount":157,"unpackedSize":521427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT/SuCRA9TVsSAnZWagAAK84P/RY6EgIsNm0ZPXuPYkRh\nXjZ0xuYJsRoctCKyztgUtY9vcQSL2k+BHAn6mLhdyOjNoBME9AHICxgdHf3q\nwvjCK0U7T0k1KRzgrJ5EAIC34PG/WgG1Req3Zk8XKL+Gsj/DJPXdo94RTTi9\nsilgZlb3IuJgw+Lh2R9yq8tlwP6Q7F5OgvRwlJdFrLa1Plicnw5CuzNikBBJ\n5xVCV1F2f5lJ587yWphHVrPtIjJ3U8zpe1o+d47EQ0q2bVQZbW4Fn+TM0OlS\nhtOSRjWdbXIJ8k5DdVdqWsUSTUT7Ms7u0kZGy9e3hwflXTR+NNhs7J3GnfHP\nHIggvEtlOP18jpnClKlWQXDA2UMw2okm6Q5tQ7ygzC/SkKyjSg2eRdND470K\nRyvWfJvofzjJZcTs/VQ01ia/5a/MiQuS2BTMRVPr1Xgksaxs2aBjb+cxkq8e\nLkNzL0aIvhAJSi+qRPNQvSP5ZPf3yBhKqqXCfY/zQjYFedUyFDwQf1lkK4la\nCrxiG50l+J1nzBVMDo/aVmjR2V6IJpIEJ5ShJQxyFeEhagq3HZUCzA88Vn0D\nwtNtvj47q1h7Y2eDsC6yfX/k4uV3/4RxUgzIX57Z39gLJ+MUumsr7P0KwONW\nBAn0VwQIk+mfHXOmJ1VkhxRzb7PxTAaHna9I/jZ/QS1caFw+IPAZIWMzsS+u\n+AV3\r\n=rFOG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBByoq+T+yOP244X5+pcQvSnwIOyobcqJ7Fbrj6JQ8EBAiEA9Vrr/fZbDHUaM19eknJHIxoG8VsYTVN4k1RWhfaPjU0="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103152058_1615852716909_0.3303456274963834"},"_hasShrinkwrap":false},"0.4.6-alpha-202103160913":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103160913","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f02b8c645eae5112fea2765cf406b9ab0e9ff564","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@0.4.6-alpha-202103160913","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-QuRLi2h4Xj8k0VABLGl2Kp+8+YHfAiD7+sKAyZbGL3pdykPtTCFe1hUisMHpqQeC9Ke2PMaGVY5IWOv/JdHg7w==","shasum":"f503b26c3bdc991238fda55120a91897477163cf","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103160913.tgz","fileCount":150,"unpackedSize":458568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUHaxCRA9TVsSAnZWagAAzugP/09akCz0ZGoS/AyObQNW\nfjEm8cM9IxA3i8TdE4ygTFsrUAfjTyad29zfDxw+Fp1AXIYCG9mNAHuKdOoC\nyL/PWQX9w0UCyX4ypODS4qGwYAqCE5en3w0k3bXDTb48bMLbvIglT79FCqvL\n9PMTiJVHt35Ye9oA6FQTGQvEW1zLY10Stzn5njQkP0hZ4pOS6ABXXoMIsoX1\nsEMD+69FN9pc+gmxErZKRh3LZNP6H5Vwg4Z3dDTQeLorM/saiesbdfkz+VAj\n9qctQ0vsybm+TnLVNrzDsHnQXRrxCBcU2beeenU8k2bK7v/txWRByo5Sc71j\nclzltb3UuM9g98LjVkLZyNMlWDlJdSqPvDAyAc4p7HYGOQ/Nld3sTkysWSbe\nXhvxgg4sotH9E2b0k0p1r8kLeoBYTZPb1aSQ65Eg1x8n7ZvJfTu3r86zoKPA\nvHpAesMAQ7xd0AGXOuzwLohueSGVjOE4M/35Vx00qut5kF7ygLRf2dwhGuoZ\nKfF8OmepWfhiImSb0OYmdN6flcCuLo1lkuBsIkenjFyVN/4X7/XdH8xOF93L\ndcD6Hz8EpEdgM9fZ1lEwbNXCN9muO3WDob/vFrCQM3Gm/X0AlP8+58dcqFsz\nMywQ41nu+5rXFFg++k23bmLcmKzexm4CFdzO2KWAbSjMVo2ir0rfTGxYj+BN\nYEij\r\n=MY+v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrvkW0G2OGY1rzM3hJZ9h7nesI0pbwi1vk2n48tsDQCQIhAJ/s+ng1gWVoKpzAz4ksD/mSGFkO2cqR4dcYJXHy9HqG"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103160913_1615886000699_0.029726373338154755"},"_hasShrinkwrap":false},"0.4.6-alpha-202103160910":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103160910","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"886422a9eb7c7ab8d64b6558a2caef8a05c2b971","_id":"symbol-bootstrap@0.4.6-alpha-202103160910","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-D9T/uN3VS3sSf77op5+JJMF8FOW3wGo1YQAApsjdWD/YNmdQmTK/Y6KB9RSjrrFAU3H39EZuaywRuY8ckdVupg==","shasum":"a61053733fa484209a9834d008a5edc5305506ed","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103160910.tgz","fileCount":157,"unpackedSize":521427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUKAyCRA9TVsSAnZWagAAEbgP/A7k3i7ZNA6sDmJMdXXD\ncPI6XLTXGrxYqgFxluT3Ryq79+TqQVpMttdw3/YwiZEjdEG+nxFKELOKA366\nH866KzMvl3kZltFyrzvhD1gD3cJkAjhIsOARsZATJMLjq8cIycMqKvaLVJgP\nhmM5EN8+aw/Sv0CMYSlx4yZV5K5n/d2X77at0qa/30rFyYFKnANeBSHGhiDA\nYCIBAC9VtykqXkPysuhGruxhH/x9BC2lbAkMMdpajPTvKp3NFs/YPbhXEs5F\n/dVBpNmBNBP6BfZi1D3YDt7iOd+3O8BLIiUAhcn9FRbZ2Kq7FCt5IdqgXCLE\n0KurFaC7Vc7h1h+iqYiaQOXNPXZozLiR/eX27wnW3ObxgDTigaM3/6wUNeHV\no7pz0/BKlAriSWKf15f9MP8pBXvXP7Dpsb9k87K2wzrX997fDEbSVf6bMsir\nNWTeHm6f1/VcWYvFM/KYWgqwOO5OjuxoqjKbWM7qx6CKPpQNV6bvwv3kUYgN\nbtgPyxvHMPB87ObfAWOajSP+EemEqcoR4bh+QDqb1b1xBbqdUUyVYPWcEz3s\ny+rJY/TaEFNVL+m8JK7Tjcfv6DavyrPLVwc+ZAhHFPkCuonbyUzVeQR3kqp/\nCMTUznh2SofJEJwJV1NY9k/AlSFt6v8GJ/JrPFjxY9Qg01myQOk9mTt5rE7X\nGS11\r\n=Yc+X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDE53gZpWS+dY7Ropdmciuh8goAea8y5hztIwYTGO9X4AiEA7Pn4UosIQV74LE48eFjaqmgNprs1M4y+YFZ1tvKh4BU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103160910_1615896625766_0.2422277776826922"},"_hasShrinkwrap":false},"0.4.6-alpha-202103160915":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103160915","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"886422a9eb7c7ab8d64b6558a2caef8a05c2b971","_id":"symbol-bootstrap@0.4.6-alpha-202103160915","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-gTxDrGpCRn4Vc05NX8qjJpcutyPLTSjzTOAG+il3dmXOqyK7WVDvTqJm6lgx7Yqi6xaPJcSYUdYt5pAKiOYeJA==","shasum":"ea6e00b87433884b907634391061ed0bc3f9bb85","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103160915.tgz","fileCount":157,"unpackedSize":521427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUKF/CRA9TVsSAnZWagAAePMQAJZZABz6jjDKRwhl4f90\nXKxG8H0pIZii38dze2nrr+kz4EoVQWhe495b2CbAqMlXvtSadkI3anoWLxwS\n/h/FI/cdoTN6NZ3ncZtreFkJ3pwcMMH7dqRLqzgs7qGzqJWaXjhogyCnSqjJ\nYAINY3RANKIkq/lktoKnxdJW14FWgpo+0g6qTsDInviDIa5YrPMxbFKx7wrf\nMVtjMbD5veGAg2tGwvdQ153w+QHUVlRZnR+tye6kXasxOs1g/fszeEgzmuH5\ndE+b2Ld8v0lD8JLYgLAOTooLUaYXBDo8Nw1Uo9Y4wTGai8KByEk+4BirnwHj\n1hIK25/gIe/f3hkCP+HgeTVxRBDZ18ZZTsduU6ZWk08Zwzu/LuJ5rqV1JHdW\nkQQicbSkz/la6DAJpi9fOw8j27u1oUmuYAAJ405XPn55PkvOpdyNs7VnINNi\n9VJu7paJYfFUQK25vOD5Xb3TqmT0k+P6V+1FYBh+zF5am+l2a0fYbz5aIqBR\n5tkGWpj9HFhzHlIcU7CLz5GbpNynnuTZyyZGy6VOyET6vqYPSWEbzezFF+0O\neKIU3DEAKCC4b1PzNc3P9Z87saYZ29dpRRe8T0C97usJ8Wo6KA0xI/n/H0aR\nop9XxzYVWcuIi7p2SJOOfdQsuK/kw4/Js/7KLENVergB8tycCrxhC0CFR67k\n0yBh\r\n=5BhJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDa2NlZF4bJWpf3I6VM0TeKl7dZ4ihUeVdwskgdjc+YagIhAIq3jo1KdVVbDMxzcwWL7NuhypgSxkg4XkU9uUkXwNcQ"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103160915_1615896958731_0.8730144900655155"},"_hasShrinkwrap":false},"0.4.6-alpha-202103161208":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103161208","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"2bd46021ea3a7f75febfe677eb67f33fd58e7da9","_id":"symbol-bootstrap@0.4.6-alpha-202103161208","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-KKvqxy5b6hbKR1OTuwqIxsQ5tZedaR2zepuCPlpw6lHEeHbOjyQgRNdi/ASX0Ld3zYigZKKA9io6tToVgEGyCw==","shasum":"a0e622775c93da2a03a487aa0ed8124a08fb7a6f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103161208.tgz","fileCount":157,"unpackedSize":521654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUMoPCRA9TVsSAnZWagAAGnkP/0uFdS3keFhJONgXEGkI\naT/P2lI+qBt7ZlgtZknc7M87tlhMg68hk9fztmrOb7CS5bjak8j+W6Vu0MiY\nV0Sc7X7840ztKcfQdF0+pe3Lzh0166C9EwNydHryQEMFAIE7+p0MAquIejx6\ny+4Msex4HnfG1JktA2pYzv9rQalVNNF8l+H6o3SFV/JZNKIUDTmSARjOUTVs\nOsd4nbLO6z+eDaPomEoMeL3YQoCwQFI89FCayQseW2QVksbW9igsGapnnDjD\nnDTTWZsBqlgSNusxvH1O5dEJE0nELmtK75Un91CILgDlPoaqaAQx+WEbjvAb\nv886hWlytbRpD58Pt2qQIGnjzUnupjolE8Rjf28/UH8bSg8uEwq8X7eVdEXE\nkk/2c4a7w79qpgZA8avDKA6dITAfOP2oiG4NTjM/pdLVSozF0E1SbsZ/79Nj\nHgUGCNF8axw9URVN3ImE6u/xIYtuMn/ca+Aoa0snak0yQ4YiPhHgvrsln+zA\n7NmcHDswQihtRrM0/mxOjOevD9kKnMtwY1nyGodZeuCvq03H3tt5edXJbDin\nJclWO09pH8fUcX+cgU9JIMZvqb/HsBziuCPN6UCEI/UGNjA+znjd08UAgM+p\noA7kQxqYE9SG4T2oLxBZSUAoFUhccpVDdENA+mtqqKB3n0PA519Jd/LFTQ0S\nvTC6\r\n=eFW4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDz6/4NXyJS3/JcpibsdNeiu2AvRViSf8m0iyzTj6V/uQIgK65mNNsDxW2HLQpr37cxkp8Os9AW4Xv2cDf/wZ6Ebpc="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103161208_1615907342432_0.9843942892761468"},"_hasShrinkwrap":false},"0.4.6-alpha-202103161556":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103161556","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"c1d7176e371d686f7ad950ec162ccfe047811f5d","_id":"symbol-bootstrap@0.4.6-alpha-202103161556","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-ddqt1NYGKNrPmDhXjfLItmOg/R+2D6J/Rc3XFPwajEwxoy9Ovg17IYL3wv4RwlCbDTyENu+JD8GMfbY+Fb8K1A==","shasum":"fc1e91d3ddd09e80089b173d8923d369832a3356","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103161556.tgz","fileCount":157,"unpackedSize":521654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUP9wCRA9TVsSAnZWagAA+xoQAINBRCj8q+rAoPuuv2AD\nDINIeNRQ8qjKcgRmb6HGUh69KyrSMo1SyVAXVs1NW8MdCZn7Dvq0+IjapFt4\nyWa4nEWqXuwaB3r9hskjQ7qCSLyA3+wpu0Kxa0ANjpnxM+t4ggN9BXvMqSdp\n/X0dgLC6iYGtI5PhA4Bm+JId+9DsO3BkbyNY/1bN6drlqVzUGrXxFWmH5OG6\nxwb9BppXzlBbNde/cAwz2OAb0uBWoeCEm8E8MqnMB1ihfN31Apz747Lfg5NC\nIywgoIbeEiCY8UvBo4SXnCHazpC1qSd0+5RHl7bcZvYlFst/orwhfsb1l5k+\nuHBo6W+ugNcmHsU1Rn5fVhjHtxmqS1nGvhptLBSe9WCFByo1hcKLThFznBKu\nr7HK9mrR6gyn/sgUCuqcH4aHS4rckGkdduS+2FvKw7gjVkc3LqbhTd6B5BSH\nsNuJl5rgbAJbcCQ8M8s2sB96ypJIqweBUYKtTjXxCmx+7w5SG4PDbSMLaRvo\nO6JQznjVV63wRKSXAdJST4p7wqX2RR4gkNBLiIZ8xMMEZ5q3rqxEl+fMBsOq\nQLUFPcNFGh//p/WgXOeDEeOyNZZXlgxlpaPVtRfmHL6XfSya3j6bmw1v7t31\nIdHui759CDytoRzqKvNNW/oSC2VZbTyhNPPxiwatFpV/jwLeHvorkjfrxZjW\n/aEP\r\n=+FFs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHotFXkmb0NwG5LkyTExzfrmvpf4TubbYEmIisn+Xvh3AiEA6TRHXL869DTpgQhNP32rR2irhqyhun+XYdCiB1ZyhA4="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103161556_1615921007728_0.3922965830029841"},"_hasShrinkwrap":false},"0.4.6-alpha-202103162257":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"0.4.6-alpha-202103162257","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/0.4.6 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"85ac88d73906944e863d91fb894bfec0ad2b4730","_id":"symbol-bootstrap@0.4.6-alpha-202103162257","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-T5+12Bwi1aia+FC+E6l7CNy4u/yB7bUk8reyknqGb9zStRjLhBPOuo25PcsZXO1lnGIY6KUfkiP59wwmpnNU7w==","shasum":"6263c24dc1eb2e9a40896744b6cc2b8cf4c6d304","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-0.4.6-alpha-202103162257.tgz","fileCount":154,"unpackedSize":512726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUWIDCRA9TVsSAnZWagAA6NMP/RukHT+NQhbaG0RCnoWG\n+DqaX+QzsU1DwpS91xNUy5qGIQdkV5pQc30aGn6/Hy2h2Tnf78w9atbr1Jx+\nfdqT/K5nLPEEo2i0fq2+59qt10cuIS9oPP27pocja/diQSplnxiYgapJveEA\nMepwM5+AwbjR1snmyuyOxo7F47Bn7cIUgA1MfThJtUmagrEoYcuy+L7S/sM5\ntRAUW4e01/Om9c6DggHQ4rvqtnTGGWMvgrzYzlzz5RO6fT4J+V6qCnUfAeUn\nuEs1I8x6QEUxEeyJ0voOCWLhPWhi6DQ1t+vn4iY9lBy/MlwNmzuUxirHLRmb\n+Gdkfi9QTJ6agYRM+RJ53oJ9d8DOi1r31uievX4+xHtZ/cZIOgojciuTVXhJ\nSsDgkw9EEQrIHiugMPPiy4FLzgksV448D9crCaXeVqydOKJB4OnOP71vdrWw\ny5J80/kV/6i9hje79EmEMNdfkLVImHxzezdR+o7Edm0RBUQ0Wy+gvl/nJSzh\nwEw16896ifC22/CWol2dKbGuKGJL56n6kCfVpw2TZEIQuUk1ydocc15YYZIb\npnYP0Fo9Nw7x+6aRwPIucT51D6zW/bBLHla5QOxYU/N2SO08nxZJ6DgclkZk\nXicH1KKINmvs/knPnruFinuJE2HaNZyO2mn8fwPup2BvtMKJdamki7b9vilI\nQXxy\r\n=vgs9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxvTQ+3V3fugkWTYWjfFfxmHsUCunb0XDbhCEwNkRRawIgdHG7MOMM8VAHMV7mdY446AgrUJ1HXL6Go/JvNjxtnRs="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_0.4.6-alpha-202103162257_1615946242578_0.7804031184505167"},"_hasShrinkwrap":false},"1.0.0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"6a37a37e3138cf6b65b48f5fc3b6e2168ea7ba32","_id":"symbol-bootstrap@1.0.0","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-XvZcPHvngrziwW3aLqUY6q2RQuIl9JqnOeDn/+ZbfDjYVcz4FtAT1gyxIAvob/TOBtKS7iJwW5/A5dl+HbPyvQ==","shasum":"ff27c15d55751d792dd69f62ef3903385caaa520","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.0.tgz","fileCount":161,"unpackedSize":6930893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUXiECRA9TVsSAnZWagAAdrcQAJWLwEwdNJtE/fZtbSYG\nW1V1w6I+Cl8ty1I5d/P7OpzbHKnb051XrAds/vNQ34O076ETuzAOssZHqKJN\n4JfHddh6Mr0fEUxgIkPUUcr7SJfFebMz86YARdHegPLAwWLKjLXjHI5C60i0\npqIRGDxT/FOo/40WqWAm17gefUY3dm/q97EfSGs0m/Z4ISQVrAwyqcqD5qPI\nRqxn7KXg8nFDwEj19BdIeFweetyI4PNuGdXhTwNkM1IBvoD23B6LPrEPONtb\nrmTB85sZiKJqzuA9TrQvb4TyR4608PAUiyoykv9EcYYq9/nSnP0i6/vWYGxI\n9is18+va987Bar3tV22NIfyIIXQd/aJNLR4miZnsnxum9+Xwrvo7hodqpG23\nBYw/XaOLL64xTWWLOZIhKzNWWfgTUzvvDSke+FOnOyUyqKF5uOQR8tjbZWl8\nJfah5uFCxcsrHlHxenuthbW5Gyigvxgl+NZL4oAi3rs8g513O1dssl1U2PYZ\nFQXwbnhCD/WXwVex3ifbPfyzZM14F4cM39oM8lrQN4OYVzsyb9kv5raE6p4g\nBalYzKJAuy1w/o4t40AT6Fyj2/dvOnc7Lemyp4iMU48qw7GgTcBbnYAzdAYS\ngGT1hFxTJyBwB+47C6dp6vlsOH4Yvfo0SP0Y9KoZSH7BsSiv7Bqc360ZI7jk\nRmb4\r\n=Nsso\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoo3IUdKvWZViKZYqQNit8qmPny9DL4gzdAXBlbxve4AiEA9DoLxPYSolP0QOAKg4UXd03l6PKtVet+BGosv1xuTCg="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.0_1615952004076_0.8464446513362038"},"_hasShrinkwrap":false},"1.0.1-alpha-202103170347":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1-alpha-202103170347","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"efc9ef9ac837dad1ec711f8423c310cdda9a17ec","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.1 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.1-alpha-202103170347","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-e+IVtmd6J4kJrhj2DFbQ7sRi/BIEXdpSRiv8XSsxnvEpdIVaI9T6xsk+Uy45Hik61A88/RRSom+KhunxkigqrA==","shasum":"cc186ede2e41ee68001b1de8e7e14fc7415241c7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1-alpha-202103170347.tgz","fileCount":161,"unpackedSize":6930950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUXvxCRA9TVsSAnZWagAAKw8P/2zeZZt7I2vaHdVLC9Kw\nIW6jrlzopOAPTBMqFn921P9YepYZZ/az1dEdrix3NSoo2uKJKJkZA7WfGqkC\nXiVFu0NjwN1PqM8oaqP8HF/GxKpeiPTPyEyt0XZJl7/m648zAGFkSHXZkCK4\noLh8ar01OEJiUzigtqJcTV7dOiivShDIESvjQE03aBskpgnnSMqvHFk3/jPw\nvQnP8vUMRA1PtaZkjeviK9Z80kj+pFoI1yQWc3IPh+/bK29nLI2wsYmUfqO0\ndfNtVuVwak+372U11+8zFdRzE9pg5okaNYxsq3lrwoSRAPsZn7zuGrTAZv9U\n6qEKLuwu9G+4Yk7VJo5pTGfnngvSm57UzIDuIoJaBvw3deubNBKijm4YB4IO\nBlyXmfGIzH8VK3GIzv1frjhXCTyoWo2+cJgV044lk5bVD161zktAKVXQFR7S\nBV8swkyOmmfBYBUccPFu9+SFcx1sw9Zp/J6j30igs621b3+7s36l1oXVHI6i\n6HyC/UN2ju4qJMMH2qLLxDXBCZUkbahrrlnpUSzLYvSrqNX84qBgKGz0Eg4e\nkXU3ISgiAtpT+8MhR18pU0lMlVxdOMQ9v+eymsG38k0VNQPA5hMIcZczjUGu\naUBBUFKEi5OfEZmwrI1jI6TW5SY6vPyWuLQyp5B2libgglxrYje4LHsh/QHI\nFNQc\r\n=nbba\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5v2qOhE1CC1n1QosArxFB5Ggk9gKLSUdf278zch8SxAiANA3LCrLodh8bEMvDHG1TpfpG57nIoYb6C+oG9aRaPUg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1-alpha-202103170347_1615952880637_0.8989300227708936"},"_hasShrinkwrap":false},"1.0.1-alpha-202103170349":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1-alpha-202103170349","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"20da0590f743e1e880f338577f3d86fe8b673b48","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.1 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.1-alpha-202103170349","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-7Xn2wRUysvaTsJQgbFUW5sC45wmczBen66w0pcQ/EL5VowTt5iqAUmG2vbU71EwTNQi+mUgPEfR6Qpm4GMPVyw==","shasum":"e68d2029abd37d718a975f53b01ccc1d7a0f61f5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1-alpha-202103170349.tgz","fileCount":161,"unpackedSize":6930950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUXx1CRA9TVsSAnZWagAAmUoP/RrFrzZL73/zmu23Riqt\nrZXAQw0uCXidcgSwNQ5+FWnNV6BiTY4QI9JL10HEHDB6kZZmrJ1hM+880cJH\nXKpyEXv2n+woiq/Dy1+2o0PAplpbxLscOTo2TTnDGk78oKCp+zitjr9Gb4CR\n3/8RIET3c66eb46P/s4ECLQsAjKe12ScW3bXnCX6rc1bXgX0Xx2ugC2jaweS\nXah194vaBMYGiKm6G1GbD6WCTjz6f20d2/xdl5IjA5tuR+d0Lio9gADqXrdF\nPmQIVBJm6IvAO9Yxha59NWAbs20h1NBgwGCJlDx75G+RI5INenQB9dTk1Ej0\ndOXOcs4gkJ25m0RDcIjvc5JE5oTll+vysvxPB8aLrnKIA3DXBJsAsr7LtQrV\nIZMozCxpydtL62CUFtIZu3cI3yQhptHMXDW5HTBzdovEfgMZ9VMkatdFZCfk\nAwJhUJQ0YbDWRy2fwLmXs1aEf0gP1RyxMGjcAbwhIhkuk/lyg9z5iOZJ00iZ\nfq+0oad5d7RqXZg6drHSrt5lORD4n5Pca6/eQUsLDN9NtJjhTJDKxg619xlF\nHgmskYcHnwI44I6ZVu32nSARuEeXTlN+QvenmRYwRNnoZxYvywiV3YV6QmgK\nXNclk2qRHR8PbR0lNQb/1YikE61aGpivP1JR1dbsCDWa6haoSyYWV/im7/7z\nzHwG\r\n=wnz1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBL258YImdsn5gLln17Y+pDm8/bUcYsZfBRJ0nArhS5wIgQnCZxKuAogAWGgGJRQgkWs2PyHPFInp7X9jKNp5HVF4="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1-alpha-202103170349_1615953012884_0.28858820016370257"},"_hasShrinkwrap":false},"1.0.1-alpha-202103181822":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1-alpha-202103181822","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a1c1c0d63b300a024cb2ef43452cecbbdc5a82ce","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.1 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.1-alpha-202103181822","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-RsafzBsbCSlhPagyNY9ZROh/Nf6crvZBKy94ugJ+5Fd0OQSPD3shEhye8gwaz9pPK1uQ0qWJ/qxp6AGl7pBL8Q==","shasum":"a0628291974db8b71f0bb01d47ca26bdb92a0964","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1-alpha-202103181822.tgz","fileCount":161,"unpackedSize":6931806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU5qSCRA9TVsSAnZWagAAohIP/jkUpiOT40HeQ1Tq+tTD\nxz8xJG3r8oV5lciOrbKGEdbi20v4wjQrEkw4VETS+pYRtYCwvZERibZNCoon\norHuHEhqklsYUJI2agWB8d9+EeUGHTtNJ6iVuZ+eFsMOvBzsK184qduOCciG\nCGtAeFB7DF9+a5ybgdGgVRgkl9OfTSO1aDKQdoBxjkLYAhyT6KmDMvI6oJ28\nch6h3VuUFwWWv4mC0irYweoy0SYoUMgAMjzM8P+Fou2IxexGzf96iYuVs7yF\nxGfDozq4mbYLCOhueRnXHYoX8Cw/xYikyWYJixDu67UFo1PPw2gYlVg/WX7Q\nW/F3tUJs4WhFcCb/3dVIoKce5vEr3yQ74z/qsG39x2Xa686y1WBiRTmVuBH0\nJHyZQ233Q7J3hlpGjKkZQ4drlFL/2qOr1ypn//rt8fe9cgq4jhXPt+UctGWY\nVKaXhCMz6S/TXpVPThkwCLhg3eXfPRO6zgp/4BrZk48XE69puLxR7k40KAqS\nYamc/sh22cKoq1n3DC1zWPp7BwAYfLbXmxYXWyPUTp0/zU1ndtTLQw9gl3Cw\nUW8JTH5hzhdRhbI+rI2izpX3qbKfMXDrIW4wWblXSJwQ6bigF5SC1OzzEQJj\nv0Fo/0mSB6I7OWdhCZxygwlPHCyOeAjMF+lYjo2WXCxVZIia+pozAk6A9jnf\nOsIr\r\n=2BGn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLO7c+If3LQEDnt6XsaXasJRywtFTTxT8ewJGYxP1vOAIgJFddSZXjPq+mFEYfh8civsEf5RVmnbHwixlOQjf74QA="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1-alpha-202103181822_1616091793610_0.45605175740912185"},"_hasShrinkwrap":false},"1.0.1-alpha-202103181847":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1-alpha-202103181847","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","tar-to-zip":"^3.0.0","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","publish":"aws s3 cp --recursive ./dist/symbol-bootstrap-* s3://symbol-bootstrap/dist/v$npm_package_version --acl public-read","tarToZip":"tar2zip ./dist/symbol-bootstrap-v$npm_package_version/*win32*.tar.gz","dist":"oclif-dev pack && npm run tarToZip","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"01bc9ce66b0fe95fe56be80e1c4bca78667fd945","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.1 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.1-alpha-202103181847","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-o5Dxdhz8kuDQnb2rLIGsxQjr2kGGBXv/rkyarxj201j5+1UidwgRZVhH6iuYtue+s1xwV70bqwYsiZ5+YEe+bw==","shasum":"52270d17870972b5a346298eaf3b0b03cc4dc6df","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1-alpha-202103181847.tgz","fileCount":161,"unpackedSize":6931265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU6A4CRA9TVsSAnZWagAALRMP/2ftZwPPRBsvVyBXi2g4\n/j5YMFuEg5TjXEd1btX1YB9J8h6zvRse5+xnY/WIxtrp33IbGmcyYJ0eEc0e\nEXLYYAvKoa9RE/n77K/CqMSlWlr2o8F7IPWw7qP5MkT47knYhOnZGDK84l8F\niwcf7ILDKcAXaw0ZNRYafYbJWRUCBUuV3UwJcoI4L1KsIN5QnMEk0ZZjeq7i\nUHdl0B49Nsp/njU5Sw9mvtUnbRqAUYaaTQcaAwXrhUYEUbkXiieGCt5mg1U7\nhSSuzrSluC8V4oqtmV7BXMsyNSX4jFbK1uQ5wMbqerw9+j1rGza2Y47i7msK\nkdJXDPL+z86wrJuLjimJMr4TUsxnh1+MTUEifAetx5l+G9SZk2lkdphxNidD\ngae83zDwWJz99Ud+Rw0QvJ3eslf+ot15ikpSupU4tKUK6Ba/fKp0a9ZEbtXG\nSdf2zHYZKi6Xplo0JeqBXSgnTpabU4f7dYX2enSoPmhHOptZaDTokghQw8kn\nDV9uv+M9sGamPwdhRjkQuR/2hgjVEotL2B7grcrqJMXiZZrb8jh3BMb36lsT\nn+3y7yu4cd6bWnc2SUvMp6tJfn2Bf/AZl6RG/MbniVzZAS2x5LJuWPwSC6r6\n84DRNokCsB9XvxdcVMvsccY2QuRctAvaDvhcMkKtRWYsiy+S1apGGMLxmj+x\nHas4\r\n=wmU9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA1s/plbR3R4eNHNxUolkk/nTNjfu/qlN+5zI8i9GRBiAiEApObcCXQRuMU4Y5heICtiKCG9pT4FnZ0edrr6/O0oz8Q="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1-alpha-202103181847_1616093239398_0.05344101799238721"},"_hasShrinkwrap":false},"1.0.1-alpha-202103191250":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1-alpha-202103191250","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"aac9df882453447246137d17618cdd896fbaf4af","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.1 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.1-alpha-202103191250","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-45h8t1UE2mdgkJVHH8w//5O/nGqEiYG9Mba/uobWSpnC9fChjUwuqU09HOdHy8VG+JbiC/H9eUCsuoFV2Bczbg==","shasum":"7e701a6ac6350e1d3dc133d51fffdaf10f544584","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1-alpha-202103191250.tgz","fileCount":161,"unpackedSize":6931880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVJ4PCRA9TVsSAnZWagAA0eQQAJ9SRb8DRLwMqq0gj7+l\nlYBRMd7yjAWU4/ckGcGBHy2wQ93uBmDDE8cxxCg/LIgQpB1n5uGOzvz87Vrv\nhzcFHg6Ue/86MRCHxOS8PeNojek3pFrFUS8Vq9sQHyq9bYesUzCIHqJVWNgD\nTBYp3HZlqfiFrfDpYnqIUpJdUcLv7lBWu5Jx3G10x61xflTjxZh5LVhTmD/4\nVr8g47f5wR5USd5V0zsx9Hu1uqTwHrrhXlbUwZIZ84dMs48lvNTR2epf0qF9\nCCykAvgmlwwYZzD+Hg+bYus/NuLVSsKjMyWejdG/RsMxKz1HPbRQIgmHWiNX\nePsNeCZeM/wVbmAUNlGO9EVEytuZ3w45JtgpsVR1lHe8sLhtV2ORBGwHA4ES\nKv99U/MQUEeZgTV77TozxWuzQM9tYNx0LY8PYirgCZBzzgyK6ZRmYpEcudfe\nIXf+jHJvDeSONzQ747koFb+dk8pq4E48EuqShSMpMH3Rt+oX/sbNHWxPnm/t\nL4lwsXvKiY6YCq4v3IAaXFrkGZibHxQG904pbL8DtJbxbRJQPkzEn7sD+zkP\nq0MMQDGUnMsab3ldN8/k6O5U0aCQluwRr2vmXCZKmctMjI5fJavg5nZzWBTj\nyjQzmDJX1fG4CBa+s6BZX4zkHCyDfDv874Q/VFM5jelg0Wb25PNeMI2K3SnD\n+0OA\r\n=5T1C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICuR34puA5LqjpoMgI27JrAxFvk01g0oovwejaFqN1uIAiEAtjsK/EEH8Yg9OVr1XXfoW6T6tO4MSBEEYsmb3ic4RXI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1-alpha-202103191250_1616158222582_0.9985902825820019"},"_hasShrinkwrap":false},"1.0.1-alpha-202103191559":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1-alpha-202103191559","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"486656c71dc6d5a316e5846a281168d69a30653f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.1 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.1-alpha-202103191559","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-9lfaSQyG7utka7ug7lAARMoRHY2LhKu9yfcetR/8Ct8IX8VWpiuqmolTvsM9U3kZ6zuc6ArvchEw7lqYj8PcjQ==","shasum":"549c562775700bf19bc75eb216282b410f91ef0d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1-alpha-202103191559.tgz","fileCount":161,"unpackedSize":6932049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVMpWCRA9TVsSAnZWagAAFP0QAJl3AXAvE0Tzivq4ztuV\nEzauuhwNbtCwdy8zxpdFjG8HHnTMlyMTXC28BaVEAKaEQMCN3MoQDKjuiHdk\n42M6mR3yk+/viU3Os9cXHocsdmoHiY+XQro9ktUj8JKgj0tgQscZEF+Y00AV\nBT+rWU5dx6cCppftBgBAyCRIV4ipBAt7wBUGf/ewG+xm84soQr1vEeQKfLp4\nW7Z+uwwdUXA9ij+PyGqQmj5+NMllzcOeVJMYFhcr9RvEWU74ZI+HG040IFS2\nPabDf0OsAUmBXpRZUNeKKFOzKSNTCRGdCQjiKtx3YLvx4aoYJ9kg1rqmd4Ut\nW5rdb5YDnmBuRn1HuexjmTRvYCPNkofZHYE2XOW+JLHzzqqROlE+/JOJvbPm\nzSLL0QtyOyBUjePnmEnwzeykKMQTs7KrQ9GZnv8aNxnNf17UfUaYOAKoskHo\no8kB6C7kELvcZGLD5nwlUmYamJB4OESJXe611rfUMlW+RebVwSYFk6B3d4XY\nkHWE8HmVoRWEwHglhkmEFvvFMz7CWdKyCMcEAF7L6GwPyCIAB9VUmvHfVhYi\nXV/Hp2/J4pAuCL7sZ3Zl7qy3E8QeQWzboN8RM9Zxecn/0hyddpHNgVJ+hN7o\nlXM1VhvgZu3tFO1+KNBwrwnhz5V/5Z1Uu9+3M3giD/Z4exReHbwVEoZwx3Qc\nJwIo\r\n=8O7O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVPm7KktLHe6WfrY7tCsc5Kk2SLykqYIbSmu0vO3SqAQIgGqf6VrQCIIMAR2F0wHEv+WEU4yIO52sj7DhaAxI0hrY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1-alpha-202103191559_1616169558106_0.030834125783343547"},"_hasShrinkwrap":false},"1.0.1-alpha-202103221930":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1-alpha-202103221930","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"c89b63a5798a46db70dde94ae41b8d9b70a121d3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.1 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.1-alpha-202103221930","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-tX2Zfet89Vn+j6xVOX7HKOg94GVH0pnLEIpNi8OGGgiE/YWC03WqR/yziKiFmwZbzsg1FP+IduLivk13K4b9oA==","shasum":"cb6a667db46a55d32af3b4ef3d9ef1342a707729","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1-alpha-202103221930.tgz","fileCount":161,"unpackedSize":6932056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWPCECRA9TVsSAnZWagAAM3kP/jG0MfTp1v4qSto+8CDm\nqAzalQR6s1iO3qyxv2y9BB4s9EQENj0py7IZ8OW00OIxyN8UGv2yqMsf1TiU\nqy0YV99CAXWVenLUU9HiBXNNWYOdiJy3antXc0Q4TWmO1fEYX1HtZ6OJ1zpN\n0wgQb7ObulmL1PgJoKrhiTkwq/DwPUI7toykAHxbnudOgNMuzaFIU6FHL9Gm\n8Z1K5GLjnnu8/jj5x2T7fS1Po4HDbHiNY4z/vRakkpyJRRzes+lBlaaIuNlt\n4R6AdmOTHPJbkkBCZS8BLlAa9YwfpzmsHdjKANfneok3VvwZ4IcMT9nfm4lm\nPa4s4X9tI4wJ3BCootoyWK8yzuB/epv9+gP4f+d0H+qccjYToyS/OcEenQQ9\nkaC4cQHBE6wRdLUDvC6xs6L9QyatWRn0EgZvSDgzjGMDhB3eZeo/whvIzWd8\nNjScI6zrD1ztP/NXEdBVHCy1mrXyXpBLRrEdO41b7xtamKTtppqN9Yy21ASN\naI+LVxsOqxtGj4tgU3hvaO3jZSegn2qS4OJ3BohzGdD2DIjXSJ8proiZjyP6\ndA+v7TL19uNQhsb8KFxfxCFa7i2UHPLH4Qr3m3LKeW5oX2MSvnkuD6rCuI29\n2EupFnAaFuEn0UjjsLvOGO+lAJ9sZvFRAq96Rm2CDMIoJWYw6AdoELp88bb2\n7unr\r\n=obOv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyvnA0dMbwJSd5G9TR8LvD2aiho4hXLWIlKyPW4/bmYgIgCvNNEEU3HU3PpegSMlZa6vwuL8UExNI1/ElJogbleOE="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1-alpha-202103221930_1616441475593_0.8393932220622529"},"_hasShrinkwrap":false},"1.0.1":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.1","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"82d51b7e3d6fec1d1e7ba6a7d3b5ca6a1da764ff","_id":"symbol-bootstrap@1.0.1","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-I7Rz30bbhzd3UsH72BPP1eNYVLaHePD2p7SWj9dnx2EeIqyGdvBxowBMpv8KxINkYdYMpS6nhT51TvxVOcwcLQ==","shasum":"1e43a6b69716312b5d6bc33ad96dddf63fc45e34","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.1.tgz","fileCount":161,"unpackedSize":6932415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWPv7CRA9TVsSAnZWagAALKcQAIQ98TL3UnUGHI8EUl6r\nmmYZ1xNi4/VcHTPF7Jfj0gqyplfGGbHgLaVB3MiGkfThTbSliDaDc32Sdb6j\naa/e3YTvokYC/erjkJ6cxPxsCWwoiocIVTK+fuvEr0wFEp/RoFzw88pmsCtN\n8sE1HcZTUUz+STkMhBgaIJVPrcFqhGTFQ7xzGcY4uD7FNFanp0xtUK/YEMpo\nH7tcDRloFCaDzew+LsuCIPrDHnHrR64vGrl+1v5bpJfuiohMuIbvFIoK9l8m\ns1PR7Wq+1LSJ9Rny64skloIUyE8gKR0XtR1tRlAoU+U5A1pXLJhnfLKcHf7P\n43+ozVgOwwt47MoDlJxk/B4LZgfLIN/xgqcGeKg2RLCx9NyjtslIK7103gbq\nxhWxhYAyUl5wfruSlT8ZomB4ctcu2sc2dKmcKT3EVU/iCN24dCbRT/AKEXga\nEmhNwtq/4Fc7vnK7s0FpR+AIEd/REMqLu7Ee7ujYo1jAWN6orZPqMd9Yo5Ds\nxwTWC2f4ewfTp9BQile/Lst3OYGOmjWLTeK49gU3g4p7SioZVC3aF7JO897B\nsjaotKwTaf5x8bDmXYuZDBG+9lG4CTtWe7QfzPCwC1FUPcHkPCxy+CU0iS+E\nrnnl8OGlVSTWoKya7u6Yv3pf+eLe6OncQFwZVrYOMRCfhKw9B3cRshRSIsM/\nuXKi\r\n=mYLZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD32/zpchR4XHu51FY2kdYQcPtTrArSiLer+81rT5zVxwIhALwWwuOAepBGrXd+Wxj046heXF9OgviswKoVts2UO8Fx"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.1_1616444410808_0.44176736263823946"},"_hasShrinkwrap":false},"1.0.2-alpha-202103231229":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.2-alpha-202103231229","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"ca93077a46b5042a180c3446ac6383aa3ef9000f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.2 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.2-alpha-202103231229","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-h8L+Q7sWHeYuBxDO2ScXOXeHYF4H5uIoBy/HEESzXxNGFXQfdcnSvyYCc8Uhxy6/vboSmFndg7b1PDv2EDRfng==","shasum":"02c7a282fd2af90a4486195ad5619b2c3b570147","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.2-alpha-202103231229.tgz","fileCount":161,"unpackedSize":6932826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWd87CRA9TVsSAnZWagAAAJoP/3/C19AbUdVJ4zAoeJMu\nsEq4B9hFkavVdWlEDTs76ei1/+fFUqRproz/Fn6h3nlwTmOiB0vWLARCuN+c\nT75JaqGgr/SjzDKlGhB5Nzeslvjg2q7Q1ioFJ/k3jr8g/r7TxZHsl0RPocd1\n2o9/zSGqsXnuXjbpRO5hdPQq0lPLPTPo0Mf81rx1PgrlICjTRCWKRTSyRLRh\nDq5e4weEWTAM4mN18StN/oI4PVjqtPDFCMrIDWL8+AgvKC2B/15oey73pFD8\nqQdzVHeBuZi2WLLoCH/54ImsDX+6ckBOx5gtniXLFZTKHzioGJydvyUCJhQ5\nUUL9QDwm90M2NJSeYso1cAXaovVpdWoIE/DdcfoM4rXoyzq4fwTBFD7k8XYg\nZXIIw1rUzytS8BMEY3zEyAIwpAVoAF8i+6ofoZUgJrz0EwWKGI02nsVw6Nub\nFR+n8sOeTl1oyLSD/9sSPdOQDcqvQtf69at9fNmNbcMQTUMu7GJyNh47Ah3y\nfssXKJby9tlkE880qdsedhSwegAMwno767eZJmLlklpXGyVG62zV2kSS5ZJW\nEYeyD4Rb/1airptVE61BTP50t/xIfDvRs52pnDYmgkPgecLBI+yALYohmiOO\np0a19LsabP7LGngQdDakvAFdaig4JUGyxWYNidFqRJ19LCW+6I4SgIWQOsUU\nr1ha\r\n=UC93\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuEHmzHDEVyodDFbFu7hfamqI+M7NzDGPT1fiqa3RdGAIhALSW3ZbTL2YdJkvVcIJB90hD0HxU6fN2DNjppnH7wD/p"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.2-alpha-202103231229_1616502586476_0.6328747631054847"},"_hasShrinkwrap":false},"1.0.2-alpha-202103231652":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.2-alpha-202103231652","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b792343f90123b4d24474fdcc4d11577e68131a4","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.2 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.2-alpha-202103231652","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-QzAEnv1VcF7MF9UVDJU+hRcqI13r+Vn1Bfj6x9hCa/WJhyZqKDe11A2Pk3zQSIfgsZm+YA+jmILHcXvPxitjQg==","shasum":"7f4df8c10ff5e9fbeb4d315a9949d692f2586fcb","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.2-alpha-202103231652.tgz","fileCount":161,"unpackedSize":6932866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWhzLCRA9TVsSAnZWagAAgO4QAKP20iKdCblG+JzA5+P2\nGq7eqUrMM4eQX30axkNtMSNqOBVygyM6J+U1GNEBJsvEfUr3NRUBV9y80tqi\nAXYiKxNS31bmLgLg95XVwmaig43KJjd1SFurWqaRlDEp1ZvIxjsVNim67eXU\nJKJpmZ+2cpNmfEtfHbryiA99Zf8jzzoIsKRc5LLFfqJJrFOcw+LrDROG/X93\nhtu7AvvOa9ucUmSIXlzvR5H7oABQo7EwEgfb7kezHcNGewIkm1HUDUid/KEd\noRfNfOKDbXYncBPwMfEz2HQxeIVGTvC+2kAIa8jAtUyIuV91r52KKl/5wGE0\nHvsLBoSQe9cvrPRvI2IMjkhIbYwsi6YGhC6dzslNr9b2DM6pT/ItXPevdOjA\nNby4Yuc1dUP5SMSvWbIMCWLU+zT2mEoszPWKY7qz3GHfooLP8OVYPM4v4U2d\nmHzcVv33CDMGVdrHcFhi9DzQRo6QF6bIKf1mv9eKbHquuA37h0OJhfXd4JXm\nbcANnCeWj/ykt7luM3Zr0rpn2r6iGSKAz7btMxc8rPkqeUqjx6CagPpujOBa\nmjCukuH0ZUBJKv1TwjScHiY+OuFHn6S1rR+vz9UsEArfN++rL2iGnK1iWCtn\nIqr4uQGl6aKtERyqLYD3sl5SdOZNnzyLZsvgM8H3661QdhJfmYf5VEc2JVwd\nOOtI\r\n=Sdsn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE60aNcjfj7ALZu7KUDM15qylQz+wCKWKID0z/AJTLP8AiAtI3Yev8J4hywCskUkN18KY7pj77w3gmvhs0tjvU4ymw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.2-alpha-202103231652_1616518346905_0.5325622174016633"},"_hasShrinkwrap":false},"1.0.2-alpha-202103231654":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.2-alpha-202103231654","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"7d7a6206a6c212f3341533afb4cce6b0eab515ec","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.2 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.2-alpha-202103231654","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-k2wM0m3OES5CEXTS7cqs5yPhCwH6+KDL/3eRNHZd5ovKe46+6NKpwphzIojOFh+Hz5Ptk1/xkYHsxGqb6XsDRQ==","shasum":"b0cbff4ee5f06333c091dde42fed5814e02f9659","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.2-alpha-202103231654.tgz","fileCount":161,"unpackedSize":6934927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWh1oCRA9TVsSAnZWagAAr2AP/j8gawCA96/wNrginD/a\nTzyFHsnoNTHsyunVyPG7Z+/bksrvBnfTMrsULh0kiPuqvqIGThyD6aq71sqJ\nMYoI6kMGzUkXheboX//7f5qI/Q/7L61U2v+wFgoiCeZOQQRJfjh6EN0rPpNa\nFoAtAY5RISAWR710xuq1PFnf8VdTtt8yK6DaMJu0+wjFUH1tbxMDGhoxO+KH\niWFSfAkeKnX8CmPKRBbXB+jQW0yrIaUwqywdMbHWIc1w1wn/sW8h0E9s3kZ+\nh9Zv84sI+nXHiFs2OcAeFBmFI33KrvSIR/1u7Bt2VZF7+BPFmWOfFMCjwPgj\nrAWP23KcjXQLMFwHsb/SbFXs9mJhRxWCkInyPCxWl2wBmzRps06zoN84NgI/\nKZNlkL9YBp0HhLudFJ+b/xgOHiVavzZY1/HApn8Rl+eRhcitoZfBds698aIj\nxv+E/6esvTGYG4EI+KkjvITHqfyd2wRidlB3852B0JF3EEL2eOYEHPoQ+6tf\nZgKPNGjAT63pEV8VM3EItWuLuFaobev+VA1af2/j/MIyJ8ObTy8EWVw0NRFQ\nZsAbs/RFl9GAbBrzE1YUDlU6Mxwb2epA69+aa30sfmE/KMLBMwQy8O7Messv\niosuT9QfMULIa0vOW87krmUjXH+Qe7yMnDOFL+/1eRe57Ph/4jTaGLCdym//\nBUgy\r\n=ymSd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGPuxkv1sdt7TdkPtllKFgZC400/8L+/Yn+qolFRFvSBAiEAyRfq+FVx9IrIaMCu615cnkNEnBg0xNEzQF0WmF1mSg0="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.2-alpha-202103231654_1616518503210_0.8545532789111874"},"_hasShrinkwrap":false},"1.0.2-alpha-202103241031":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.2-alpha-202103241031","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"c35e571b0f7af1ce918ed54fe51f37c61f9c7ece","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.2 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.2-alpha-202103241031","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-JC8OBXZANdyWaCyhddFfSrWe8x4JjUR+HGQQz3Vw4k9qSACF/SSxaeHcw2kU1d0l8WIB13rxmGRExYzud1sjJw==","shasum":"dd4fcd4fe44919d37fbb03fe29d947771163f8d2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.2-alpha-202103241031.tgz","fileCount":161,"unpackedSize":6935859,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWxUBCRA9TVsSAnZWagAAvCoP/RRMIOhneBkEehY+0jfS\noavKOyXAA0AjXgjMWlVEdAFiYBYtwkiIkthOjnn8IkajKLbXMzunxRyo0T+1\nsGbhEPJYpENfn/DF1gSCPHfGFcTJtf2/rt9uFEkxOqMWyoCymnI2GMfUESp1\nYfhkooDE+DkSC8DsiqGHHunHoYqTlQbwSHzwXLJQuQOk+2ddHyRBK+fVlLf8\naQAt5eeCfDXOp6Fuehj/RNtrEQ9EN/ASYAQlVltRdZNnombDGFjq8JHVTmUo\n/kNxyYno2s4MYZuM3aNKNKklE4pHzyKGUNyvgRbkvn9F8KSFC7euqaRTX5c6\neqRdKe8ZAiJSh5Poaqij3BT5vpDmoTlmwvtTHKniEKtTfWNKnuj38/aPJ6xt\nDHXNKQjJrAeRDWT+epfJehJvX4a4HlWXF0hkbU4sxrwc4OLYtb74JyeVequc\n6DwjWXPNsSUi4SCv+K1+WEVFsm9HsWnHKhEDaSkVeRD4leOO/W/eqomFpcin\nP50L9vbOrUsf2ggPcAvIMKih1+w3HRHKQ7+TzcFckz7XdANIgH59EydSfeNI\niOc4dQFzxKn6tIwpfK6K/Smk/t3T+KzvEDuQKzkffZoPlsDi0OVEB0Z2Qhwm\n1BibByJIAMhv9TEjliG0uZIbBgcoZwX81QOvFt6kTbLaPeLst3JkOUVjBFJu\nyTDS\r\n=4y1p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJ64PwRCahNkayFGtOJOLnuCNO5UVs1XH9qLj3oDpRbAiEAwLlqpSG07gueVQuRHcda6wA6+FK5KlnSbs2BZVsUCss="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.2-alpha-202103241031_1616581889145_0.0748766991919656"},"_hasShrinkwrap":false},"1.0.2-alpha-202103241513":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.2-alpha-202103241513","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2f869106014c43f5cca8e73bf87d1c5905f9ecc1","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.2 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.2-alpha-202103241513","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-QMyuvoS5v0uEfA0+sqpVJPzucEnXAwZymCifLtDTxHLoZBwIrBBNpYv5acC0ArSgWr2FpFs/jzKMgcoyrUksHA==","shasum":"3f47cd5f72768919c6722c50773e273e871cfbd9","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.2-alpha-202103241513.tgz","fileCount":161,"unpackedSize":6935962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW1cnCRA9TVsSAnZWagAAJHsP/Ardv76TVyKfwicvYgf7\nuS9PLoaUat2g1GmTsh3jHVIBA9TfGBp6Yduw83lxR0zw4q4ptI2YZbBl6igS\n/z7anR/UBP11HXnDEq7lerhUzFu3MW+qdnKsnyZadIaDF8mCILvxRWUxkjsH\npoCEWBFpZxQ9lOgHMo+XZllIDWFGWXDVvk/Yjhh6HZzhF5qf7sDRzcO+L4+7\nvvuxxXAocd6igCRK97YxO2kockuA3YtRUrOg/RyRv7coZsKjeA4BacCAFk99\nFHnoLxz57+DJxSsLDYLUyZCdrQpzlw7OphozN8xHDBv7HDFyFIKB4wKhrC8o\nuJBxo8S1/Pt2BPIWp+aliBiKBLesiuHK/g+2CrxwZ5I4r3JS2v67lsux609g\n6vwvZnw5R6vBjbflIsrpTASABplm8eU9+ObClp0kPnySUyiocT88m3XE/eKw\n6rUrzvcNJjzt8o6XODthsvev7+yHb2M3AXltzLpGWsB25PMA4M0gsrpYDUu+\nf1T+rvCJPabWRH1bbVYYf1Ou3adO66SFJzHWkxzeyEX85N6zzgZnOIIXoYN/\nZx4esNNOAJAwTDHRTtj2c7Feq85KjVqeeutd5iVNe/fQTi88vrNoU/M+O2Sn\nMmORll2yazZgn4vVozWzLd4Sv9tqobkPEaeX/eOwO1yK0iXB2Lab2/VGqImx\nvYs2\r\n=oYEG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEwWqx7gstdeAe84ZADF7k47o5wu6E2KAlaca608zqXIAiBRjWce1Ev9Plg5EyCkRdUWR/3iaeVAFB8qwy/S+CPO5w=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.2-alpha-202103241513_1616598823159_0.778729647476329"},"_hasShrinkwrap":false},"1.0.2":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.2","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d38463f92ba5af0c3e5837f9c228c29b700e3bcf","_id":"symbol-bootstrap@1.0.2","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-6e2xd12buwF/gIbG2+QHLelgJudqMmJgXfLUseX+xC+2EucosZGS55i8VKpm2EvS/GtE5GYpewyIODu31eS+OA==","shasum":"ba9f38f05acd7525227e038e63d8a0bc89689475","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.2.tgz","fileCount":161,"unpackedSize":6935905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW3VoCRA9TVsSAnZWagAAq00P/jW4WRFw8jAcrmRsXWIJ\npyHARc/F11vjtwwFnWWjcK7DXdIC636wkPhUu8D5RkIaay1+L66fsgF6KeEP\ngCWX8FMsdYwgVncsKDrnRJTW7N4/SUJk5vt/dQ4kQDwKKclHTiex6+k89LtV\ncWvpdcupb7P8RnnVqn83Jvm/PewF5KhNXxOhnhgsDTd019M/lMCAT5teuje9\nFfiWnIFc/gHQs+U4y2l4NsKBmFf4uo6wufxV/Qw0riTh4rY2J6WpFndvQF6c\nVWbT1AQv9o1uOe+/ppll4MyhOq+8iQ1tmnV7qq6Pp1XgpBka+KTKfkLpmo5n\nJxXZrHvQnoodfp4xeniHCkwItdMD9yXrhObfDRaMqxswozAokg064Vd6uL/W\nnh1whm74NMZYNbXxP5YgOsGe+lP/968+QNn5zn704V+yBVr+IJ3+qCMZukCd\n1SdxFvfZ5uovEyK77nQd+pDYVaFt7uCsdWhP9f1ayKAfzgtkE/1xh84BlqUX\nfe2eMz/1f2QVlt9DGGf8NkXAQ7MJ6HhI90zK1v/32cLAM6gqelda1/kSGVTj\nk8rxhSq9xuN60Y7h4mgRQLiMCPeWk+Rh1X2fB8EwexjiFeLQKas7be6ganb7\nnGLOgk7Tl/Y5h7xAlFVTD83uSKpvgKQLZ1zYp1gVpIabWLp2FL3YpeB8/XXa\n5gd5\r\n=I3yh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpR0NfPWw4E7xnI9FPLUPXjmRcyQioA5i5NwDfZEbzXgIgN4TBGBRbKKkbZtY6YB1xfXiqwIthpBaMhMOMN4lJ/C0="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.2_1616606568021_0.4287158337250976"},"_hasShrinkwrap":false},"1.0.3-alpha-202103251158":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103251158","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f16ce553cf7ee92e6a493ac69c5700590543e6b2","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.3-alpha-202103251158","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-nPCyijR/NJrLvlQJBVUL00IHeWK6aSftvgnUkuJLSnienPnt5EqiA/7I6Y/AEWX2jz95iewVkFC9YOYViLpKEw==","shasum":"663d666005b641d3fcf2c4175eea4b502aa817eb","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103251158.tgz","fileCount":161,"unpackedSize":6936316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXHrsCRA9TVsSAnZWagAAqUAP/09g/kKsWHI2FRQEvEnA\nF3X7RZFJHV4Pmb+854FeSgcOZLZzp7qDhETpysIm9eaFJJ1mJfVD7B7W4JXH\nMcvTceBI0qMqrGDO/3c5tQY+PY5GFqI3jUO+RMNEM5yFAGRaCmHxQFVMAQjx\ncvGvwrv75AYisqcEf+mDkXUCwUgaQktNy6wEakdkvtyLQbwabBq7oB8o1LLo\nNTx9UORbczm3Q13vpTFkC+JgVsMmxonng5fxVHoIyokShmY3vRlSXa/oKemb\n9NvKkDO8GYbuIkRBF9MnuF2mYCUwTuFwvdbbZtHnv0NLQLLxo0ArQqe36GGp\n59QVe0yDVT9HMTreLh974o4h5WRbHoV6yknb07OLNcxOq+0uLErumyxbC/Op\nqELV6FfEVbKRsjeubagxYQwlt9u6aT/jcJsXwew4UOEiK2J6huvThuSoGtX0\nSsroCP5OkkZjpRT4mvX5MCPjrWEuRDXm91q+ssO3h/E/EKjMDuLHetVyAA28\n0xN+/zTU0c3BLv8OE6GzQgvy4Ci/LapewH3BMHuvI6F91f9BLYIvr1p+sk20\nG/3o5t5UsWEKYBW2OiNre1Jf2Hmp7SngSyzJscCKODFNlPfe+JC4lWJa1Iqq\nYOQt5d/EpgP0kZm3u82CZ/RGbAQkjdx/8mWQH/Z/FcB9uNT21pGIMnA/0RhO\nDL6Y\r\n=lC7W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnhlXkPKvllxlkQHazs3yK+Hzq0zdObsQKYUARiQzYMgIgM927HW4JeDAAeg2UqeKbYVMqXwoWkdKpiUfVMYDqI5c="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103251158_1616673515277_0.8703234577942571"},"_hasShrinkwrap":false},"1.0.3-alpha-202103250907":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103250907","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"8ec09f089e2b40466140cf93f6bcf66854cf3f50","_id":"symbol-bootstrap@1.0.3-alpha-202103250907","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-DJpaKSmGYOW79EzFmlpOB128eCKNX+fEK5vBBDizO9ioB07q9IVttAsCNWVuq1ML8nkQ6c2QCWKRlVzQK/EY/A==","shasum":"3cc6a2d9a8b4a05d2a325226f7004f59483aa22e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103250907.tgz","fileCount":161,"unpackedSize":6975662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXHz4CRA9TVsSAnZWagAAj/wP/A5A39a72R0Sg9J03mvA\nLtva9F7mGjGpUzPIPzHPdIrJVMcLsLIsVigLUU+yGgcLjqmXB9vWv6bDCGpt\n/RGSGBAeQK7/lS6pq8l5GGUwkcTn6Ium6PA/+Hv7kBL0/FxiX6fXRM3oDCRW\nGug7IFtybynif/A3od9eNBtp9eOviOAb5upIPqIWKxVHhbrDiB0bX4GMfjZC\nY2/Bmo7xMeezmZtGb4oSF+KZaG2FPIXkI8+fgkGJPD6TWvaPt72mCl4cuEjc\nXDC5ptal76yAps4JfekQ/VM8NdUDvxm//t3r2So97phP2duq8YocVJ8dFUrW\n77O4E5EcqJB6OM4YhENh1IjYbQMS4yKSCD1JCruseZIKnG3T98aaBenfridm\n+ARUmhgcA24Zk7IxLFWgIGgRH+gVXB7wKZ5SwXeiG3sj60QEerBjGyPUcDcF\n/7qBm3PBrA5zmmXkCRUt1pzp1CR+KqBXPeNMm3Lq0DhhO/mhJ4xjEyJC9G11\nVgokpQHpu6g3/ps7zVz2ohAsgUCCzvdzBZzvTVXjLsSvCL1HwOCgFZqnSrB4\ntjH4cHfKDv5H5xR3u5ai0mord6F/89e8bpqCJLr+As3B+DLJM0nxbG+vLdRn\neehxqolOkbqfPnM0MK4qv9k95jjA1hBcp74E5mrbmYTuxa3Pk9AG1bt2RXry\nensw\r\n=w90E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBGjkcapg5czcF9LOHF5Isa9k+Go2maaOl1UmNKhqo8zAiAOFlEE8sqvnIPfmjZS5FxmVUx1ixa539WEp7Y2dErGhg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103250907_1616674039816_0.035371994116883076"},"_hasShrinkwrap":false},"1.0.3-alpha-202103250912":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103250912","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"c151ca3fbb0a549464e265b0afeb1eaa001bec0e","_id":"symbol-bootstrap@1.0.3-alpha-202103250912","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-gHolIU+ZJiXSfuTniH1MkJbW1zw2YjTm5o5Fu48OawUWfFO42vqvl/KuvSw73sGKBs+YsL9+E3W409YAlUajcg==","shasum":"ce37ce5a88716204ab6eb7c75f79dee3477d106c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103250912.tgz","fileCount":161,"unpackedSize":6975298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXH5WCRA9TVsSAnZWagAAnzEP/iebH7p2ZZ04VII1/017\nz8M9OvM4fbzScJOEZCgjrUMJpVhz+wsXmBFbdBbpjpDvIL9lSZionoxcpmiH\nlNfLXKYxu7MPJthHhp9Y4zn6ws0lu7Bi1jmQTYWR2SPolIRiCizf3y6z4QQx\nalWuhhvMYRGFlU2EetB9S9oF7vrtyVh3kbPz/vTA0nsG8HdNEcMfW6rufEcY\nPQnJoxW13CZfigBlKkfkcyfvO2s3DZP8WIwYn2fVttIngCX56nM1+QKIShtA\nbHGaKknaOZbiqd8+hWKv8HBr8PMH9T2MNB3bS/973dWksoMeFDndschbeuzx\nAzAjFiE2gw0VwbnxlajG6seLmpwSer3PUg6Cie/yBvRpBB0wWn57JaOMLemb\n7fXQbB+dwr/0WGunn3GO8IOF47treBzKlX55A7UnkutrrAURKEcEvGkyf9ZX\n2dQmX5/Klx82RfBUnaOLkESlCTXy2uYRJVO6/rN+xqMr8b318XOI5008qod9\nlXStiD8rShEX3oQ0W5F4LQLcG8HLuE/pxbbTKubQsirw8Cu+WSMes98h4C9t\ndIStjmwHtU/ZuurhH/U4YZOadKKY09hkNIWGl6T4EmfNjPD7za341Q6huKaO\n59FUBgu2+48eTwH8p7YK7YcIaWNx7pIP4BwNC9Gqr/YyIdMZn0cWMY1qurc2\n0t8A\r\n=aoca\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKRHPXMbeHcBT7FG9Je/8xiBuGL7kInU5R24kcmx/cRwIgY8aTyLqLScQQDusFoTN00p0G2TYhWxDznyWPZArPsVM="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103250912_1616674390192_0.7831325664545874"},"_hasShrinkwrap":false},"1.0.3-alpha-202103250914":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103250914","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"c151ca3fbb0a549464e265b0afeb1eaa001bec0e","_id":"symbol-bootstrap@1.0.3-alpha-202103250914","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-PM96Arb2ND/JcMIjUy+/R09HxCq8GIAXcxX0kqTH1QKIfNJ+AJa9lTAX/1FZAWyN4kT95EatAlaaZ4aBSWyZZQ==","shasum":"f1b683b82f5a9882c38954fbcdf39a71c4bbffbb","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103250914.tgz","fileCount":161,"unpackedSize":6975298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXH6lCRA9TVsSAnZWagAAWeYQAJQAFqNwAKAKMBGNXHmM\nGFTgOpezglj8vnLSmrnC2N+kMV6jDFFHePg0ZleFwIOPrIpW7UJeHYlzC++p\nf5h0CTjCGp3Hr36xQj6iapIB+jYfJg3/9qsCaPYopAreAP5HKZmS//sSS1ZG\nKYnjZJrxDeTel7BsFisTUB2ZD8zznCVH0s+tlfzOvqksMZ7UJ8fptoPyWfph\nuVcmMZE7KyeYahcNBwHifJQSBqtp7pwguGSuzF5JIjVJb+GXe+hr8TpaTy05\np1wloz1GiGmUDTtQY/pmMB+/6fjRLobD4CaDHP4MlE9EJnafCEz8I0ZhJI/N\nwxYbS8pG6lb3Wk/4TvTvEaV6dzhfZBHBDYQ/3K3QE3S78QLAKkHGbXkXpuML\nLMy772ali0L3GmdLJypFREx/ydV5O8axAF/Bib5nuIPbUkaGwm+KF3t9XrYn\n/sKvOoIEKQL2st1B8CwJKISdzANbRBqJ/+wUJOUz86T3yE45h7tnt1uVu/9l\nUpIAWVyLruEJOa6R3m6Q+XzY0ut4F+1GlCX7gHiHZFzHzpcnvWUYEpTMqfRj\nTqd/11oums8WfUbB/0XWxNMRgNpi7e8JsK+BJMhEg+x30XXN/yabm/ZKtDMS\ndhxrY/NXZsAztVA3wdRdDi+w7nqFsCi8WIY/25Lxj2GMefslKRg5UBxZM6et\nM++o\r\n=mc0s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM9M68T+ZYK98+flMoRMZ+oWkrwa3Rnyjix0tkvS0txwIgXPV9I12m1VMvIVq5isoNBcxgJFIppzhq0avBFsEdcN4="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103250914_1616674468850_0.3886064840603416"},"_hasShrinkwrap":false},"1.0.3-alpha-202103251555":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103251555","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"5011f28b089f40db9791fae32e9ba60c0ac2d62d","_id":"symbol-bootstrap@1.0.3-alpha-202103251555","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-vcEjf18wj2MNWFZPI4lfueO5EaIy8Ben07aX9qIeOzXHIUILL6P0tThLMBbk9d8F/aayFWE5haqwnO17tENzxg==","shasum":"895c04c8706e73261630330d80a3e7336af093cf","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103251555.tgz","fileCount":162,"unpackedSize":6975827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXNzDCRA9TVsSAnZWagAAQGYP/28ZmTBgeKA0WKZO8rKF\n1132bjC7u/vJrEifilyyVqji2VPghmMa5GxdPoMxh7zr21LIaRIZvBufZoVv\nhb7GcCpn3gKfKTYktAlfzHNibzV2dCt6AyfWipVETNIgZLyR7suCfj+XFZSa\ni4tnjDxV/TCS5IoNlb+K5kWNYM7c5s+uhyaD4CGbnx7eKD0H2zrTEj95IoGI\ne71mEI+X7Zr40OmwDVn8CZvSls91+uCwH1sBEsDS6zF/oyC7HOazjj3UdrEd\nXHm9YpvLJcnY5u6sAJkc3w9wlCr46RxjUktuWJ4Rn1j+w7NGbE+qwocDD7g4\n9j12MbXr+RIs6HPNCkAPXkfjE8nOfmaK7m9omfKRTlH2ZLO4taBsZUmv5fsi\ne3tHjwCfV1ocSkYTyObxNzTkcEoCGXav6UU89SPL0Yzglcl8daHpUeo1ckxO\nVgw+cHr92Rb7ctZgr0SdQDfuLFJfzJH4OECOaUSFPpSayZIu3swSzlj8vlSU\nuSI9jE82DHG/sTXh1sCahSyziQMmwLnMtMKUeQ4oI8oOXALTmmgT88GKRbLc\nvwKuO+ErPQ/rTb4zWR9GlTGvkQIKndgudhwBQxXSfucwoxGzGNvBDsW6KvLA\nFyp8T53h8CI44puGEfxSUR+DCbczcXtNK6/d5Opy9xRY6uaKujNt0f/nCyyA\nSrPa\r\n=JwB3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEhdxdEQaYZ25LMfM6eVVbKcbJ5yOYupjVsG8paMuzUFAiEAn5DNlkZsiOFWA64oWQUUWuvros84yAgAlbglvLUklXU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103251555_1616698562800_0.9309795068316731"},"_hasShrinkwrap":false},"1.0.3-alpha-202103301247":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103301247","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3b524d2d00f01494e0a76a1ffdf725fdbf0c3f1a","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.3-alpha-202103301247","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-imQNEResngnxDPwPHEJiSWFp0+G3MNqkJs4RF7PWYLKgn6a7YFR7T+NlL5Xde/Er0yH0YqCGUg7I2nUWy3IGig==","shasum":"942ca3db6faa520b5dd79f8ae1fbf807d808c2d4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103301247.tgz","fileCount":161,"unpackedSize":6943309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYx4ECRA9TVsSAnZWagAAlJQP/iAfFxkWgwvP+4TSe+rI\nZSXDomuXX6YYUKnnbsybCDLFIIGLzi12ISGZaOJM2nGnLwUXxSZBM/7ShLHP\nUvi8oINjP7/TbLPkyAEazu4wKh/KkykfGAMgpUW4LIL6ZfXUSi5HCMOHAqgT\na+BhfPimWRW2ZxE64iAdUUKp0SArLTL7Dox7FCYYLbZNamPoWqnFyyoviEQi\nFFK0fpDYPwNo8/W5132UOhH15jkNWqbZo2zFWhr2OZLXcxM5lgacpTskV4Vu\nsjcgg9Z1ZKFRpMOUM463t+j6HvRk7NyJd9dg5v0aVzag7McsoyBoIJ1L8Kik\nLHZJ0g0W5wELET3/Bwk9AkCzNgY4dl6g4OM3rZtI+WslcHv6RNi2YHGFJMe9\nKIijCN86/HhgyQS30AUJ/4jvgOn9/48U9STzFPODhatXXTcLEbyJxYSrFhe6\ny48DA/F8SLgzsMur7mnmPG1brDccR2hz3ftMwGdWDoaowL4UuCN2Vq6Mohn4\nhIsLe5lCXk9CzCxr0feKZYxpd5M4FYJULsOBGEl4FztzxWQ1eNDBupqQtJdp\nuTo/b5CpefcQWJnzyoUEoctiRfa5S3UpoKysIqIxAn0ubqfPZWU1R8m2CyEs\n08lFXk+gcK5gjY9enpM0aQBOlk4miIiFWEnuzQ03Do6rMAxsHzoliff7siAi\nJ53u\r\n=Jehe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEZGOLH+1OvAgMu0GnSQQQkNF5pbFYnkREjPSzaFfn7AIhAOSVko7wh/e6tSC4Y827hhgda7L3iMuxSxxEhRJUpDZU"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103301247_1617108483892_0.08353454212466271"},"_hasShrinkwrap":false},"1.0.3-alpha-202103302021":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103302021","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"5e362f7581bc53fc39b4bffb5846cb6b43a77d2b","_id":"symbol-bootstrap@1.0.3-alpha-202103302021","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-OOH0ClOBCzdIcQAZtVscGu4wQu+55xHHFojXDpxuEWJfYVD2aq/cmB9pvXKZuj8QnVA3bnHps8ZmlKI0TpM/ew==","shasum":"411ddaecaf3cc316eeac84e8b5c3c65fdd3e81d8","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103302021.tgz","fileCount":162,"unpackedSize":6982820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY7KmCRA9TVsSAnZWagAA8roP/RxzpXtDYmqhon8vNM+r\nPxhPoqmwHmo9ECuUnmQka7NBrnv3JqDVMZzFZ3C9K5ffRHsflLp1D/Qy5Qul\nPh0P3XutlRVaS3VB9HlifFUP6KJWwblTMh43Hngx2r9Rri7xfDvL0cC6Mkh/\nbITb5mjCK8f7d0ASRv3z0Q5RIb+s6i+gvM87x+BM1/uTJibLv+YqE/dHsOOU\nKiMDkmPwZf2Wo7b9DxBeYEnftQZV0TRCiuWaQU4RKeoOaPsD2ZdX5K92FVW3\nlzyxtAIAVqwrhsc6JUSakr4QIDNsr209RFkYZUfDTlW9Q/QT1JEtRRLUmZ+K\nqrjU4zrs4ITjV4FdwyTslaGLL1c17jhzQVTTYWuE/5BUGR9FmxzwfGpfzsCK\nOi8QT7HXHuHN80iWVRbuExVzwxiRu0QJglGyrGdH0riLeMfDveAciOc253Kw\nkFfkTGBp9fpTwNSrvIbi7TEg7QQD66PtNToNuav72+tEIU13Z5D3Ff6fRYA1\nyONhL7lGgCc/7shVoKkLMVW4IswWgJygSlxahAmVqgSNtj1Y6UVybchylVKa\npMeU6D+7Gc4h4blw8LIIbYeSF9Pb0Q8XngatuYgUgZW4+FrsZhGLTLlbioP0\nJjz2SPAMMy0PhxvDBOLXxULCQSE7OhV4UCl7fGGC1lFIqgSd0G57cNANLqFg\nruL6\r\n=Ukz3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgDo0hoOITAxoUwml5psr7yERbQLalJ2pD23UkeheOcAiBP5vqEXrEddWmcjmFo5ZoDEOWTQg7vgtkx9CqJBdgtUg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103302021_1617146533894_0.9312696906136415"},"_hasShrinkwrap":false},"1.0.3-alpha-202103302026":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103302026","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"5e362f7581bc53fc39b4bffb5846cb6b43a77d2b","_id":"symbol-bootstrap@1.0.3-alpha-202103302026","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-iprdXvUKl+P2RxB4F/xv5PkZsJocgN8u7Fw4K9129Rc5Z3Fazg9EaoPZ+He3l9Dyw0ywrZkHlFlj7NFd+LVV1w==","shasum":"32d64e532fdc005ab98faf1059c18c0131b360e0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103302026.tgz","fileCount":162,"unpackedSize":6982937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY7OsCRA9TVsSAnZWagAAfpsP/03pjvOJHMHL+OkzFTrV\nr29W1/fTqwtp7/NUSHOwhHVH0u/562+d+wi+iSj7Kn+QiQp1/c/29DWnJN+R\nXIt+64qt6LTa0LC+LQ2xq1vE8yvgJrVg/YwK9NJ2ysYMUs0Fsc4n+Lv2oIGL\n4hOYN7GvOySgprCE6m8mI/LQVr/pxDU/ns8wdbKfLcQ30LCBv2V6ltjnDtUp\n4jf13cuwMwTeiQJ31D9ij53qq3gyKyJpe4ZCTuI4NxFdpyrXkfCVZX4jxdIP\nJbl8T1WgYwX0i+vOsrXr+SoS+zLn2yiMPXdhhLJ8KEtqmweJCO4qTdqcJyZT\ndkXk19mVAnYK7XrQfVeRecivrwRWfQuBc94W/nz4nUk8X8xX2MYNZKvSxhsk\nQReXvg7BBw1p4eF9OvSWSJSgz3Mq3f6YgSeYZtWnMNWIQDt5tzT4F6supLuG\n+JhmYfAyn6rpSM1W0b+W+Jhig4+cRl/jIJ1tONBT2WUVnZlvVC1BOe4LpGco\nUHVNKeWGGtyEcc2be9epRnXsZyhDI0NZHQCYdXLNj3NkW/eDDBnE0/B55fTF\nzd2VMl+zR1HFKX4SOJS45vNmSxCR+ydBLFOt/KCNM8sbmp2nCrK6X4Y6AcZH\nGU432cmIIS0vyp9SYlb7hRW0w5xVw8Sy+zV6ATIfryQunfvZz1zGCmI33mUr\nqYtx\r\n=KhFN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICjKx3sYByGesCBUyVrMq2ZKi28dgE+jY0EQXDKYvkOzAiAjlDuNsVqgSB6zbgMBgdVGdJ37uwpC/OO4BkmggJvv2g=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103302026_1617146795364_0.3432972691762144"},"_hasShrinkwrap":false},"1.0.3-alpha-202103302308":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103302308","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v12.18.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"5e362f7581bc53fc39b4bffb5846cb6b43a77d2b","_id":"symbol-bootstrap@1.0.3-alpha-202103302308","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-6cw55NSjxELIBJHVQUslmfHRqqan5lfAUicsj3TF8KQj1OmMPp2Tf8kcNYte32KOQtGyZsf/jvTXS4nELXjSpA==","shasum":"e9640b4316e61cf0290a930ec41f5d91a7af1842","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103302308.tgz","fileCount":162,"unpackedSize":6982959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY9mdCRA9TVsSAnZWagAAF3cP/2Zyfmr2N01DplGemEoe\nnxRjk+ekbrlUd0wcMwBDvvhl3iQD0REK/L2ohrRCoh74l/RW+5hiTG6vecCE\n8Db4mkMBWYS9fLW3SLLF4uK12Jg6hs2v/Cyd5yhDIfedpzzWjvL6w3Pqq8MY\nLE2Tu+TzHHBnngRblDqHgVD0bEHcUprUE9Od1DrnnNb0pzmoJvEBWJabzCzq\nPo8MZTNSLSw/E9cPSa6ANdwog5qJ5fc5Xc8eRR6UtqlzCgRn2bOOFt3+oM0h\nCR+aeEaY4/GutiGH84pyn6QOK2BUGgjXHSR8jSgUAPXsbTP9nxQECinWaFx+\neHfVoygyVRx/XapfZa0su1tZQdj4qCU4IAYxvioP/lbRCoF6EdwgVIEfJ8Lo\nsLM3aE+YHdszQa5Qz1o37pvlAKCGuNsFBuPERPibddAemxQrZuF5y+LqLxOm\nZniGY+RcABJP6oprwd/dqtFOfjK6ttGUXZ8nzVTIDhfmRtZq/ZgPOQwcSI4F\nYWslNXlixyDfa1c5EYX+nDyH1moSbLdHTVvej0PWb2H4SRL7rSalgjplsmnX\nXxrKqOCsujNhLGb5d0qFB1P6WzAxVRrJTzSP13liICdJTNNAgRXmEJj6TwjK\nhDANjENgNx6sNk+oGw0EA10e2UJUthIBZpDC8RR13NndOAXWXOhWcmLXA3pB\npJ9G\r\n=Z/V8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7TYtCceCvagnQS12SXaZjXo8RJ5dZd0Y9OVnamVvgzwIhANTdz0UDg2fmg+rrKi2/41CdsmZdLxLTZq0syNa+ze6X"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103302308_1617156508367_0.5217191639535217"},"_hasShrinkwrap":false},"1.0.3-alpha-202103311610":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3-alpha-202103311610","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"22fb79e28189e4c4670e4e38cd2df2133c6c2efe","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.3 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.3-alpha-202103311610","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-BSOmXqTQKaioZV0X7IfwUT6CaX4viU8Vlrw8VmVZOa88w7pwAanBV/0KKXjzlcNae2TikOiJDsgPmmkq0zEECA==","shasum":"818ea8cec8da85b3f500f530ad6df3851c398502","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3-alpha-202103311610.tgz","fileCount":161,"unpackedSize":6944650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZJ7uCRA9TVsSAnZWagAArRUQAI1ga5MpNG9Kgt0Vw00i\nzTT6nCPd0qtpVsxt27HpGQX98Sg8Ajx0ZhE/hRzyExhqIDw+/kW2peUmdbk1\n0E6th+7dAFko8M/iQJbOM9p3V0R0IW2K5XMs0+VcmifdYrFH69JbVSZmzHGo\npdfYiXkkxrmK1sw0lQJbF2gSOBpaQjuYhrHQLfvudC0q5MUcofIcxo4tfime\nKmvGkRm7xP/3sl5wCREkraMYvFmhHXrZVXdbA4eDx5r2HP19qClX8oxK5bsb\nQciaOIb8E26ByL+ioEtGlT8wR8xga8Xx2l2s+FOTlGHkJh2JxNOKhNjLCtLJ\nlNgKizyPHOzMHsBeev2dluLTAiVO/SwscqSxLBLR9jTwhXmFz3r6bb5k/A/N\ny/kn+CRtQTCT/jVsJ4vRiRatH2kI5QEAjrOW5YP7N5lI6awrltDgRk1u/L15\nONdZauvjTN5Pt+sEMGtBnHnQAUFlI/YurSSe14Zd59+hT9VgWdf6ezFlzBsF\n2hNqjqxkBzN6iUe9Ol8sZyragAt5twphGfyXNF1uLURrGpktyhpni0hk5QFl\n1d+EbPBQmrogrLEUIUJSrBLXoShzM6aAvsqOLLi7AffqUcodpjui26F9Pacl\n400Kh4TpVZxwtsUXXWJ/eu6LxLTcdTpcF2ZHUgMW42NRz0aQV9iREddnygJ+\n2sw+\r\n=b4py\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxZnKv2LUYRhXiFB0WTirZV3M6AiVVCdH7T5bfIonRHAiAPYWweWRsBvVRTRvj4TU7KbyWmLLbps14RXbMdO4WNDw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3-alpha-202103311610_1617207021761_0.7363506751481843"},"_hasShrinkwrap":false},"1.0.3":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.3","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8035071abfb55d8b2915fadb887251fa2d30536b","_id":"symbol-bootstrap@1.0.3","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-jND/Ws84P/p2f5BmOFfEVdmILSKt9Uez9k7AkLP8qkygL6+DoBRilrSWAfSUXc+eeAZxy1i4M1j9iJ5IZ7ug+g==","shasum":"d1044cf7b75bbb7e006877c846cb84c3ae621363","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.3.tgz","fileCount":161,"unpackedSize":6944593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZKJmCRA9TVsSAnZWagAAXsMP/iYoD6Rc/c5kpN3rWqhs\nlF0xXRIYAm8bSALTMfo+oXCjArK41tw4Jm29OB9wFjaz4fkvrLO8J8vJbSNh\nvSJLRIU6h/I0oD8w9eUpveVSv6k9lAHwaNlkwCij00nVcRH3wSNbE/zujPpM\nVpnWX2TcTAT6Vdioi2Zdacj5gKxSfYpKST/S7lWW++zxjp/PAS2fdSXCUKai\npHD0vUGYChG4EmlI1RR4Nz4Q3/wYpG3ldxcXawgm6T/2V8Sd1bYzrKyr4zWB\nY4t0MPKfhMqkGK8yCdyx23LwjXdtFVNERGLeswNyPUZYEOvW+VeFVTvkPeDb\nB8un4k2edhh/ZHdyEkOiFZWFx0x9cjg2/YlHv9QoKe/aDIFlXHRGLOHd7JYN\nd3BxZVnbeqMdrsGYEa+XnCLOW9f7Qu5a41L3ib1Xib56P5KnQW4sKzTRhRrG\nEuGphgI0Oo8SmB+qU2UUiWsPKRKIr2g8vE4/ZIcTnqUxbGWmvVfa2M/qFCn4\noU9tWiYasYnyeH/ZruGAhRnK3nifEOfYXlnj1SlIyJUzX+/Y0Hqh2LepQb3F\nN+RxhJ5w9kk1rCD4OIbB/gU9QvlqmpmS5R9/JPjh3f4Ynp43GCBDApMOQF/k\nhH3JPeXi37yr+1qykN34y++X2wzgUNf1OKukKXXeEawWYruPb7yPnEOGFoiY\nR3Y7\r\n=DqiR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKNf7w+1M9YPdOjBwq2JsKH7Jidm2ko865He3nhiSOpAIgMRcTpuPjsxrd8ZuHarGr6ckSwgznlEdbzPFHW70H+PA="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.3_1617207910136_0.5417867879453608"},"_hasShrinkwrap":false},"1.0.4-alpha-202103311647":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202103311647","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8b1ca7d63ec877e3949df3948228b0fe3f0245dd","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202103311647","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-5iEWAiAs/SK31g4qtDIMhBjcScGEUM9lnuoLMBYbVv6WE6yX79E3jrSPWYLWNYyjQjidSUkjFjiodNeTf11eDA==","shasum":"935c3e91155b4994eaf1bc8010cfe3380f42b89a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202103311647.tgz","fileCount":161,"unpackedSize":6944650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZKeiCRA9TVsSAnZWagAAPn8P/An0C2R2HeYcMMMy5t3S\nBnyqv5TnJGFvGz8k2gnrmLiOtQqR7jVmlVpV8J/VclucSO0mQ1YlQtmlXn+o\ni/WpL5v6wJRYLYTXLaEIdv7jv7wPMBPXOo25UGlBpXn+ybB3TB10EldxD5nc\ntTfZLfoaNRUa/fLfmXOvS+1YwcU6Nx7xr8vzc4zbEGgKNyRuHLhM7LIqsBKe\n2wE8QpZFu+9OFDqYlSx6lvqPyAUby64dUSKb/S3Woak2edCx/13jS/46iMjL\nBbGB46I9UytQhpX2CaOcqnDijXMd+lFcfd+vXiWNweIdusL28eHY0Aav/LkC\nu9uATJLQ+y54W/kD+J/ww46X6LggQJ+KwMYR0LG6DQSEc5xs6ROCmHSloi/o\nKcQOrjOqw/08GelZ1mqZRRmY7SqZL0TwJXm56LUEuS/YD8SxhtujQOGG/lG1\nq55e9B6saiV5qQH7k6/MCMelwpSZnDl8m3F6Zgwo9xnopDdafP2S2Bn+dhxo\nyOXoRE76dfj6JfYCXOLtpBwkwqtwnheJEg6ROj0qTKr3+3OiMPIfHsf1pAUF\n9RAyqlD7+CBB632oSC39YYvgdYut6Vm8/k/z29xmDp42P4guvEL7zhzXUuEB\nOnAO2tG4fYeqgok0/xNBJ3qqzXKY/yYy/0LCRaHAGJ6kjb7hITQ6RYSfr73h\nLxoM\r\n=GEaE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICQI5URcumYvTPZS30jSTf+HuL3xige4o/ac/radmy4TAiACBrRqt4Zd3Zwc6Uu01teZzY6RBqTF+Dom1V73oSTHDg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202103311647_1617209250352_0.5774125909221093"},"_hasShrinkwrap":false},"1.0.4-alpha-202103311656":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202103311656","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.6","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^5.2.7","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^14.1.1","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.18.0","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha  --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"72bed988d9aee4b1e2ea8bb28e86503a5d98345e","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202103311656","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-GS3UtsQnymFX6IGu9zqCm7OAeky/0O7zLQ3q5KL+zar6avRcJeNyL7AExLQTezslZTaIr0m5XMUzLHpV/TftDw==","shasum":"e33962934e31ec2006a4125f628fc69ee005bcd6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202103311656.tgz","fileCount":161,"unpackedSize":6945004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZKm2CRA9TVsSAnZWagAA++IP/2Mgug6iHHyPKRCe/fHn\n0zATh67ib5lWOrgXmr9RY6UNvH5mJQgnPoLoYqPUU/GDx45iZWP+o9nyD7vX\n6qMm0NWYz0J+HQ3HrsF8qdINnzDJykpUEdIp36X9f5VJQERSnM4RjAhlhZ7v\nkMR50n88O4ToMi0fINPvxjfxMj03TKtFs2hJ4ppuwPuT0EtA4JcC5GpDqfRX\nrgluhnwM/2dkKUmpKGoOxKF6DFnEO5CIu4MMtdEdhTZGv/HHrPUPGlUKzomC\nNjN+FWWjz+llSzC1KsnnwV1k/zvi8XMJlWgLtEpRx/Ls8SRG98tFSk+t3b3/\n+HmlkntQNScaBEmelgUmM714I+93Z1vTLjVj4zWTO9ATvITpzNJy9HBU1v/N\nvwhKKP1MH+S+2pyWGIN43/262G7W1fG5pmx2X/l0p4Hw2idmnh5z3rnFlfTe\nnYD/zE4gMMni525whG/EsW18fnzME37DqRW9ZHInsBu4mtxqL6xDZSfhHJso\nWKUMhQE1kK47Yuc3POGC8JawWt03y3nhjTUxlRPi2S/Gfe8Vwpdrh3jv/VPW\nRzKlh7Ru56g3GECTeAXubCPOi5JaDFafwQp94iLBhvb+Fq7Phsdwg5rGISio\nSchJDoqjbKeGNm1097jN5gpu3LpnEhpNuj1FLOrxKEL6lpLk88yvm8TNbNyI\nT1md\r\n=2xBp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD00eXXHT/x5UgWFZ0isZ+W0vrCZQLa1aq4h+savgsWjwIhAP5z4p8I/zDNYQIeTGue7CJPYpB/hQ/0UPa+nw7IoHd2"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202103311656_1617209782118_0.5076634370130328"},"_hasShrinkwrap":false},"1.0.4-alpha-202104011050":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202104011050","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"34ff6a0a1ca08823b9f54baceee873f833a55fb5","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202104011050","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-6q7ZlvpvZJwvpe3OFyRqjsEL5wLGShSu7ykUlzvR4JO8HCuFt5OTq71eGp12Lv9meaK2vDlM6kAsHtknFJNRwg==","shasum":"30f7d7d15e67582d05fcc2ff53d55052d2c8fb21","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202104011050.tgz","fileCount":161,"unpackedSize":6945512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZaV8CRA9TVsSAnZWagAAEcQP/2BSSQ848mhOXNujtfZz\nxzshplOLpUj7MPKq8lK7fNzka4aw9/NxPrbef4ZuTcmv5VySe/UXsBOqSdVg\nKZ/yuyGw11r0X7czCZvKN/+D1Yh1sNN5fMV6mSVN02hQp5JrndIOqDFfEp/o\nHdnAcjps/O4a6x8lRAObzVip5O1U5xB42phm1w0iYwnrri9PzGgUjXD7lzTn\n3C6NrOMRlqzXtu95cvUs1836FiUbRdaqR8aMdBR5OaMfwr/SOVETjyMSb3nl\nVVT43iIKqnp9qtjRjQ9hpog232YdLQLynbJqvKFJ99E/FSNy5RvrQxNfAG8+\ncurZpMJizDBiM65O14GgX7Wg9ZL4Hsn4aXg6PoKYxO8I5ys+5rVctTYKflRL\nXcmkdHeAfPtUwkxoU5PK4UgBTXtRvKQXpPP9sHyO5+ZoQCMlge98U+i3ZGfn\nXdBwZC9n7oYb44UgZM1v1A6GrXlajteUWBEC7aQ0A2zLT8fhCARCTwJg2Fe+\nB77Ha8S7La1km/Q4dEWsaNoD2Q0BiJJDFJYSVo6UkEYLdDFq618GbxIxXrRC\nsgqE7w4Kzz5aokWyOpJpufbJTqxjpzY9uNDvn/9RD502eEFhGyOHEwd4gHq6\nfCc5M+ZlSQZCZeAO/VCFR716X+9na/pAoloAka+KDRTQkKi4v3YO49bOINmr\neOnI\r\n=qSpO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbM5mMTyAmqdFbZHmMHSeYEAamF+hGUXLnVviC/MA41gIhAKI20pvzNlCYX0AkWFyH37hmvXAs3HrM8c+GoD3MKeu4"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202104011050_1617274235692_0.8633232438468574"},"_hasShrinkwrap":false},"1.0.4-alpha-202104011142":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202104011142","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","tar-to-zip":"^3.0.0","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","publish":"aws s3 cp --recursive ./dist/symbol-bootstrap-v$npm_package_version/ s3://symbol-bootstrap/dist/v$npm_package_version --acl public-read","tarToZip":"tar2zip ./dist/symbol-bootstrap-v$npm_package_version/*win32*.tar.gz","dist":"oclif-dev pack && npm run tarToZip","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a33b9802214a9beacc39adbb110e733a6a5b587f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202104011142","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-MnFfjUIyowLTDtISBD6W7qDZnID/bFnPTvecxo2Y8iKu9Y4Uzlf9J9TjNCyJtWglBeLuHsmZhTVvRcAw08FkRw==","shasum":"a36c9c4ff2534500fc241c3e73a49a439ab51277","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202104011142.tgz","fileCount":161,"unpackedSize":6945848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZbGyCRA9TVsSAnZWagAApP4QAI+8uIA34lhK+EbPprVs\n5hOAp7J7M413RLCyCjlTs0hTTQgoIzMneT09dHHnXzB0QGtFwsM6+rQIHaF9\n9mCzrpAJJqmDls7mO9h70QIlqHhGUUsLiWHqjpROKDDyxMq2IE5eoaFEalMu\nqi/W3OazJUaX2vuNRFD2KDhODoLCS6GN3CSaGRkStVEiuwK4KP4mT/oa26Zy\nU6LI9ZNY+Lo+F1y2J7IU3voGFB4Y72yI1Os/2ki+LmoykzJ9EqUAKxuwbcAI\nbbgqeAbrpN7ZNog9beOuOkRiYoiPuZFWsc38VVxOjIzEvdg5FTdZ49gaCONX\n6IYMelm0LkRBESeihUkcd9sOXxJQmbBKCmOL/lU3QmVEQ0lnJysCUMgVqtfy\nuf5a9a587E1x2A3GFvHg0wSLaWaXTdR/jApwiafDktb5ILzYQYMnqoiQzES/\niB6rx5QByW2VLM+oCC6vrb1wJsvZ77AUv1asXX9YIA5S7GXUdb4uMHPKarWI\n+dGP3EZBmsif92oy0NXO9Z/NQ5uRj2i1ULUG2I6l3J0c2BJfBJISDOTUNhqs\n65a5+qYG1QvTXB/d23CJ6g4vrr21BB5R4cg98eAc9rxIsCvx5zAzqBbfxOfd\nCpP513wL6CCH8ZidZv4ezEewrs6+Y4fZAzsxabogvdcEoC/nAXTdkziH+PAJ\nmD7B\r\n=WlAl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCI4K4OCfuWut+jPOzYFOuEB4YslQWkodQvQYpKBHM4/QIhAJXMcRkFQlEHMfCUfsboacsT6OzWHhYDi+aAzwE6hzfl"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202104011142_1617277361547_0.8227591631103124"},"_hasShrinkwrap":false},"1.0.4-alpha-202104012235":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202104012235","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a72c014b15e389bc7746114de43c5ac17add3ac6","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202104012235","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-gOaLTHlaUOOfGs4KDQpmFQIP3xO8xbIOIAYVSuRnreVjeJMVSA6jOfXbk1Dv4po2N2oD1tAFqWZQifa1qMe6bA==","shasum":"30225e37d38ec03091620c33726ca1bf5372add2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202104012235.tgz","fileCount":161,"unpackedSize":6947420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZkq2CRA9TVsSAnZWagAABsoP/0HpAFqWbg/E+RLuaIfi\ncmUnaetZIZ3qCNBv87g+LT9EFHtWxGut0OoY5b6W1yS2b4B4ju8hrQpVR334\n7YyM/Vsbi2WtFj6QJ31uoQYPW6ZEdtObcdZwpobwrJ2UMmSuZU/RX2STeeSt\nrIvMtNU+VL85jpU7b5NrGQ3wa7VYNm8xzdnC7Pvl+/URDbCyoagRuCcwIiWx\nuO5338O4l66Tva52Ng77pYRkVaMQWfKrRULiTJNFH7gjkk1hO6bKAiLQIW8C\n9HLQoR3u6UjEkNjsFRA8GF31MIkp4mF/UYJPJsn4L/U49Wy4UkpJMiLbO8c8\nLhJgZNRJuwKgCQyuuMLNh2RsgUCYQEwKVzuD7BY+sYvX3sCFr82XnU2dFY/e\n7T5FKqBaE9gPNVZh/xbBUUFEWUguh7qH4GI8rp1eoB9oFneQNbKl/EmJy4ry\nbWL/B4J99DNVK7+Eobph1DpyNYQSMQDihsWYxSFe1JCUwoMjm0tSVFqkJcnx\nm5SPslnZAqBITbEFoP7lar0T//aVAdC5iMBnwSEZUdMu1y0LsEsvZbFvs/lU\nO6tJNpQ/9/GbuolCNYlybeB9Q1pgM9Kxrcemjl6tzJtYUAm4spInEfkt2HLk\nRLpyJIW97itBxq8QBvx13NTO1QAEq7hqdJnXXXKyFQM4uG5t/czMu8TWXbYz\nSmiT\r\n=PPUf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg3OCrp9+k1F40lwnQiBGLttWMSsKuVc5/DEV1JrUV0wIgWTBMmOzvHWTB6j3hyyALAgTrKD6/TWwNvOiOLfcUh8E="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202104012235_1617316533362_0.5641454736182479"},"_hasShrinkwrap":false},"1.0.4-alpha-202104051224":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202104051224","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2e003792e0c7ed301c12b2065ec4f588d5ac17a0","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts. \n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 10+\n-   Docker\n-   Docker Compose\n\nValidate your environment by running:\n\n```\nnode -v\ndocker -v\ndocker-compose -v\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v10.24.0\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap'; \nimport {expect} from '@oclif/test'; \n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202104051224","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-1emfX8pz3sGOh8GykhvR7QX6IhOkm1W4RJ2LDHcazKghzeBZiy3HDsbuyWCyjnYhlLl6shXsNfCezwkDN/JYkg==","shasum":"87497f7d0c715acfd90f26321257a7892eb9e828","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202104051224.tgz","fileCount":162,"unpackedSize":6987482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgawF2CRA9TVsSAnZWagAAbt0P/2RLn3wISglNEuo7SSKj\n54fsf1tylVnk1+LRMaheWmYCSPYrnq6hhoC6DJ/AnuDsnxzYYMTGLYRzD1P5\n/8XTs+l+b2wT4kWTd61QtL3kDOZEyLpGt7hVR2c+feA6dPvT0jPhyg+Ojgdx\nCDLrsNM4E2f1Xequqkl+11H7AWdZPnepypo0Qk+aTCEDsSUoX1Y6bNsV1w/7\nElCi364qGQU0MN1aATwycCbOXvDfWTyrgf9+Yfpu5EOUbhCEGCbRBagUJgZ0\n/iN4zFx1SmX+ry+5KCDjVUR8WZZDNsb44YOlXU36KsZG8SOQMucgEEwZhGPV\n5dQkDaYvd09rS1im9dc731KrJ2c6n0L30/w4GudnWGMetEHlF7jGdjKP4h3h\n3iShFn3iU+RnUgDM2BymZPCkqoGjQ2Ap2qWR8RI22h1PklGn565yiV2vvw4D\nBO9Uw5Zj4bv/KOUnVIXFqrJa/clmlC6wZJGIeubYY1soHyzFUq39Nh5BWtkv\nRYNcEsWr9eGGkGaan1DoHbO/RFr+3JtT5mvf8YNFAVjf9fxCOBexZ5Jud/QT\nLeJKZ/LlwEDZriz3oZ7VLq1ypGugofVJJq7eMWC8+BqB36/owlkRJSd0WEvu\nuQ/cwuCUh4UEL8VpFcQ0Mm2C0c2bIl+qDBDpxzmj7ncVBjhuPTNkHJXGIQAE\n7Rhq\r\n=5D8F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBtyHOxucUJ5ZqssqVevFvN1JXyJsPqqL7IGDiUVGucOAiBx7gbc1CIW4s9mF1tMD/KvjA+3hqeQssvY77CHpJ7OMQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202104051224_1617625462108_0.6571058835467942"},"_hasShrinkwrap":false},"1.0.4-alpha-202104091216":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202104091216","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"012ff0f4473b01871d46ba05b81a58166abbc128","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202104091216","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-OFpd/rs4gMjUrRnGqSP/yxg60AJ7hsDSm2lhqWN/Cu7i1vPrwbOU//DmccFW9lSKTKFHcvtfGuxeleoMWRgzZw==","shasum":"0f965333ca06b4869ea878f9b821cdcebaec2443","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202104091216.tgz","fileCount":166,"unpackedSize":6997455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcEWyCRA9TVsSAnZWagAAxVUP/3O6xyamvUzj3Ewao1hY\n3/2ecRtbp3hrqaD8Nxo3SutaUQQCwS/eR+SrYm0EO8+jif0h3XFL38PFP5Wu\n41em4Ed28v3NYWrO6Kpr6PiDtJJgOthpldkYyPtZ6IVGiqFOjoH3I91QKw3w\n05gBUkjHdHAYlPAOOzZcqKcwsvWJ+if/i/7Zn94UhVa8gBHOD0Vhjo2hJANE\nXybTYlsBYxpBEhQGiptgP5aBOwo9+uKbJnJ1YauN7GoJys7mz9hKhiQGdmbN\n/QE9oarGsaJ8/vaMV+4SrSMZNTeXBatiq2SFuUZZu02An4Iq4sR8h6Ypxrt+\nwpJH78Q4ys9rM3reWRrgXAwViyjqRyJE8mUIC3Icj5AOtaqPYXKR3g+eWKBa\ncYI2I9zGNNHdQSP9S4wuEP4Dc13ixJLtHXg0C1WUQwT6U9DVLjYN4bpJcap0\nX2IGCGCLTIzfTCJ101LEyPdZe2DFpryS1hK+txS1uwk1P1yw0e4yoH5l/v+C\n+GMOlx2cfOb6KIDLvVAP+37Ymn5Es/jxMMADx1YRFR5Bh7XAZAPEgQsfrYiT\nBSc3yrhbnUFIyIp+gCsWNu3dYHmWJ2sYb/21plY2pc8WcyfUrZzz8ZNpaF/Y\nx4sOUWB5UE99gtorI0hbU/fwfeHOgFKqAAwoco3jccR94vBiB5VNGPmM2uJK\nOWcI\r\n=78xt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3CJi7qsOl7e7HY/m4jxUpgQ+nnp9O8wFdV1HftfKrYAIhAMuGP/WvuyATBIL/JCPd9PogDrYGcKodc+XYyP5imrz3"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202104091216_1617970609468_0.36891445761566133"},"_hasShrinkwrap":false},"1.0.4-alpha-202104091259":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4-alpha-202104091259","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"76d246e1b7399a66a5abe70ac86ea34d20914bd6","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.4 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.4-alpha-202104091259","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-M5eP1e2h4fqMuS6UKz7LwYcbCrjitCXCnaRHPe4i7Sq5Y7xCrt8Q1P6x856AnN93mETs086xrshG0TVvZh8n2A==","shasum":"0f8ccf9e62a6a8294508274ce356b6d9be3b580e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4-alpha-202104091259.tgz","fileCount":166,"unpackedSize":6997578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcE+mCRA9TVsSAnZWagAAdwEP/3GjT5+OEM0a0UlSzhbn\nIiwmXlpABtemnAXH7Q8/4DQ+K6WygwMJlo/piPIMwx4z1AK1mR2q8j12Uijc\n8U+0owocSUU3M9pD0B9ZPnAoQ7i5sb+mKyE/N0ER+PRtOE+E2JdFbDbcPKhp\nG4MudiehIDbmKwEqoYMEi2V6NzmRZmbOE9wNd/j32VmTr21lScOfOd1Cw460\nabsw+P6OWUJV5uCqKpw13Q47xjp4uNddxr3aWRQhOzefg94ZAq0QQkdQ039X\nNtmGTvzbYxjTQmiXC0ld9xHabIJaTDYxR6rr5kGcS4mecYMtpPyUCKJ7ZTVi\ncGEbEApFMkqEFx6C4h3Ko2thRyT4nu3jpP6fHAVf3ZQ+RLP4xHsQY8OCNRfd\n+6PTyhHGY6odCoasNuN/Enlclx4Z2wdaLAlV+9SlnJh5kXMC5XgoRaXFQCjC\njyKULQ2S09X9DuYdWq1bnz4pcWff9MyhntDOiEP+hHOb/zK4ZAqTlfzIlYDM\n+4tZP7jftErgQ5zdioFirXQK/dMph38ZYskQAEH6CmvjKKIhfxRZ8Y6r6WvN\niNXXNPhhkKd5cyYkuK0tw5ki9rPDIcwSM301huh2KW3S9IowV18IsV1tMO+Z\nunleofa11FiueNJ51OrVNrcQYsOg8Otxe4LfpHscoyKq16Aem21+CFGnk2v3\ncAkI\r\n=ZFeh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBnFbP+k8E2VAEeOOUdBbRaOmOei/GNrJ7XlcP5pEcCSAiEAicVmbYWoiZAznLe/uaMx86OVkO2YhMp6KIxGwItNF1s="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4-alpha-202104091259_1617973157948_0.6411807058576433"},"_hasShrinkwrap":false},"1.0.4":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.4","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3ac5c1b3f23b1b6b84f6c0a047bee75cf737a2a5","_id":"symbol-bootstrap@1.0.4","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-P4h1CiKVQHDBeLTPyMqKYf3T4bUvOHXevt0GOjcZn3VdmZcw240S16+zoTgSiOfuHDSfocNwGrYidNY9iO6BFg==","shasum":"ad04d8c84d451b8620de3718016893a24f1449e5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.4.tgz","fileCount":166,"unpackedSize":6997521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdae7CRA9TVsSAnZWagAApOIQAJUhbI8XnNbU7fMIcrk2\n06Gy2GpSEoADljdTnsy/rmWtQfSPdO77DsnBGvtjtJ5sK5j4WCVrwTML5Aui\nDpJQDbT9GA1mMC95N+4V/UCtw+PNGDpreiLSL7gpwMFo7L/yTQPrzroYgHMn\nM9p5FIAxI3tlFX/KJf3jI4MCI91OyTcO3+QHm+qnDbkG/xvTMv5KualZhQwr\n0iF6wGuEm5CFaUPktvp5JDiH3KyTuYmjRkqj2dC3faYTEu58ar24zIc9NmIq\nUpmESNBU1Qv9WY7nzBD2VSJovXKMUfl7YSkYCWkXL4n/Kiq5lNJ88wxAvK43\nmH4Acvp1pDdc3Z3PV6gALvqrP6k3kcfqTrFAb4F8RBxZSURcvASccaD28Nkp\n1aHOAV6DuUVQxH3p4f9Gvud8PAlSBpk3OgrHaJ/rm0n6JudNotaNfR3sKXmv\nigmMJ7y3oc/7pWqoicpRiKm0cHLEp3MUIc27B8QAD452aVuQTQIdizcM/QVV\nohHLaFW3/Ov62+dqtHMWThkvzT7g3zOH59zHa69EH7vM3Q+jWVssbhpooxrq\nApkDO1DBAlxWpFv+5SlceN1qlGUnENywfXzjRxQpv7gs6vCNJZjbfMnFBte6\nN2mFXPEuWKH7LD8rv9ruA6AHYisliRjwKRjJGNe4YgCEq92Yqy8v3/8LrcKY\nTZkA\r\n=cmBE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6ZGFsfVx0e/Pss4kRB/JtmTfxCyhzsfUq2IKJob5wDQIhAOR3wrI537RRR+0jsMa0db4I6VcaNvpFnIVrlYHRAKFP"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.4_1618323386405_0.22723355590148686"},"_hasShrinkwrap":false},"1.0.5-alpha-202104151744":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.5-alpha-202104151744","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8dca1f4a2290a9d8a2a1bcd06d8ebb0cdd4c9a4f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.5 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.5-alpha-202104151744","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-dAvfL21oMsLxYAgtgWWmxUP9C2K1VZCrku6aTRF0fpVFbNUCpBOnZBR5+tDM7kv3koXnvnQq+NWcQMCkukSkbg==","shasum":"51b1232150fd1ba5821d142a64c7442bacc0bf7b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.5-alpha-202104151744.tgz","fileCount":166,"unpackedSize":6997939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeHt3CRA9TVsSAnZWagAAk9wP/A/Chn+oKd35aXwrbv7G\nHBIx3VrD9JV/1UrOe0urUPFoJVBuKaffCs67SCTBpk6mOoXVFWRNG0qP4XKx\nP3o1fBgXwHcUPFuvh91a9oOUcoBLX15nGAiNzcoRMIqM6Ze/aR+yXAudtlPn\nrEo2aBZ0AIu2SrE0v4GzmO/utjhpTN6l48QVT539MtdzvCIL5gQEaUP7ajxP\nuEb9VXOZmEmXgJBMLiS+N+/cCxfoDqRb1wfeSsh6cIqglHdefO+ZQ1BVdEuw\n18FWlKvoiXsR/FVdW9L9BCQRputR+kMPXVkbml0YsLY76siPxrDJuZWL8aue\nTdbw/ziGxk/DBPkV/WZVFdfzhhe4HQgQ4ikQ2Sty+Hf1tYl4I0wNZVMkBZc1\nxN1G9HeSNqOUrc7ca3CN/Z0nUUyzyewFvgS7BjobPSE20uuyid763wkqMJma\nBUnwPulQQXT0LwufYEtWAcQRZZWFsZ5LMpKscJBibkCf8W7HDG9JUEmxPMIT\nrSAibsfzMAHsdI9baGhi3AEc58tcfymF4R/yZUB0NfobCd+yCOYwZQgK2yqP\nd3Yj/FMO3A45gba5MCniYopNkL2vQoMxlMXrxTA+7w9qcEMPqdUuOkRyIzrQ\nhIz97XWulr2inx78Ui2L27igL5a/NHwbGYDmgkKAPeLoBM5O9t9YPHgeIN+9\nz8kI\r\n=I7RZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6S0uK5idJBQpW2bjk4ntEELxkDBaoTI+gTM5MJ1XJAAiAeDZ5PH1dDXqWgFecSUH/s17gU6rtWPpq6mj3P2Qkmkw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.5-alpha-202104151744_1618508662425_0.5167721022606684"},"_hasShrinkwrap":false},"1.0.5-alpha-202104211441":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.5-alpha-202104211441","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a41fb20bd3394a55670031b1289921afe308b049","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.5 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address.  You can also use this command to update the program registration when you change the node public key or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.5-alpha-202104211441","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-XepMnjPp2vN66RgcIZT4+R2NhuEwhpAASqpjW/saD+VKbQcdVDDXW7VWkNlAuVh70IvVzdlAJ5ghLczgdiJJjg==","shasum":"b19f72047e484cc2eed2ff6df0a2ce9d7db0a42f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.5-alpha-202104211441.tgz","fileCount":166,"unpackedSize":6998739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggDmlCRA9TVsSAnZWagAAa8MP/iB/rLwBHzt91v3x6tgZ\nlkfDWN2uVRBiHCwmzz8TK8imofzOYOJwyi0eRPbjwPJBydGLg6dEMqh69jkU\nNiQI8Zn7wv4fOUuh5Kd02kOx+Q1ouDOPmGnrZjtHdlsANNv2ecSfPV6lzmnc\nRjiKQD8oL26Icw+JU6qnCCo7y3PfrAAnyKkr95uhxtjlz6Ibfr/YD/ZYHbYP\nrIWyWBeYPZetLd3V/Inuqkv32m9SZXOjEon4Vfw5yFmygWvKsFh6b+5D9ksK\ntJfiPZJNhGu74HGoBa6q3SvqpU6R0kC35KjsNUbbE4ODKONuNzh7ZVmRBEq6\nA41n78I8z9ARgil9WqftWon12f2tJFg4bdur9YM/WQ+5y3ATvqY22ROBKgWl\nnaFWiOBSqW5N8I1vzRhG8HCls5gelT50Ok+psGuNFq67KV36kPLiPnGUiTT/\n1bCIpIfc/jaZOmxO8ESUgGezYwRZKj4ANZrUTVdazbwyvv5/8XSyBUAGwaff\n8NQAw2tHgmOGgHO4HmQqMHoFxFkb9ZF71PqXTGFsEZo/qr64yovlduCTT7IR\n2HtNbEQ1huqMV6d+8DV9GzORMh++SbKzm9Kg6rOTgLEp+9R9CSaElMFoDjS9\nms0bW7mCA9XG5Lpv5EQ4T5OsiGBjov+g1C8hWVcZP086K5q/f2NiMudHo8P8\nifiR\r\n=4weo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfMYjgWoTEeRctoyNoZoR0P0UDd5hu5XsPHJr84rFTxgIhAPGmUE+c/QrZmBEH2K1lYQJaAnHw/2J8R4fS8O+GGU4J"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.5-alpha-202104211441_1619016100245_0.5136317319177439"},"_hasShrinkwrap":false},"1.0.5-alpha-202104281210":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.5-alpha-202104281210","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d8d162afe7644dba5ec28a2999ced1edf79f6c91","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.5 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.5-alpha-202104281210","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-fG7LVF88lOIBseBNcVZIjIQP9QDPluVh0kWc0isTd3luWAlvOMYrsZ2RxKWY/hJrZc8ozgKMHXesZXKosMiayg==","shasum":"bf0ce1065e684addd410d109dbeaf1b976a0641b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.5-alpha-202104281210.tgz","fileCount":167,"unpackedSize":7003976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiVC6CRA9TVsSAnZWagAAdGYP/ReDokAodlOnmxia6FL0\no9msRhHAkVaMG/vcg30By8dFNrO3bVQWXax/+hUr0KvJ/pvOH8XxoiaLZEvL\nraAw7xHoIZM2NEE1anhMjTnZTRdtIJWCSJ339x+1w32lewH3R0l+cdwbeDIO\nmQsMkWYOz/PMZy/66EtiYc7J5RQpaojyexK08EokvpQjc0+yI27iKLbbza89\nsbqTnCfxqqJZ9OE6cm8lQQeMpjnbdVtiJSkoGttg78Lqebgmu/sTevzRQrCV\nZmsLoKM4Dhp+FnpHyWbruQMeqiwoH549AbNa66YAC5yPKMqbltsMTqOqmmIt\nFKGhTu9Ls3PJ4GNaQVqiZ+Orp1XlXgEpUSSU6nVbEOE9lZq6B1SO2Ih174Xu\nUHOKYr+8OLQ6j/iI9yQ2fpQm4dFr6lR+80n/imtdf2NpgE1g3VIN9lnscBCg\nWJqYQz8p82IYf8E5uVJX3P8CNOq57NwiCFGg18ESdqp+nIrwBRY3B+U7DbJF\nb1HvGe/lSyJYiBHZEC+lZoedJhP3ZEV9gRxnQTv3kCr1M7sOJJJllyxRUxec\njpY1cJz6YNU+VUDg9YWEaetAh4ZIWnsfsOfZ3Mtl6F60YSGt1Z33iVKFigs+\nwousxbSHuuU1SoD98izpfTVwb99WN5T1Vlr28z4Q4PIbyiWgLtvX/ekTa76Q\nzhJY\r\n=rAti\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZOSFKSawwCoFEvuURq4ZhNauuX+byDQnAn9KE76yZRAiAX0KxxA4PlHUerVNsVLh+GOqgaA6M6mX4ci7We2OHPzA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.5-alpha-202104281210_1619611833994_0.27453640871605556"},"_hasShrinkwrap":false},"1.0.5-alpha-202104281402":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.5-alpha-202104281402","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d8d162afe7644dba5ec28a2999ced1edf79f6c91","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.5 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.5-alpha-202104281402","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-TgrSxFxNHBWZmVh6FID/LUq2BVCi80S8hr6xs62XvfIIEB4vajOTK443m3d2tKJuhna0vZ5b80fdX/w334dp7w==","shasum":"7b53310321f6b64acb81d8dbac9f8d368c77371c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.5-alpha-202104281402.tgz","fileCount":167,"unpackedSize":7003976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiWscCRA9TVsSAnZWagAAauoP/3M0cBhZCz2DhAMRAEIA\nxxvL4GsVkaqhyoRY6GZ1nWh1m+YMfjX85dVf606ilvW/tIt8VrUvkki/WAEJ\n2ZUvfWX1kBMMksrT66NwQNxW/UESspcLC/IghFuQlsEs3UmmgcSz9/1/zPPC\nV4OE36/a6COMXfbg1TiOc5f2Xp+/RnYTldyiw+msFtXDy3t67u+YbYMFNkkI\ns4Z6fSIzJO8aXr0Bj34lptMuLN4hct4C8+mIs/tl7SVZFsbgOszgIR2RScF0\n/4ZsQ2y04+G86b59miHBWgqD+gGGZqRd8/lIjJeu54+BWD6FAp2G1n9k9S9e\nX1ySJMinFE+fr68C0rgLz2G8XY9C4jklc4XljTwvNhSSaC5ZtnkSJW7DaQc4\nkqXMe2NCpADmIJnNLOT++GUrCsbk/i1VM2/Q5RewtW1fzuIE2KDdWbnyFFj6\nxHVB6gt3tpeWE6jImaJIejYs8eyojMbDzvtNjgTQ91RjnlAwVwYjlff/NwDE\n24aE1/M8Z9hXV64T8x9RvAi6UFDi7HAySfnVtGtBCBymz7pcFKU1K4/jSYmn\nK5Hdk9Aw3Q0tGWfp4VchSToZQdA8w/1SOY8NCf6RP9kHktj+E9mJPpQGkMcW\nQ6nYFMpkyUbQGI8+X0u7tjgjoLTR8oeEbyPJS/3s5/zAc6qeUG0gWc41n7Hv\nNzDZ\r\n=kIu8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbcyfk+zZq+rmibqQaWnmupGUwugYo6TTqJQ2v7ISL/AiAfAfvdpHxfaWGAw5OCXxM7i8GhxLkZBk0JfZAj5FuS7w=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.5-alpha-202104281402_1619618587930_0.07006085996564182"},"_hasShrinkwrap":false},"1.0.5":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.5","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"4db690f095aa1e5ed14642ea1583264c1ac9d530","_id":"symbol-bootstrap@1.0.5","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-uXNQaK+i/0cpqHNsECzWD3oIyE7Zu8FBUcbM+/MMEhUPMZGt0YAL5hKah+ul6QA7lrnFa2GCMNsiJJhW9Jy8qg==","shasum":"3ecad707db02739d03dce5e5048f118f3b654cdc","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.5.tgz","fileCount":167,"unpackedSize":7003919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj9dhCRA9TVsSAnZWagAAGO0QAJdxjziQAPI8nHgaG5u6\nn5o5wGYkT2ASvZovkNYOEXg1I0xyEzwlUCHz+KNZqwr07FugQ2zUoDx96F+P\nPH5JopIZOE7VdGZrZvG3UTDz37/Ar5+Fr+OrPcfgt46FN8z7eEuO3rMUQbq3\nLFF5fy0yQOJIFDvpCdf9ijp1pCTbaQOhIsZc1TdODDiN53h52Mj/qYEyTA7X\nltJS2DYO9B7kaYk4FoqwvOyV4QaG81BCohm/VkETXwFv9UxgC+Z3gBSw7MXr\nuTbvrTuXMatv10+8Uaiw6VOUHU+P6g6vAKD2qkRgQuX1RwjYcFOQ1AsSA7pH\nxdjeBVekmexOX0ydeAkQMQUj2RdaRdjCTKDema8LCbhjloHUs0+fZzDk1pG+\nB+oLlyQciHCK9MaMm0FGCVfBuN38le/3rjK0yS2FTAuGj73NQ8qMwrNHzzsz\nrmTiZfY8tuEytLN3+ONtuzl8V22U2yV3KaIGA3TmzGi4KRvR443GwPUyegBu\nDv5obDE8Ci29RmsVvCNEqyYRszCHGJk7dpK2z8EWC5I3kFfu1LbrbCbHopul\nLe7dXOePmw80UQHlt4tXGX9I2dILG3SZHtxzROGNN+VRaQN81qtMbrLerGt2\n/+YHIDJ2e6Y7hLPyUD+odSpfO27jErxuHV/fzSl9wC29mLvCGhFd76+cs7DZ\nl88g\r\n=ebWM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSMcwOepIGT/dUEQDYpPAo0IlvpFjTGzg8aH8sHLLN7AIhAM55zPWukyxMTk6+3RO0fpUrccPZflI245M5j90LyudT"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.5_1620039520555_0.9176519887431571"},"_hasShrinkwrap":false},"1.0.6-alpha-202105031127":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105031127","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"029d13002d25deabfe6c12b99112971a8b7f5a49","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105031127","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-CuE4qUaj9xQ1dhmwZ0FaoS987aZDdVWenZDygu8MN/EXHItmRMFgdFGMlmsfGlUBjFEI0G+pLIUSvWsMS74zSw==","shasum":"f0c50d2328ab14958315d2ed2609815c74bd00dc","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105031127.tgz","fileCount":167,"unpackedSize":7004335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj94xCRA9TVsSAnZWagAAYMkP/j3+NhhaBll3957b30Qt\nOXYxi0YN0KtvIn7yG9JpSpeaRByeASBBLbzjCGdMqgC8cCc7ltl/GyWF7SAf\niUUNZ+fMCFZ6U/RxfHXQc2/qCiT6eVSU2X3rGlnTfPkfnlKDJMJz/BO8v2iQ\nAY8LOvX9KbAabXxhX+EqitFREejyF4fRHgYQzReZJONtiUNMtotzR0VNvGTp\n+dUmuGVPlHp50KlpfBaQi/9AwnEtUHaiqTQp4FG0qewtRd9WiIJG8pAY+cqZ\nzJx1jl2uBLZUYaEeX1XsS+HTaI5uA8atZjULrUA0NsPDu0WF7r9nBuKQhnrf\ny2VJP4AUFvxPl1WNTEwY05rhufFfzm4gIzVrV8sIthfPZySNgafEwZsv+Y4F\nAi45sk5yqq2xKIbmawpKzubCVLQGX1UadRNXG9DoyT9i1UI77eyUn8ATPi7j\niYWvayjs1jhER8HRk209R5xCTBaA1JjK0xeOGp8bYgQ22kDylf8NU058O814\nsPw1ftspcfOFeS56JEUIx8LyNVzy91vgjeVa3g20VczopOoVyuTIVianqcI6\ngDmem7dd4Au3LtBZ4PdIx3g/HSAknnE6VG0W64WWCaXXcGKraeR6nQ2keuo8\n2WtIv4PUoIGZDq5oB7+bM0T8tt/vRVXcv1xleK/TtkGjpLPm9tR0xz+K2CVX\ndTbG\r\n=10Mh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLSieYFKX+tm1XDUn+vAgO7CrJKbI326/vKXHBYz+0rQIgNA4Ie862vdHsrxvkcCUhUY3c8hcac4zknmzXTn/TKFY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105031127_1620041264817_0.3639112241694409"},"_hasShrinkwrap":false},"1.0.6-alpha-202105071101":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105071101","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"279872d685cbec1948c48a8defcd239d03b0812e","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105071101","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-gi691eytt4PDlLLml8i/Jxm2v6F159igyP03985sIBZEU3YB5nEsT1GXCNyyXscx6jnio2iyMdE1lOUEYh956Q==","shasum":"21c8c0d86882a33438716682837d613ae41a4bf6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105071101.tgz","fileCount":167,"unpackedSize":7004335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglR3/CRA9TVsSAnZWagAAr88P/2EJpveBhWt/cwS6R7fG\n/xUUkKBtYGsiLADYgYD2d7mplQG/LTAYcQ6EnbzVkpdKJzXSQ0cAssn1E2iX\n/qlHpUlIa8akMDP4jm7zUmA3rwurR98Hed0BRrxxw273KCakYyfFVBaFtwRx\nUPj2DD+M+WPNQcVeS5Xpr/e9enpkA9AuW0rX3vSlVan3QkvRmffAccytWaSG\nZx94uJqV3S5v77+YTx+WrOniUFwfQ5oiUhjMamNsi4Tmj+uQB2tkW00yGMhP\nY5O9R/jF8mPzP4XYHWwVYhBakZsvrPQICLd/98yA6Jn1VlJcpi4vS9m40BWz\ntE9IzB8Ew0t8QiYGZzJxCmhwKuKKVj2Gn+/86qURG7hhLB4XJYhSX8OnHrR0\nBWVC70euiIMi11UL+OHBjyV0caZ6yG0KctqgxEHXPJipu4FHbr3zlGMRocAJ\nW5y7tmO71j/nB2i3CzksrYcznZX+duF1ZxuEekrs49hKPdYmU1fdO+aVdMdf\nPpLt8k+LL0imw0MWptOd0tjVcFQvsgTtv3xqufH7XcLiTLJg70fBCFNHqNS1\nHaHQlrXgljxtdwknV1GpArUbKBaV7GLqEiuFOosQpGZdWnV90OCgzkzWm5Bq\nT668CsGikkfwD+Y8pKPiX8rQFTkZNDGDaUM+mycWYbXlO3ytCOdityF83wIC\nNYi9\r\n=+dKv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICGkaR32o52h+t0BheV0w3y942TpBnOw6oVKNysdapNoAiEAvOc/1VzxizS+cygtONwPrqDFBOnYgKAfDjTXiA7ADW4="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105071101_1620385279203_0.5092943998249035"},"_hasShrinkwrap":false},"1.0.6-alpha-202105101510":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105101510","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/bip32":"^1.0.2","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"a36e7b1ac9bec1f7ed18c3f8c78ecd45d997a54a","_id":"symbol-bootstrap@1.0.6-alpha-202105101510","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-dB3OBby0E3SO9HuNqLZhKARss7kAB4zWiz+e7WAu30YCDwQJtmCU7NDNd/eiDmoIfVbLP12JarkgqBnZQLT6rQ==","shasum":"ca926e45e59537d7e9b7d962611748c9f1df3a53","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105101510.tgz","fileCount":173,"unpackedSize":7059326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmXcUCRA9TVsSAnZWagAAZhoP/25FRBG4POBQNT5J15q+\nZa1+szKtNsTsVNSJW6WScTDWyK2+jw6CW4W3vuqS8kymMB99ti3OzDrLYAli\nhxsgOob61HdAubrelFqVLZ3r0vm0RLaNEDHiS2K8xp7UQ+fjDxkAmKwBvqe/\nm93vK5Yqpi2Dc8xZ0j4noozNQ5tgAU8RteZQmoKhG+ap9ciBPG3ch22K9IS6\n6rfnFY3UtXNQm2pJ3b8kwoityfBuQ1bafrixc90kceq16nUG6lJnUaweYP+Z\nbDPgd78x947sVFJOWWzCx9mqOlqMG21mmafQa8ty954rrrSDp0K7iiKoDABI\nbGFbB+ljir2TR1w2VvoOAVVDTb0XdOzOUuEX1y2vhaqx5LZggRwryiXSYIMB\n0t5ab4pCxgD96ntuz6XumZGDvWfmOyTgdDgnqhh8r6s9oOtGDQ2omMz98YB1\nL4aycwgM0Zn83KhNem9lVCrl8PSUzcXGwNR+oOOkdTrMQPESJ8bqTyosCdPk\nDVea0oGAgsPOg3fwq8GT/11KvbJBP8YZsCxtx3RitYZgX1ZpJsgZxUDiq3tr\nDYxaxqSPWtV+yng59rl0qG49a3W/AQrYWZbmZ+/VvfP3ns1pKylksM2QnJSc\n9hP3wYcRPSLH0qehGyhvwz7zfrkaF4N0hIxCKEq08cnDQnGFgNKQYVafjofc\ni4m3\r\n=7szm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZpAXCj8KE5nEYcqgb8jlgo457SYY/UVxuVoM2XB2EDQIhAO4Cvxbj6hxjfy/I8iYLO3PEeBYFFxIwLebfaE1QLUQm"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105101510_1620670227700_0.868057135268405"},"_hasShrinkwrap":false},"1.0.6-alpha-202105111025":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105111025","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"e93a481020cf8b77daee3288980aa2b09c55a73e","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105111025","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-WlhG+UOP8/Y+zeqVs2G4oeyoo6HDVC1ueahARvOoN+8pOth4dCSh7Knk0YsRp52RdjXvLMASDZeq+k2MLJdXMQ==","shasum":"c4f3e6666adb620e849abaeea15104faa4a8fea6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105111025.tgz","fileCount":167,"unpackedSize":7004459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmlvGCRA9TVsSAnZWagAAROQP/iPgbatXZLeX55Pr16xB\n/lS8OIR+GYQ32Trk/ffeZXWvqQ+PP3i+y9oehyh4D4RzKfED85z7pl3fH5D3\nPUYNteYnNAFuQbMygI+nrPcGDM3/J7Z+KH/VcdJHfG4+Rxkow9K0e+MqhaeO\nteVPnLH+lmq9xvwND0dALQ89NbDzo11yGGkLnmDqiSijc1jHBLtJjiR38Rn5\nseRnZlME3OQfLcWdeo1/C8+xG+vV8wnqWTh4rdP+JfveV92Wm8x2awgXsCy1\n5ENY6xYJnT5DvOJ3RYN8bXfNKsZ/8sOLmNVzo0PNN05occz6EcZSyYZH4r/1\nwS249y7iBdFjiM3910LnzwCAfcCeibL+fuUPAMxfBhpFDJMhOmdgww1i6i9w\nS6NuLnE8UP9NUBCIkEJG4bD5V4q8FoWKJTuc76uWfdcVL0i5UYP3sTk9qw50\na8pPnvWOUJVAAk3KkrByxzOwLsN4+USBphRmPt8aFq8soNhWrWJJkGe6F2Bu\no3Q/VxER/ynm26ogkZ1xDPdZeorYTQjcUuyJZYoE6ah35gpA3fDYlgSXS5/A\nL7jZ426JUFwed/8IuScxCFQWOuObBsUMp0KcNPH2n7Be8gpjVQCW9g6YMf3b\n0xmBiuoCzVw6YhtWyKOVo0JqMTIkve4YDTpClOpeX3iyptj4SM5+orObNZUp\nR1/e\r\n=UZ5P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELqN4D5xQRlcjJrJ3BuReE53lubZBl8QAeThXQU6gNNAiBLaC4kIav8NUzPscaF9ZP8MtzbMVqmthys2v9pC/G/ug=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105111025_1620728774119_0.6390214296386716"},"_hasShrinkwrap":false},"1.0.6-alpha-202105110740":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105110740","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"1bc94f3c999a1c6ae3b236c9a86285419df17a2c","_id":"symbol-bootstrap@1.0.6-alpha-202105110740","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-T+FuCgulHwhpf9DLkpzDjGTJ94VrcBNJ1nj2BPDSBwM1ApqfKErMgGgNdboLGZe7I8cnIE4QjV/zTaAbuMLvDA==","shasum":"865c2207e1fa980ce78926bf5a1c942d24bd49a5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105110740.tgz","fileCount":169,"unpackedSize":7012599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgml85CRA9TVsSAnZWagAAt04QAJzOOwTnBxZD+mLmxgjR\nZ+IUReyD6M08Fu+ZStpea2beW+OgTF8k3fj/wOyNK3MVSsQ9Q/HdTLfim7/k\nFh7VRhBwcuIOo6xvbbG1eZuYOcS7D8nZ2H0z6X8f0/NKoXghwgXC8+WIjh1U\nYwNfNyHtWSGAdROFpaNxxm/p/+1Dn7kDdLwD/2vntZ7Rtm9mKkMp98HEjZtA\np6/BozBgqQ6NWRjtaRUqFw2RlilQpb1DJeYXFUKTkh3c3AUED0ZTmREQF5vi\nHXWM+9lCqErXUg/U4odUw4Kik5As8ZgMMSJcNIqlAcKEVGnqPI/nynsuWm4I\nWktGBjCU+DM+V9i0El4A4+gMphL2pMd7lrDejP+RBv97/i4BpRtx636q3FAY\nNEXDm/iV8i6B9cPdfUUCEBQhKb+ulqHs0/ZF06vRw7fsuWtfQ/g4DSxCVz7e\n9fqMK9+F9F7FcrYyNIsznRm1XnokTMo7FN8K6kWPb3NqWaH786vfPD941lKe\nGXO9Y4hX5fFKqN7kUY0BYB22I4BccdkvIw3nYkkcn8fHf8Ik1KV8uwAh7N4L\n/a8JYIhVmQYS7fXfX8DtWdBXAQQ+y5zfz8L+ivusXTsLgw1t0eNvST3jrG7Z\n3nkKeJxJQL/9NQUhVDQlJxFjVMKVkpML8qyjgxw+TO6TQvRg9/idLi13yguJ\nS3xT\r\n=MT6I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy/JvepkpS0Q5dy66RWoav9BTtgK7xSfx/glFDA82ULAIgW9TVxJYUU9nYCaWJVGq61lIRUBQpkNkiq3x+RTmFBDE="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105110740_1620729657221_0.821210812961757"},"_hasShrinkwrap":false},"1.0.6-alpha-202105111006":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105111006","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"1bc94f3c999a1c6ae3b236c9a86285419df17a2c","_id":"symbol-bootstrap@1.0.6-alpha-202105111006","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-1s40YjiUob9RiRnMoTOQ/kGSAYyVbbG3+f5KiWUK2TuFgs65KM/s1g60fHWA+TJQR+IwEEU8RAI0asNoqpE95Q==","shasum":"54e6d671fa24616a8d509a0cb23eb7ee0619908a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105111006.tgz","fileCount":169,"unpackedSize":7012600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmoF7CRA9TVsSAnZWagAA2E8P/0+7WPBxGsvXu6LCQkrz\nQajgJZW9UDaKctTFpqtqnakcgCHlfucFvRxqRETzoFXenZfA7AiY7CH6lLr/\nAx+6+uz/OxtCgwQD9Yo0pRu8PsspXstYJ4KcAkD16tuN1xJQg5YakluHgEUI\n/X1ZbiskPa8Gxo00T/kPl77yzaRtE3MIZYZYrjYOd9S2mwvYtB99i5Zju/iz\nL93CIkDUKVcY/aRlYPL5VThEBU2m8ZOQjxmqo5iK/4zDbLlSpJp4UxJq0wBq\nCHUD/kF+eEuJwyVqEKnSWyKRg1vcIuSZy7bMKlINMDzMUd52urjqxgA8o4UE\nU+LZB2AeR3buRA4ct4q6GxqbyUnF6rhAsM/tkRS9iL+3jbsWGJEvYwxUcykj\n28G5pv+N7RtQqe4NW85KDBl77RHlF8bzICpMHtQTQNxsQiTf/AneEbzd1g3u\nTj5MUJsGmsenuIQ+pRGQoeEOEVFBkhMOF3DX4GHQcerKx9pWrceZRWez1So2\nHB2zsg+GX+N649WG0lBz5GQEII/r66I1JAh/OaT8HWwlfk8//2IejNZ8/67/\n9GFApljiUT8xfhdKgsEckcyRVZ3Yc5JZW2zFahuDehFbehmLxbnNdLdM4XBA\ntNa+pr5uc8R0WLXnrg/kNr3BtKBXEcQqcKYtoBPwEdkUnxxxq3W5A3fc0tgg\nHx9V\r\n=79v2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCERxnqLCdaVNR8Zf12q7dpJQlufDyL5QYnSG6zLxwuAAIhALuVAaPkyaxpMS7PRq178sH3tMHEZ5CRL6bSZeDGYNDV"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105111006_1620738426651_0.7767161164704459"},"_hasShrinkwrap":false},"1.0.6-alpha-202105111111":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105111111","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"1bc94f3c999a1c6ae3b236c9a86285419df17a2c","_id":"symbol-bootstrap@1.0.6-alpha-202105111111","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-OieYFbx6a/ez0jTo6Zvd020l+sLwHjxW89Z4YondGsCoiXj9ggRNJwOLzdZWZv/SOmXbFU8AKRURkVTHvsGVRA==","shasum":"ec62890f86355664da5b7199d291cd3a89d82377","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105111111.tgz","fileCount":169,"unpackedSize":7012702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmpDECRA9TVsSAnZWagAAN+gP/2YqiGlxDnURA9pJs/7M\nrI6mK5PnvB1/ZDz0BA0RP7PB+PlhwQJr0LEg2CHLg4RZZC4l2HRGFmoT8pX4\n0dH/JgjLq83mhkkduNftdZzrVJIRVE5PionFNw0MM5TYj2eZEYnZwG5AyYa/\nGIURYYFUQguy5A0gYNb+qQoZIS60b/ttEXu+z3eD+0cvug6w+zUX/mYmimXI\niOXOBlYLbcYkPfyTfq/Hx7L7g0jXqiHGrfzRFomAfTIAZAdp8NfESJHR+fBC\nQxiZ2yeB7iKaCHUiYPDblgZQDo7zbptPIyeXtGjCmwTUs9rlR+UvbZ9WFAxS\nMV8bReJlj4UB/04owcjxU5jxZeUAfKdm6pWUH57ARq04ReR9nprjrJl3lxSj\nEb0joBRTIWj96F2hmFuDgVreTrJH/vKK/MlZ5SaTISUe7r3KllxQ6bWlACPn\nwroqaJtSqkGw7SDsGK6PBGNLNCTl9OAAP6rJB30eHo0xb8C12H5W7RsCODFk\nr5OMN1qjshKm0PtJxFcg+0e3BnkZMXUsGtsKDyPwDZh+wc8CFVqDoIb2gV3j\n0/RPXQSk0NkD60A6wJ4X74xeN4JSaOck+tBJy5ktkdxStAAuv1vvxUF13ags\nlCZpKc7HI3axyjxQzaGMZJAdohQaCJ2E53MDXNHUTPi3pSgGftNaoAS62e0B\nAkhK\r\n=2Uj7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTfL0iPbeC8hmycMzEMid4L/l2hRNybeM622f3zT0qDwIhANUmVYvmpEDR12/c2hZS/yTXzn6IuFIhE/c8K7i50o8+"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105111111_1620742339628_0.9843001959890207"},"_hasShrinkwrap":false},"1.0.6-alpha-202105122247":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105122247","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/bip32":"^1.0.2","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"a36e7b1ac9bec1f7ed18c3f8c78ecd45d997a54a","_id":"symbol-bootstrap@1.0.6-alpha-202105122247","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-5KFA4cjT56/adVoSLku6dKSMTj6x4W9R/msVq4oI8MQEzXoUUSoSfOkDu8PprZZXH1i3Sd2k+WkK9l/J7R06Ng==","shasum":"8ab142adb994fc7d716cfdfc7bc9a7beee984559","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105122247.tgz","fileCount":173,"unpackedSize":7059326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnIVQCRA9TVsSAnZWagAA5fAP/jGUNUqvK/jYb0NQEouG\n8MRODdwW5Ww9cw7jnJh4rz7PVVo1r3zhIXsdsOZF6A+XX726ZVNmWGscpoCG\ng1d7cbQxmCIV0tld0mRi8a43mTt8G4av/OvhCxLIf4oeZFu5njlcA1eHFt4W\nc6PTOaayxSFilbugRagWAnUnUg9qLmJ+EFA8WClb9+Xa571YWc5BvKZ7VIlr\n84G74C7pN4Bguw3/bW9KDNRVzrVx8ayRt4jxRQrkauCqFwKXbmxf9CvvlxGd\nF6/0ogc+z5ZhP9T2jEWsrRpikI7Esf5ZN0ffLnSq5GqNDCtkreR5o6Gw1tkg\ni2rCbpXcLpJ+qaSJgEW10JB13ZWUK+sq4KJFzrNTz8FFzlc7SdrzrpH5pwqq\neyuM0i/Pusc5/AkcJ7CWRwPoXdVfv4OPuD6LG0fPaFeMuOv7vi8zQGPY9DOI\nMrEtn8wNJHA96oKC8Ikwt5AxL2WL2S5TwBNgypCmNdy3Xyyn6Gbo/e28BvhV\nwBFnldRs50Us+5lEuvQXwpa6ia6wJR/je8gyVuwWykrM+Ctllf+xmxjo1soV\nPVKwUGPyFWM8UX1g5WFF9PTZXqCaXVykuwmkvIVoXZR4eqBdT0EkqiLlgC9h\npdcuH+gThr5LVlWE9jisemFh/TIH0CuZywYBrMiBhcwA8oyq5ka+wyXW0vVM\nHFYf\r\n=7SeV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF51FhWhxYSXqbkSuJ2Tlk23z6cCftk9qukkQYW9HgYVAiBEJdNv1UNlol/dubsFRLXRycOu6HwteveK6ORhrtezZg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105122247_1620870479731_0.6596222122101307"},"_hasShrinkwrap":false},"1.0.6-alpha-202105142121":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105142121","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"0e1fad9659f6f671fbd6fb5615c895f971d7cd04","_id":"symbol-bootstrap@1.0.6-alpha-202105142121","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-9duOM9AGLcBYRH59lL/wIIuz/d8WlCZXL9TdQk5wQBaj2fgFghsqViexim5qUtzwsOTpD9tmzXd2OFu7t7YzCg==","shasum":"54cb1f034172be93317e81fbc9086665d3983409","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105142121.tgz","fileCount":169,"unpackedSize":7019622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnxQQCRA9TVsSAnZWagAAOQgP/RMBYwJX4V6S0Ks6RxvI\naehn+Jskp1cyrY4ySf0xiXeG3WYu1UKq2gwnqQ7O28wclkU0y+zycCR8GWPR\nPqTTI+CdnDhCqNdeueH/yuS2ZpxNPVe3JUWWuRW2g0CqqEB5ArpfZMFhlKtc\nLX7kVktITLlIq1evARSTtcvQz7PVHqtKAO9WyjSGM1UeUPjpXNXkySAVJqa6\nt6rJ7Ukn4ZAn8BbUvzx3GupDOCyv4ZTaZWefqtgRvhNK2F1Fi6imd7wGbJYs\nFJHjhaHkWSWTmLSgyIAiOUzk2WRachHBZi1t2lM1VxgDGp9wS2oJVYGKN/Va\nlxc38DhAFc8Jzf0OtGEyoIn5e/ZwBkl2HlMQ6i2viVxdEoUu0QqswW9qN4mt\nixr7wCQxq28EMmrMDA4dIfbgQB93tuF1YrUYaQnvqDB/fHsQRx1iO72piv0T\nUskfpgQWsh9b7lRQJSkoMewn2Zgxou9KbwHiadGgZNZ++Ml0fjW95Hw8fH/E\n4AWg8LkwPGSvC2xXP1DyGNGS3KFjDRimga4wpfAY+0dY1qtUgQWzVhktSmOP\n4/1xhkSBgbzaUdGFsIdIHV1G3OgsnLdzuRUGn6b/f69yDjo9bCBgfK2ntpI5\ntu4NtbxSDlK+1Yn2fOwkhenrfIBGXv5jo6GsGaM2bYSRWWqphnjOKc6FKSLt\nfE9k\r\n=DMxG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5ge4as0JAeptRbVj2lcPQqu4cKqW0r1T/mq3rmiyAcwIgT942W82HM0hBxdNnYeDlZ7eDpAOZhsKxy+lJvPXaWgY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105142121_1621038095789_0.24524574216296413"},"_hasShrinkwrap":false},"1.0.6-alpha-202105191807":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105191807","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"2500a787da088df36b90a74d3cfca53a01e795af","_id":"symbol-bootstrap@1.0.6-alpha-202105191807","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-vnnis9AhtsTJbtXPiudkKhhPnwOFINNZkU+YxqPGR4nvyS4FzrQZS9nrn4NdSEuSxPdypVFNPFwU5SVDBsp3Cg==","shasum":"faa48808176651c1912eac848b36f93e7ac5df31","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105191807.tgz","fileCount":169,"unpackedSize":7020172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpX4nCRA9TVsSAnZWagAA0SIP/28+GY+Xuts6MXMhfcUY\nimTE+ekqdnf6W5/Qbnv5/alQ2WRZlIwji28/NNPXHyAubiBYpR29Y37Wz7IX\nCubkQzrEu8ahcTYdOqzf6n+Tl43rwIjaYU3vRhsyXIGnqV1jL3wIEi8KJ6ed\n9kHQKYBUXI4AZX6YMIdfpJvfbc5RfcEyxmlJhjjXSeTXgN4ngP0vhF1PLytd\niTG3OBFB9S5cDI8YNZzj3s0nLgWrPpe0v4T8W0DNOFiRyhNHIgZpV+irGChz\ndNCAS0batAk/NpmYjJq53rYqtUQZgb5Q9GvBg4xfvBYQ6nQ6LTETNzk9iIJH\nblPDgTPo7remFwyPWvh3KQg1Cwmb1yRw4wepJp2LaR3b15amWAke7XKtCouC\nxrK3GJA/++rShMVGRinwXeLlLvdbsrzFy3dM1hukNAjbldaWbqgMAIm+uSjE\nU5CDzNmrB4gIFD1crt2cRLEkJ2PQgD8A6KThDzE3GQPD7/uKJVpOwPF2T+lG\ncem5qD1Xt0AJWZ+Y2K3qxGqSm6L4VMP3bSDKjygFHPdgtC5MJqHaq02C/3dC\nWDhciy4XrudiDAy8osEJY1coTtg6VFZ2Z60PfJiUX4kY1nSCrGTwO5ovMroM\nRACeTJk1MRVYsX0BYRt0y/iu7o1E2SsyA3IMnG5hEOohmWXgOMK29TdaIG3M\ngZzD\r\n=sn8Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVTd173lmGRpwKJuFx4O0jPFfzUOleSIua3HXjWe0+CAiEA1INzzO7JI6VvPrvxxbyDLZmGfGXcUeIOXrLbJ5AtYB4="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105191807_1621458470640_0.9455020175652915"},"_hasShrinkwrap":false},"1.0.6-alpha-202105192112":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105192112","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3e84560cb0149915a52151ffa9b3655cbf5c8fc6","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105192112","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-ebQ3+c4Dy2ftpTw2i9C8y7lW37t4ryg43YbgQYrcaZrL0JpmjnpiKtZ+zZk46c0Q/JggiR9l5Ls7XhX39L1AKA==","shasum":"a79c9784e49cba512664be0af5bbca2c1b21f17c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105192112.tgz","fileCount":167,"unpackedSize":7005009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpX9PCRA9TVsSAnZWagAA8N4P/003/dpISONkZW2qOehJ\n/MlgfppW+fJLDGEmGF2Ul3Cab2IRJO7hffJtOPd3dVuxmjRyg515UiMmnVYj\n/6SHgrkEOYsVdmRDzPwGhfDHIfgmgQP4Dh3JIcV2OHrXVYktYWnIM/jywDWt\neH81AH/ZvOXNWXk50xOG+RXzhn6w26gUoNInlJMfQ/QFXaQoy5ST1GK3oq4d\nJYiYA3up69bijRnlQs7m6EBMKoG4l2ngxosnrAwoJWtXRteMqwUxn6TWV2oi\n2GoNxhxXJK8oxvkMvipN1zasGTFy5HnV9FKzc4bgWDvap0J81T8LLFYnHSFP\n4keyySVQfuVn9xUtRLKUyRsXv4mqxjuMp3l55eahYr0wRTL3/d3HhAvZpDBP\n1aDof+nkh030QtmSKxoea22LEF5ABMgZaC8ZKo9cUHa98RM6krXFanwPBSzF\ntRXcCVbjH3bgiKYm31LNAbjz0dGeTSWio/+6IPM05EPF5nXSi3RU54uxQ73V\nJVgQoiNvSQIUDo9FbFMT3bRAWxSsqLEKLxVL6x4eVgxGB5CbQw3esLeQys8h\n2HAJYvdS4poa6oFQzUrhHjadN9ljXhKBGdyJGjTeltuOwvO/5KdMtmT6qaqs\nxGRVMoGkErxgzN/ERSYRLHmX5y7IQxAtacWPNEV/A+ykZ/PuvkEjcN+fnRkC\nCfTE\r\n=8bKC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzWfaWagswupE1ffXdQADSVV8ZJea9S4HAQrcMFdWImAiEA9xfjtJhEAEOWzuM/stuhe32y3lPWta4tMf+nu4eeJJQ="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105192112_1621458767032_0.46249116352044783"},"_hasShrinkwrap":false},"1.0.6-alpha-202105211202":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105211202","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2f4b12c3bbdfeb91f21be6c7f9b95764d5026b05","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105211202","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-SwJtjkbQ1x4buFXJAw2gnNmRdjvNyzsG62HQtdc4ARtRyYvsVI8xihnM3zezHp6SyOpLX7zmjR80C1JVJfapYQ==","shasum":"b68f138864294ad144f19dcc9e7e55a4b2f8e333","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105211202.tgz","fileCount":167,"unpackedSize":7005292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgp6F/CRA9TVsSAnZWagAAmS0P/3pHKsojEGZ/D5wNiMGT\nlOkX7S6N1eDqRIq5e4APRtmh6PVcXzBbtRMxfJAqgceNcr/8e/aApidK0y2e\nggYgpOoscJ+VKOijBRABtkOW4vzyU9ZdRA52/sOu3qpYyFV6bwn5v3GielUS\nK25PquZEy15i2A9iaDDspFOgRaQmLbQSON5HU+hDLHYszXww/xpK16NxRfMU\n+HAmDhEOIeOt/1wS0dG1hGlsMgnVlUq6fxZgPd9YSr2sIMHtmCMLzeROXTq2\n7TaLEskuFden9YkauqyQL8ZtPHTYvX0YNzUZApOd/IKVTRSfECBDbNcR7Ywu\nZc+D+zAdB4MDTyNvMzN4RWehRXTgXg3opQPISkEqJrIYGJayp3xgAwbdYKqa\nRhnSvl7LFcq/hFjGtCReYC8qBuNN7BFRtDBepuKlXjSkdDvRpeAumXSAtKSi\nzf8pVHN7kFYFZLQhuyZrVhiP0JKrzC/nUXtpztaQwChbOQ0Z7/e4GTZ1j2+P\nZ9fs3f0UgWT7y6f152nYG+XY2beAWQo4ZQC/cNHQOdPv+T9T9eAirfwEYdrH\nzQ11yOAi8Kgy5QMzKiOLtckaFI0ZH45EQiqj3PGyxzM8dXGNGJm+JOnbM309\n4r4j1tWmR8T8BEyUEvd6ispkUmR338bkCSV0wsSlDkhjCR0tAHAT8yFwkwOm\nQIZA\r\n=56Lq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAiadPwKpzOV/qM0OhsQHBg7UlZg5ufdFOOb5BoH1w00AiEAwQn2PwwULX5Kz+sQyakkQVffLxBz4nHLmcUgo22gOk8="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105211202_1621598591191_0.23209105540756503"},"_hasShrinkwrap":false},"1.0.6-alpha-202105241020":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105241020","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"4af56bdfb243b055a37c1882a63153f5cabb0e19","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105241020","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-r1/Vo3+9LwQNBLuKsaSKTEeDai4WWPTXaU4OJSRDaO2calAWarDy2yK+O6CwCdGCRx1YhFWehtwuyNi4YYqe5Q==","shasum":"d280d82590ab3645d3d58c9359e699c8ab9d0807","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105241020.tgz","fileCount":167,"unpackedSize":7008583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq34QCRA9TVsSAnZWagAAR/IP/3NFGHBXxt0SfmW9WYQW\nPhSa37XKt7oFEzbhL0+fqZDuMchKmJp1i02AeWvYGNg558v5kKRiPNSoynzY\nEkrDvbJk5Nj+zl+Ei8x0D9ekDyarU4mVkCfJ8XXjBSBQrUa5uHhl5/9ABrT2\nRbCFBnLhy7P1AjzNUow/qzyZMHgU0mULxW5mpRX0aDMXmbu0+rqtpc3ycYRK\n6E2L/3/GtXoL3zhjQesq8phGcVMh7UfxUQlzT0+9xjLhOiy7hI+FTAT348q1\nSMsXZ83Xro7zlaIErL0oevZh0R+Bn+GoxSurx40rQoTl4qAO0Qt+Qr2MOLYt\nu31EwEZJLk5aBtNG6M9JI8fxmmruD5HWyi/x3DQIjXZZS90y3CtDGSVo0F3N\n+edtxgnc7LBXfEUjeC9a64mOdqfPN8cPVUpw9jTN+zg6K5jFwE9J+gFIcKmh\nN4w/tXtWjmmCT+bF7Z7v0ljuJIK2N5NaPxSPAGhUVj/qNMpgHT/vGLDfQtgY\nCyS7xYwUjP4NluKw/3kwl0IEgJCquRVMWELjoAyGQgfhYOThaSnf85WHh2Qo\nqaBy/1JsnND3PWaocdMobXAU51kyD6WLrTAFakeSHrwhNewdDOsnc1vjh7Eg\n6seoJo05U9ftRUcAaw2hykO+2z/prPzmLP3rBOxSeL8YGlXgG0wEJgiBKMfc\nqJQQ\r\n=ExnL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJmcGavLOH4ubN3fmMGdL+zZLcLEasFSYQ+Zd42p5XRQIgP4JGsJxI6DVQfuhUA36UKfDtvXGqgf3krLe7otzQfIw="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105241020_1621851663743_0.777040332745156"},"_hasShrinkwrap":false},"1.0.6-alpha-202105261920":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105261920","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.4","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"259e12639b6f8fd6175e6e3471a3078c1111f1ba","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105261920","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-a3D9MYbDaN5o19NayQjyLjMhN9AmTJPAelcDCpbNS93p6bt1m6sqQmSHwrIMU96fVnRu1dqzFZ9LidxEzkW4jw==","shasum":"7ca82783a35ec0153d8d45fc504b96300095048c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105261920.tgz","fileCount":167,"unpackedSize":7008617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrp+rCRA9TVsSAnZWagAABRoP/103ccyUpn4Hzw6EeQ3K\nlzBp68aUId0ej9zKZtQkGsFBelyj7FTKP/t+Egftp3OurjD5vnsgObtr8T8y\noirMFaYEm3BapuMIpWOE+gyaWrTXIuJM7UBkI1eBUZW0LIPJJin4BqvLhvBo\n7ks6tjaiu8krR/Dhra+/4kFl5J7TyQn4bvgh6557hvkZPiRH4DvJPapRpEJp\nVFUv1mK9Jdnori3zYkd134VoG2FknUcLFejd0dy6EWWBKYv4EELhaiyLrf83\nk6K/lqnsMvY8f0N7AxG83ZlMe9+8WoMJZ2QE2ZidOxkZbveSm6IzJaOlyb+M\nsTIEke8VoCRd6CIk2dqZpo7l0ckZmYvhnXy8tswz0vCHfyw1BWd9IV0xTqf5\nTKehswVHJaRVJvzsLwUscKFOspmotMZFBn5dW8qmwPvp14aGfRSvY9aONPug\nizmUv51P6ADvdw7OU1rtmrU8nAl2sqeW7cGhzz5X3ULc7MqW9pWGmvqy/3QI\nmTr9mbEUprW5QwLv4O+uYmH9dN6wjgihx/24EcSi+NTKorjvb7DHIuzenR+N\nLkuLPzt6ch6HpYasLFNLJcdDVrsIUhzOgDl+AeiMbgUeTMDDUN4as012BOjw\njlJlIX4mdIpLSXukzdWLPMmFpzkr2LyhVpDQ3uk0lFn5EqRVLZC1IxZOi0/R\nQJNJ\r\n=0F5p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXOBU4L7g3QVs1j0qWVeOonXbnDTJVltQtcqFAH8H9AQIgfggdHizELBNNLGyMwe7QtuNtbzObZsb9/2Y2R9vZKkU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105261920_1622056873507_0.872118230006057"},"_hasShrinkwrap":false},"1.0.6-alpha-202105262144":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105262144","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.6","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.20","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^0.23.2","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b0f3a5b795127e8884c754a9f568c6786717c8f7","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105262144","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-sqNrDo2MtuofDIp/xy3qEPkxErtuFos4wgI4mZH8/augQ1WQs2EK+AZtYcmeYqjTeTsg8NZsvA2vq8oVALUctA==","shasum":"47f18a375acfae6defef07d5a7b8a17bfdcc4c24","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105262144.tgz","fileCount":167,"unpackedSize":7008423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrsE5CRA9TVsSAnZWagAAZGQQAKLaNsna3pgxrAKlmfrJ\nEPnxn/4VpoGfzKkWLbPxAeptSdhiTdQhpRTR/aTDCp6B/e5+f9mM0i1T9xHc\nm0JGrNN4uHk/NbafhkS3NzOiPJVgLHm0Q+azHCLuq0HWh/Oes2Jsh6xwZRKM\n1SUJV1PZi2xPATjngoAMAaZt7Iyk7tj6Hxl4zpjUdXPXVFmT3pYgwTIirQnj\nGuevqE2sqElgokpWuG376EaR3e/INlIkCkKKS5n21dP6bOvuzAcLiYlAYro0\nRzTDTdfGw41hHTlqpuV3cI4JMMF4lik4BeFcvJ/4TR+xSjQbG3UzoIR1PlxJ\njwSPvaZKfAW7FTTy8HGgx0/KxBkJXoOGgRxYOFN3tEs/F1QwrbV8j7OWr/Qx\nfR87uTQ6kho0/Nn0N/p+2KVtGREGL8QzRMhFKj/5/Ryv0xsi/LZoYl9j3lfe\nV475j8jPqQ7pD5whKppwW0DM0QTiBaQi20za6Fm2vWQewc/UZTNVR2S7LenM\ngDsxVA8l840LjsCwNv/vFNboqASIl7HPh1yBCBReBenKmfg1gH0A2OL2fdox\nU+pg6L4srjvxWZK+v4vbQqvokGcd7g/Q8HU1bASHL3STVZ8pwdgHi0q6YyOc\nYcKA7etybcsA/A5nM6ZdM13BTiGhKoxKcc+DKy2P/AiewT/n241zRDExhGs/\nK83c\r\n=fgFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKS297WBXOov9NuYqsYch1QWrQ3D1P954mh7F6mTVAvQIgFn2Mz4+1wva0kYptmYQeb55h9OhAO21ghdrUe5xvah8="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105262144_1622065464431_0.35474284657227195"},"_hasShrinkwrap":false},"1.0.6-alpha-202105270150":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105270150","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"da28135df28ebe7c68147d6d8a6a10f6006ea538","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105270150","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Xfmyd+Ix4Lg646Lg9ZvQAHLJq4vX2BK8ZpRkK2sTTMBpB4GHpwicNn91xzskpr3HmelLGkBzm2R0eZ0UF7Bucw==","shasum":"0cf8949408bb9e3bc5fd817e2e6fb8caa4ab004e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105270150.tgz","fileCount":167,"unpackedSize":7009070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrvreCRA9TVsSAnZWagAAPmEP+gNc25jYPxSbyUqCZtwm\nmjMGfGQON1Cb21nfBKTyREhNW8qpmZLTerwZ4jdyBKNZRdKBVCxx8x81wrGL\nju3orRjUxzJSZxYTsZRM09F1WcWw6KNw0qFQGLVxcCbyM7cYgmoZQQbXHnoe\nZThkgJRh+kl8LQwz8MTdkof0BHVB9ggC9WVjc/brASsAMkOt8NvvxRMLb2vT\nCzBCAXaSnaC6DszPZQWLejVbtwW4oUV/Us19h7XFeYqmjqTF4dZ+Vra/bWPS\nq977r3GSezZnNwSSILtfaxKtHjgK7hkdW7HHkQQZ32APhUV/Q0smJHNvpoEM\nGBIyyTRZ08vrS+I8lpXVSydXgNVKpDrUN2igwbOMILreyM32IXSUDNbQnSss\nKjddMfi+zdmC1IBR25GIzLwr8tojoDAtYrPw+lOOvidE3dTXtxdMpyj4Pus1\nWtmdDAw50vPq68eHXtQx5/9JC8qYsiD+yUhmEL++wv6VLTJ/voV7JpEyBfr4\nY/sZ4YlwxDsfRMndEAz0VBqs1nNSa6m9N/yUrtwsPpcOk4N6nTB4x61w3ttJ\nL012NZ7looVRma/FTz8ng1lQ3RBVyV13SNaa0NFpGupc3Kpt0Tui4EhKBgLw\nNZUecp8z4albzfKZf2AlpTJsuVSkbuc4NYE9nw5PivcfNRxKGdxXTPAAqnPb\n8HfY\r\n=JFoy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmfhbwP89ZgAnWkzPYfUlCdUBn3Q6fCniy4Fm35RuQ9AIgNdSJVwodazuOCXnDfmn98IQBuGe6QcDGGg8iTYVAQbI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105270150_1622080221568_0.0016699740287662301"},"_hasShrinkwrap":false},"1.0.6-alpha-202105262326":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105262326","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"e128b6c3dd049481e0082b8128ebb96f5f971583","_id":"symbol-bootstrap@1.0.6-alpha-202105262326","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-2PVofcBC+r1rqYCaX2322EA1A+bUc4PO6BIXZtJlyS2ZwLWJbyMqfrk6/0utWU8F2gTpnWmH8TmEoChPJr1gZg==","shasum":"7a68031b2b100d648150eeb8761b1091ac23e264","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105262326.tgz","fileCount":169,"unpackedSize":7023831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrwNdCRA9TVsSAnZWagAAK2YP+gLTLiczQbPOIlCJ+WRJ\n+cGLwXjC2CF2q6g7gLvTitUQg3oNMIWUhvM+MbNIBbfJkrIDITl+qh2oY3YW\nKJgRyrJNtyP9asCIXIYRi3f82udmFvPCCy5mn4Hf2I4+Yl9KuNoU/eVJQKBX\njCafJun6BWaWTQR7gD/xj1IuYfmEUNFk2Cv30g3KfgvHpkvImKqPM2VrYDU/\nybJtkbyW/H9lAozVP8ta1nehrakxGZGP8brJHTqahgLDbCnxMtJv7MwAlepP\nwXtsNuNjbqwFjuui0U0bSgOdKosVjdU0DSEBbe3cwihDKN5n/BE+9Pue9Ju5\njWjHxfUSMTri3TxmhVIBl6Tr77nElaSBa9nSkKbbgWLBgvwxIBPvznHF+N/4\nuJl1XifJ6S++NEBITNMZlWVY6FkB6q5LOd1Ci+O4kOWZvvo3btUupiK5gD+M\ni6fV4XHsQiiyWf7BOh1cSAPRmtjw80zCPvVtpFnxMh/ala97li5sfurJcjDk\nN4pEU3nLx7jveXs4C2buxyBTdbQ3kDLt8IMir0Lw5GGC4ZgTCopycj/v7QHZ\nn17m9/DNCfEOZZtb/kWEwPVEsvK0Mg+Xd75VOUs8zYshMDBF426lHYsjaq3y\nkts/o5sxy/XR8cATU6f8fFCQxb0aJZRiHXzqw/LKz8PriJpz5+l7IYVxCXGL\n7O/n\r\n=Q3IN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+NqF9SW0szatTjwnvunX234QVBWxuC7ipW0q2Fc7pIAiB48z+Vx6Hgnik/CVsyhibUwfbFihp1dmQvpL2FcFrgwQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105262326_1622082396862_0.23288767118986997"},"_hasShrinkwrap":false},"1.0.6-alpha-202105271952":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105271952","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"cf022c9e200fb804432823b8f9efba57ac225507","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.6-alpha-202105271952","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-nFioh6WwXsJyOEpX01wd6D21wgEJVvCZn7KatyA6ncSmFUX4/Lt9UFnvSjI7m5bx3hmjyhVSc92P/CEVe/aT8Q==","shasum":"b70be1ac12ed6ad5467239f1c1cbfc6709c3da29","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105271952.tgz","fileCount":167,"unpackedSize":7009070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr/iaCRA9TVsSAnZWagAAn0EQAIyqddXltjleG9Xmkrvp\n8Eiyub9jRIKN2BvlK7MGGrVsmg3aOXxa5okUf06jiwLfTvonSwBZXIuu8547\nPLP5r9ObBf8FC8dzPE2KCcWAeYYH8OJcg2bUIB3cSePA+rF2QtTu2Id3hhOo\nm0xI14KzkbY120s953qe1cM1kBd+FiHE5jTZM2KhTNcgF281Bn+qiBeW6Ac6\nS6/fdrUm3ZnW/0rdp4Zy+HP0ES8UvztgzaLficPIgA1kZeObFEWHu5+vIey9\nIz7tWHBKSTnCSGGdQlUV19EWEykQu7Kd21Yk6ornbmMuqTuBNwWLf+1WFUqO\noDHjComfGbKSmUTvf5aUJ4EmtN5CyBbgsP1IXoUNyAHtldMjYFWPaNLfm0fG\n7h9fRZFRmAyktp7Ic4DAK8U5MD9E7Ny3nmPVYuEaX8PETcpxWS4sOToI155o\nl8zu8l+3lVB33QWzloNq4Q8AfH/e/9xKfk7GLi4OxeF/vNdKLdaxd4ZEOaJn\niDbFwrS/M+07YGFzrIsi6XV/9sB1r623DQvh5r59l8NOzs6zbBhH4fTCj3dG\nJR4pS2V42W5ZmRkNx2Ij56tOOuqHjudiMBRo+aT3bZlOwDghBrFz9c7ZX6el\nP+vrNKCQ8YSZet7DZ3aYk/ZakcpysJZmZ262SNpg2K7WYVEFUTrSOStGIGan\nxc6G\r\n=f88j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICsDWxgK53C+uMaXD3EQnfqAh/qdYb3Vqx94pqzD6K/QAiAi7fk7S+8AoGj29G2/wN0O8X0qeu67NheEgNLVoouhow=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105271952_1622145177505_0.7885244021191025"},"_hasShrinkwrap":false},"1.0.6-alpha-202105280712":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6-alpha-202105280712","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.6 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"36e2b4ce1b1c9e5ffd7f9ee84c20e7c169a2c416","_id":"symbol-bootstrap@1.0.6-alpha-202105280712","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-+FiE+tOM/eo2EIe34doonyFFib+v5kGjIsacEEvdnEtwfplyOqjcIoQK9gruOG/8SIrMrO3J2U0t4Dinv5oA8Q==","shasum":"85885a14d3274fbe7f1bd83310c9c215f0678530","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6-alpha-202105280712.tgz","fileCount":169,"unpackedSize":7023831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsMIvCRA9TVsSAnZWagAAzlwQAI1mQOWjTv70M0VIDSk+\nLbFvtOigdBKXkH0DC3AQdUZ/TgcNCDvCU4SV+dnKq6dWxeojmyN4xabZLTn4\nLEGXjkoNEJFsDRzIkqaGY3apcXIHieuH49UFUqNpZu4HhCNcR8Ht/L2hBsKq\njuJcsOpx3EgCS5StbRXL+E8Pra8js3ZMpRBsqsBTYT2SuMasAq6K2GHHJNlS\nXch2EDo1+GnBQQFJMq2wENpHEBRUKM/tBKHMrz1QQfcj1fla7TtnHvgVnqFa\nQPQ9Nxx/E1iPsanMfKgutynp85LUL6pntm6c3r9a03tObgZ9uKIvidztO+/o\nxFp21D8yXEP/ngxFTJBJJBbolzkraWapVUKNUXP+docXXs9xc+xl/uaEeINL\n6gqKgFwZzpPbUNxQ+zm3lCLMXHaFhml3MQenYj66uno3YvZdY01YFEVNMrNF\nbif3TuE8x4RYAgVRVMlEgu09fdObGHDkqoxsSIPa8OuSQM+/oApPU6ygMeoQ\nDHzMc7ZlufRqclzdDekUTGzELk2K9jLwQEtnE2egEWuCS9X9+jG7CeSs9TwJ\nQykbgybCYZ0sTJZ66jJKhLqli5XAGHeuoGDWLXh7eS2pok8cdA6GSYYCVDTj\nVhCR0JvlL+OhdbZyKTGTLBkwpww7fELLwbOcPXSnbDpM3EOVCVFYqFmaaGiA\nKSsw\r\n=3kKh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfIkHuSQsNYksZFXHC7ndmIxwHUA6hO/KC4z1RiHihuAiARRgoAr7ElRY6750mtkmyt/I4YqSWCDxwTlNmyeRM3yA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6-alpha-202105280712_1622196782883_0.49442998081294176"},"_hasShrinkwrap":false},"1.0.6":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.6","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b8834305ada9e1165a6201efdeb5acadcbd8e480","_id":"symbol-bootstrap@1.0.6","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-NqNI33JBhkbstEBXcqC3iFiInO15Thy/Cx0Jvmtj3aN6Uml1UjXIDQCuK6c6ly0QBXQEXxdvnuOp63YeWS/DrQ==","shasum":"33063ad02af307c5201d704fdad2211c273d5a92","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.6.tgz","fileCount":167,"unpackedSize":7009111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv3lVCRA9TVsSAnZWagAAe+IP/0XLjCTW0tja3GwGufHd\nV/AMCVnBk9i45wf6TB/9aERao+FbOUSohDAuYfLktMPOuHM6AQVlYquLWkSM\nYqID5KaqDG8b//9Nb2tM99mqaIyH8/hXmpiDMgv60aYmv5oMuP84eot0MUep\n5XnIz2/lFMURKI3foTmwKA/c4XNLFXFNfuLWSvRSDn6E8F5lAmx+etyt4Vnf\nOiIJLNHdIOaOdRail5du4h1LVDDMMC37M6w9VvqtQo7x2YOrQ5/ujl0mVvLK\nDlW2OzUcxBRWSA9pfK1hXyp5X5zOoKGfE5aGXsfT3mW8iiFMuCWZ3usWjP7f\ne9cPZZcR0S8ilx7BfJGD4KPXoV2ejEnfbh2wL24gB0/r5k4JNLlHibxcmyji\nGvetUVu9EyzKLwrCuN/OjlVANJTvWSwD/S+FPVG0kKVAITzQwsxB4AJ2oBx+\nA64c/XVVyglLaPGUayHBUHxnODQZcSxnRPoXNyBCTgLReUw27iGYYkKh8ng/\ngQb+fro3r5yAxm5RfeWRF8pwafyV7+kBb1EZegsvcXqKt55/N76zprxcWLho\nDkSNm9oCpe4OFSGTnQiUMb6rJDSslMfhdDFxD6RGXZ/VjpZ8P1hjU0fXuybF\nNPCy3O5JZfZUt1XJj++zrivZrjiafr1ZoBIREOPzFswzldsP6sHajQNlg8ka\nEuwl\r\n=Mym9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAzoQzZIbzbyhDPT5X8ARpe1gqVPFdE/k/VX+kfYW6/BAiBUV9JVQamyoWuY+jlc3vHIBBiucLMRohBfg33fSzLqNw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.6_1623161173209_0.6026980943393685"},"_hasShrinkwrap":false},"1.0.7-alpha-202106081422":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.7-alpha-202106081422","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"7220f2e2bc32f3e57013a69ddcca18381358ac7d","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.7 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.7-alpha-202106081422","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-NR42GFC4u8Q2x4GX3DfVDttKwBFdMQuJkrylQZcZUSW7PKul6JKD3vcYCX4625Tczx8gxjXQs2QlPb9+CVLjMg==","shasum":"7cd1804201096f54541dab7bd98ab5340eaac3e9","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.7-alpha-202106081422.tgz","fileCount":167,"unpackedSize":7009168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv31FCRA9TVsSAnZWagAAp7oP/3oFlrWtb2Ov82g1MYSx\ny/fnilVFIBMdADkK2440VGZySexIFcPAbOZY6BFva7sD6W4P+Fqd5QEataim\noEwl9Z4qPTmqguG0XbSjqmcSEQXXgHvyDCzWeTlZqY7/AMJo833vhRaOiuZK\njhVMDIwMGCKXtqGO6VGl2bo2pDbMGG3asl4wrNoZznNtzF8BilWYmcGOk5Ge\nPYMm7T+LIJjI38L5noCxrmtPUo3mSUXGi6/1GS/8+M6kz/D2bs4VHaKQ2hHP\nCqLi8/wNR8BfRN0ytqCat6rPL8Tvg1iz7RS3ZYvpxSD/nmk+WivzyMUD+OQE\nFB37/ALk4z4/CPNgonPRkE7Bz+Ckf6tQfQxah18xkhQSZ67hMGe7JE8jcNeE\nCaRetXK3+DPZUmZWve5XWwcPd64rXsLzLfZH7TaIFHJ3fPAQpsSOh3wghT3m\natuiwrbH/ycqV+tHTCkvYKuo5QBfxk8gwG4upCB8NetRszo3Q+UzmxbRDhfL\nvnAXJJcEUTxO/9GCowz+AMFygmfnKYt7QZJhxqspcJKEQRsV6MW1+o7xKrDr\nHMsT6h45fonA/dN2fGbpR+xRGiF/YXVAHhqux7RTVFPQvRYuZsQcaro2buwq\nmGRZfS2eDNUVEyeYXhx2cgYFMlIEB0JKI5z6ke5tVjYP2HxMCI2+bYokKjBo\nLTW1\r\n=vKe/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID1GP0GL9Lx2rFCrLli6cqdIKMCoNSY5msQ0yAJWWRNIAiBW1ZxB710vvd6X/ECg5J4SH2wHOOsvx6NJ2x0eA8ZLdQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.7-alpha-202106081422_1623162181484_0.8310343164070098"},"_hasShrinkwrap":false},"1.0.7-alpha-202106081450":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.7-alpha-202106081450","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 600000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"70af2aed1f755cc860be806223be79ff2c3bdf94","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.7 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.7-alpha-202106081450","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-QDgRD7sx8qKZzw5cI7/pr2FrnML7IZNQgli3b4FwC/sEtirw2DJnLP4zu6+x6HEgHUUHJJZRWpVSktFg3iudHA==","shasum":"b7914d1907300a604f004696bc5b07bdcf3f49b3","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.7-alpha-202106081450.tgz","fileCount":167,"unpackedSize":7009520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv4PMCRA9TVsSAnZWagAAQYEP/A+FnEcO4U80BrpvORi/\ncY7J4iT/XojkKwJ9jGzN1RPAKD8Rre2hX/8h87L/phM34PuPFMPOcABu4RV8\n/vOLkKs6hKwnHxV+TsKLXncptnLhE01flUm0SnVDM8AR2J85i3quSyga0zg6\no4JyyZvBRNGmpzk7AP/DLhQRVR40XCwlnuE3wjy3Z454ypblf1aoL3ePrwzi\nn+IMAdEQQ9SlyfYN+YnMpzlk7ovH/sniMzlicZ7wmc/Yz1E8zmVCkXKiXAhF\nTRwqql2V74vLFCa6SioTGInFwQWVxdnLvih4csJvEShoeOVGJsRGkX8LL37q\nyPkziniNo+fMxowWVdy2O5y7lf6+0QYCJZoXY7WZJZhibu5o0JjaRgxYrQxe\nb9DqcHE9UzrtM9FS2/Ctwr3gzujc/YNyVo2KVqjfeA8lalAZ8LbXPt9UCtLz\nwikHjx1mydiyM1e97fmWlnUGMFOCFMgF+3pfxNv6nNLE3Np7byx+H9VHmOY2\nCq1v9SPeAAv4tHbakOtzYPd+kN4IR522UO5nYw5pfUKegRmcR6DJfS2WEKkv\nw0f+xQmKlNk80i1SCJqDyydDW3FM9olSj3jGKDcCyjIYiU8FKPPKAz1CIHWU\n+bF6lwtIgazi0ZBfa9MCTK1uOyqfcVZ2fQ2brV0siwvHc/QUt7+tXXX2Wqxi\nzl+Z\r\n=FESD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJXt/u5X2uWlPQwlIaBtnMCDajk8b3XCn/AZBrw2VfawIhAOR1uWe6Z2JgG/nDrPwpC9V/L2OLfdgj/wWCrKWYM1gB"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.7-alpha-202106081450_1623163851868_0.9363478146851059"},"_hasShrinkwrap":false},"1.0.7-alpha-202106081515":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.7-alpha-202106081515","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=8.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.7 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap upgradeVotingKeys`](docs/upgradeVotingKeys.md) - It upgrades the voting keys and files when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"cd51e8a5e0cd0e5f629906a9bf257bbd6401031f","_id":"symbol-bootstrap@1.0.7-alpha-202106081515","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-jwrePjGzU0RFUdsvJqljd7ZOTK8QPFELjSI/TRdytWXTdwSFi1PrqioOBjacsCDpW5Fnj6X1FXszPcH7k8rAcQ==","shasum":"71d342eec04cbbd46116d76f19e52ba3c1ad04d6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.7-alpha-202106081515.tgz","fileCount":173,"unpackedSize":7034814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv7PMCRA9TVsSAnZWagAAgBMP/2VjqHpAe5dWFdmMc3a6\nCOdZFfNJnbGux8ZJ6iEHXqW0ovxAFt3RnVu/i5UK1vtDnH689QeXK3mXcxlz\nxTYvF6oqlqtmVRmjNraA39duSu2Yho8IyEPkB1oRi+ZFcKuS16faUyAcbb08\ne5piVDX0ltOSRTp0GbeaS2DJxNoY+hD/G1rqDu+DlR3hzmPQSljIWXmps6Ra\n5yt5fhd+q3IwdxNESTqPRvbM33cS5KJ99VfP263gUqSo4sZoHCDNYsFcFmUH\nrQQTATkLukrHzV+KPtgvYaEAE5yn8UtUMb+vlBO+S+UyF7JdWj/jeID+U/Ow\nKVgI7kVVRxeV8JzaonR3FAlLPo3lbcC8LuiIKwCQBqbJ3z+LYN2vKJMipnhS\nN1H9poELLFJY5rT/lCvSNyz+SqcrCc9+WOEZpnazKF4jRgfjzbjD3mjuIG/K\n6mb6ze0vTAQZeud2buitVTr/03SDfe9P7HEElE4Bkj4TYNCpdfh/OAa+7wFH\nDfLT3Q9HW1CYIwrjrQ/6x5tfSQ4i7IwUA43TshopmhC+7kjhM0qqUSEIkx+1\nePs0G7sDgW8TdUOqDH6BHUMASNqYzRewWalbnCsAqL8/ZAqic/MKEXDR9kTQ\nWD9xfCyiuKJHEM2U4H9gla0Em/bDimFS9xy3PrzD31W8KjtpyVqTv4giLI3O\nomjN\r\n=BjG1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMdCY8LWh40pR8N/R8VsvOSvGknfcKKERlsNKjBuY7pwIhALLXwokcaYuBbNeXGVV8bF0FNtZFE9XYzFJ67GsO/MAr"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.7-alpha-202106081515_1623176139838_0.07203409372923053"},"_hasShrinkwrap":false},"1.0.7-alpha-202106161736":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.7-alpha-202106161736","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"78476535f9517410b37cc9a8d08b17b71bd4cee9","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.7 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.7-alpha-202106161736","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-nlHyu/QG478MGQ9yeN/LsHK4jkqf3+UgBFUbDLkwwJDFE6BY7PbkMEB3qfyP6GJ054F708sScQXm1H9aa4r/jg==","shasum":"a25d9b145546b059a91b0c397208ac294d622c1c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.7-alpha-202106161736.tgz","fileCount":173,"unpackedSize":7038262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyjbECRA9TVsSAnZWagAAOQQQAJbKAkRCr3c9NzINVzhs\nWo1b5+xoVe2xrVHy9sn4V9AtuKF3diD3UKTa7h7SEFTW00mdKFDTTPMVpkgi\nGCXCghPNk2hXwz5ZXJiO49sO+pVmt9umuOz1+Mnm/rD+ARqIoN2OXGtxDs1N\ni/WEH5EsEfqTveEfBMvJ/z7lKAGKkxZd8tw7D0i1C1Edsc7G/OkZCKfepTvY\nrjcFv/C5lV2lMuEbQhjF5EC9dfsG+9issB7R7lM6oA4lOIj2KlucfiKzab5a\n2/iy/X1hhMiJ3YPeiU+4xPd+m+SkjTtAiNMAq5mVjhrvzwUnD0s92HCKsmh9\nzNqupGebtMEDwef9gxhkhyPrFAlh5KmcmiwSRmrjaKn9uDeee8b0CHkPCXg6\nNax9x0Yus2wcRbMdhItoA/Dp7+jrGCXy5wTmVxa3MGVam6WyqVE8xFkI3SYa\nVY7LML6gXUQsE5VbqjIiwkzdsH/3ypDtksI3cliqB+HeBSLuydawXGdUjUWH\nuLk4xC3vGBFSHbaCRUqgnsknEheTXtvYAgJgJYxatDpa8RnSenHudf7Wdf6C\nu5/ib44+UK0LOR3Z85G1mukxCXdNZudGfAvlaFZjWO1+WYd6gFF/gyXrqxrZ\nltIjWXcgOza8/QBgJd+lxg2rJbmhhqw5Q+K/Ir2CAtHOFiOyx9AF46qnq2XT\nAkFs\r\n=+Mo0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHTMM5usLCzSUV199PLnbsuVHQxMgwwqitQDZJU1eKMgIgG+1jWqYRT0oQ0lD4NCYbohQ4+ETrHgloPhjvk7+5VkU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.7-alpha-202106161736_1623865028115_0.2596653480134614"},"_hasShrinkwrap":false},"1.0.7":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.7","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a3b98ba5fa48b7212a7ee4a78b6364e1698aeb92","_id":"symbol-bootstrap@1.0.7","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-y27xw44HlVXOKVhv4ZkCShaNd8IrbU66Qpk/+8Q8rgw8LMsQwtXwUOdMocxLFF89nvEQpO8D91YsZPoKtqI+Jg==","shasum":"54642e3cef2e99410c40f3cb5193a249a6cd6bdf","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.7.tgz","fileCount":173,"unpackedSize":7038214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0hCVCRA9TVsSAnZWagAAlRoP/j/gJaFLyLvWxOAQf3ed\nnr5FCpzgYtB6jFw8EdikZfjKJ7mXj/2yNiBkiV7GSzfvPpw5QUCWX/p+NMY/\nF7qIwq7CiRva6ITOVmkiZC7xIdgmdGA68q4UGoFtElx/OzTQQAfyywdlR5wi\nj+blSRjWz94VxDdW6StO4P6rD/w8yAeRTsTyGAw85a8sV64tE/5svb4Q4fcP\nOXfuFig9qwqtB4MH4bnSQ1B26KoZWn6vjXMR+BHiELhPGY5c2s89iQz25F82\nHnPcpq6Rg9T1jbMk2v9OGgy8ro3VGhr+QGL7nwEBaqaHuntfk8YTgSxlFsyA\nOFgFMkdolBcXJ2j67P84W99ajZMnEda4cFVVpnzNKytW/46CbgsKbg+Cee7k\nb8zZ9W/Xm+zMjFQqGR5GZ43F2oX8HPvL6duA56KaAnPANa2qGBtxyjnZSMP3\nI+HnSQRpjPbgMiFxdh+Ti+Ov3eWGjjrxlhpK/EQXdiU9l4XGPjmY0jDTkXA5\noluizbDEygXKAf7z7AUyA7ORivnFtSiF7U3PlCHe23aX4ztTTw7m2YntRzZE\n59oKlof47wPZuy8X71y85axvXbNgSlaRif/yc9Fk1iNBX+RN2Sr9VJIFJ4gp\ntBYpzi49mAbshQ83qG+wVmg+inS9DOc6nfhzf2q31bZL8cz4NsqW7y0n2up2\ngKGS\r\n=rJrX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIADW6JA+VX61J+QepMRURe6oxXNUg7gVYcKhy/qaUp8rAiEApMZoUHGtppWMCZCDw7DRupom1X2djkmQZj969NUhBl8="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.7_1624379540498_0.38990158777365314"},"_hasShrinkwrap":false},"1.0.8-alpha-202106222133":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202106222133","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"03fa76c2fce557efc0dfaa48415ecc69a3172903","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202106222133","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-65RRLY1lm683DscW8CHjMe+0xeT1800PUtCbWqdAA+JqfJPQn7pLNKiKHJmMBuHGE337N6lHjSAQii0ANKecXQ==","shasum":"14721afe8c36be6fd819258b3bd94e4f1dede25b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202106222133.tgz","fileCount":173,"unpackedSize":7038625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0ldQCRA9TVsSAnZWagAAYO8P/2vtYprXp7rNZjGsjSlu\nfObKxIr1z1wFsWZs/U96icHWeOAofrMogcovvATYS5D68lSN6DlaAG8boj7O\nMrMpe0xpqAoIGNcLw5AUrpcXwwlmYaBFHlYoDWgtz/Lv7zT8tU/7kiEOon3G\n61V5+t6YA+OWbd2tEBJ4pVAi+odP3qydGRx+NO6OBQoNKFc64CMJ1z1S9EbT\n1l4z0jSvQj+k7KZtzInq3HOWD+uMNxMp2lEUuzfW0b9os4m8coobXJH0a9Cr\n+sAJOIu45Qjx1eJ4Nimz/sRtwTbRJv3V6uq49p5ElzGdw+uqXiNV3ZDdRI3j\nf0EhJ++Ky7VNNmfsoWiu5jUV3bnZoh64EwIj8xSl4sGPmWuZX5wvUSIOE4fF\nOTIFs1wby+3utcIfEX35YCQPA13V9lBUIRqvcegrgZMbR2CrVVJOk4vzJki1\nZZBh4k8wB2T2oprJgKvwvsF/WQ+g5+lMziduzjUMQUIFWJ3g6gGoVbXfpGoI\nzn/5An9tbhbwXCcx14s22bFq/9BMgm+T+Pt2L7KqbzQrIjCJupH9FeVTHnL7\n7OU7VF46HjYk4wG9bd8XSkPpyRxoZJrZBvGzEj9dEmiGnkP7tv0TTNWSoKwi\nITBT9r8njsqrYBjNyau5l6THoP1S7jVQclt4DshQrQEIuRmdLsoolxakutHF\nBQge\r\n=aBGu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwjfNuNHBapqKOcq9wq4oBKrDh9FD5CvCKfmJ4LiNmvAiBKPloYPW7GlV8rvuRvsIcRUXtbJtYYUriMikB2q03UBQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202106222133_1624397648097_0.048913081998516406"},"_hasShrinkwrap":false},"1.0.8-alpha-202107131135":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202107131135","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","archiver":"^5.2.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/bip32":"^1.0.2","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8-alpha-202107131135 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"fc5a06ccfb99be3e37cfe68879329858f5e0d59b","_id":"symbol-bootstrap@1.0.8-alpha-202107131135","_nodeVersion":"12.22.1","_npmVersion":"7.17.0","dist":{"integrity":"sha512-03cOuYv/MF7tYcOwwpSx1nY80x6get0LNtt3OBo82WLUexC7CBy45CNQPdgNB2obNPeS+oLljcHoi26fOqqMmg==","shasum":"a38f7381301cdd5fa202405101f95cd8771bdc05","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202107131135.tgz","fileCount":178,"unpackedSize":7069952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7aSzCRA9TVsSAnZWagAA5WEP/jeaATbNHCHOhpWttAf5\nUsyvZCx2cKUymw3EEJSb/g1U5VBEX9uK1z9dma4ovc0zwMyJlQNjPVsDrhaU\nZmC4DQq/JN0Pk7buNg37BL5Z/n8zQYeVivB7MAwB3ex8wOTrm//IA+hSEw6o\nixadg7UrqWJhnYI36lIML9ZaYw/ZZ6XeO2pW8o3lrZZ6bFOCEqq9+KfiugIt\nZDq+iGDxRGHv2nHgRhhUXiBxddT2pAQuN16wFM0HRS0oKYy87dGJGJRuiN1Z\nXXHISVmsRwRyh6d3UCQu/CunSkh4bU1Tc9W89HMIS2ole3mDUg8oBcPFQ11r\npNyN64MlSn11ImJaIIUN67OGYQxpk/U4ycvOtJCYyYuMM0vMcPncH/gkTaQk\nQ6N47zqnMeT6oFfEGc3ZHn2ceQSl8hWDc4zcViDkHwGOeeYIz9He1RtHOi86\nv8yvFRacVIvvlYTLBUdbj7qDv0d0GxdyXQUJs4EnrBOJChxJiwjaLru/Co6C\nClpFibhBU3at4gUziSJqJEM1HdOaj3j4AgX6/lQ+IzWPFdMTUU/BkOXjjxMV\nfVft6YitC49pn6jlS6N1TDfexNaSmHzG7dsph3gKG23bIXqHrDiaObyQaM9W\ni+eX0BdbTT15p6g1iNPdo/9JPmdVh4HW9EHTB2J5dE5t/GJBb90poKFsLzXh\nP5dv\r\n=vd88\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB09vRdYrIffAs7ybzPcatjczjMD/Irm99A18AFvH/dJAiB2APW/7XSfcJMzEk2TLzWrdOXq5fb3MIQPPTNF+F3Q2Q=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202107131135_1626186930769_0.1851490975477521"},"_hasShrinkwrap":false},"1.1.0-multimodule.176":{"name":"symbol-bootstrap","version":"1.1.0-multimodule.176","description":"Symbol CLI tool that allows you creating, configuring and running Symbol's simple node networks or nodes to be sync with existing networks.","bin":{"symbol-bootstrap":"bin/run"},"homepage":"https://github.com/nemtech/symbol-bootstrap/packages/tree/main/bootstrap-cli","bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"scripts":{"doc":"shx mkdir -p ts-docs && typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","clean":"shx rm -rf ./lib","purge":"shx rm -rf lib coverage node_modules target .nyc_output logs.log ts-docs","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -p tsconfig.build.json --watch","compile":"tsc -p tsconfig.build.json","build":"shx rm -rf lib && npm run compile","prepack":"shx rm -rf lib && npm run compile && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g"},"engines":{"node":">=12.0.0"},"oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"keywords":[],"author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"license":"Apache-2.0","mocha":{"timeout":40000},"types":"lib/index.d.ts","dependencies":{"@oclif/command":"^1.8.0","@oclif/config":"^1.17.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.2","archiver":"^5.3.0","figlet":"^1.5.0","inquirer":"^8.1.1","lodash":"^4.17.21","symbol-bootstrap-core":"^1.1.0-multimodule.176+462311cd","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^1.0.1","tslib":"^2.3.0","winston":"^3.3.3"},"gitHead":"462311cd3c0f5b12e6b812bb79050e9eac1bd655","readme":"# symbol-bootstrap-cli\n\nSymbol CLI tool that allows you creating, configuring and running Symbol's simple node networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap-cli](#symbol-bootstrap-cli)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n* [Development](#development)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It specifies the creates nodes and services for the given network preset.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to created nodes' connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to created nodes' connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`dualCurrency`](presets/dualCurrency/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n-   [`singleCurrency`](presets/singleCurrency/network.yml): Used to create private/user networks with a single network currency configuration, just main network currency. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard api node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node that contains an explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): An special assembly that contains 1 api node and 2 peer only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: the generated explorer configuration.\n-   `./wallets`: the generated wallet configuration.\n-   `./reports`: the location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0-multimodule.176+462311cd linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a demo -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples are running `mainnet` and `testnet` combined the `demo` or `multinode` assemblies.\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"1.1.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n# Development\n\nIf you want to contribute to this tool, clone this repo, and run:\n\n```\nnpm run init\nnpm run build\ncd package/bootstrap-cli\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](../../CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\n\nGeneral users should install this tool like any other node module.\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-multimodule.176","_nodeVersion":"12.22.1","_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-bsO9V2lj+JnR6U49RI3jDy64oHoqN8PgOV0rEauVLi0kw+ET7kp5c6bA3zzclzsZIY0VmxDlRUDHmxyNPTA2Xg==","shasum":"db5fd2e39b19271dc0d9163bafff6124c97ea666","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-multimodule.176.tgz","fileCount":98,"unpackedSize":275984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7u5YCRA9TVsSAnZWagAA9A4P+wZksyPyHiyyaRM4OaiU\n3AnWYI1kJmlzyKtTBog3UWbD8rm37uVfzi7NPWW2Lnf0j7ISmEuFwW09Nm6g\nNG5LmvozFSFJ/++jnMN0S3piPT8KGOzT23BmuOuCTgdYroaeJ7hhR+ZmL9nT\nXK9gQz2GmL/oBE7wATFFFa/yMR1Saae3s4iHcVgMPsz3UkxUmalR1x7pmqXt\nd7lOWJvbKDSYYcMJlk2PQ4c4NZ17jo/nghCta+XZpepy4EDr1n958T5qczwp\nIaO+ImopLkcJ73l13HX4koh3c6g9dLJgTLbSdkQlobTs0Y1+4Lwot3v19idm\nzXtR0joqhmfmD2P924FUaB7Ko07/GLrSyQgGRQYYRr9/WvRDMUd0MzGZjxJA\nMQgXhyD7p7a6CWlSxGuofgEGqGxuOgsQPzt+rzHqGLPaJBM1EIRpCvHAHcs+\nLjgPSUYrdhC4p1D2M1O0USxm3wDnf86hB8lIAJ1bGTAXSMhnXBc027osqevM\n/TFzxorj3NxOuIGM7Yu7elHqw+LA38GOgCKi4LOGWfkBv+EdhFE1uybLm5gB\nAd3bFD3ESdlp0gecEiAICEDcotCm+mABs9+xNjZCEw716ffr8hn1E2x3mo2l\no3zGmZdAcCa2UM8vQ3VCdhmwAMusM+g4Au+N88BN/MXfCq5VQNNMzgvsuRMA\nzA35\r\n=43Zz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAvRdF7W2cnlAvEsrvZJMDWuUPPCWNQZ61LwsAvn3/ZcAiEArmOuOG37u98tS1MEV330frpdaZjd3NEkjjAXOBycbdI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-multimodule.176_1626271320473_0.8471092317530267"},"_hasShrinkwrap":false},"1.1.0-alpha-202107141152.176":{"name":"symbol-bootstrap","version":"1.1.0-alpha-202107141152.176","description":"Symbol CLI tool that allows you creating, configuring and running Symbol's simple node networks or nodes to be sync with existing networks.","bin":{"symbol-bootstrap":"bin/run"},"homepage":"https://github.com/symbol/symbol-bootstrap/packages/tree/main/bootstrap-cli","bugs":{"url":"https://github.com/symbol/symbol-bootstrap/issues"},"scripts":{"doc":"shx mkdir -p ts-docs && typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","clean":"npx shx rm -rf ./lib","purge":"npx shx rm -rf lib coverage node_modules target .nyc_output logs.log ts-docs","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -p tsconfig.build.json --watch","compile":"tsc -p tsconfig.build.json","build":"npx shx rm -rf lib && npm run compile","prepack":"npx shx rm -rf lib && npm run compile && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g"},"engines":{"node":">=12.0.0"},"oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"keywords":[],"author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"license":"Apache-2.0","mocha":{"timeout":40000},"types":"lib/index.d.ts","dependencies":{"@oclif/command":"^1.8.0","@oclif/config":"^1.17.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.2","archiver":"^5.3.0","figlet":"^1.5.0","inquirer":"^8.1.1","lodash":"^4.17.21","symbol-bootstrap-core":"^1.1.0-alpha-202107141152.176+a8a49b9b","symbol-hd-wallets":"^0.14.1-alpha-202103052158","symbol-sdk":"^1.0.1","tslib":"^2.3.0","winston":"^3.3.3"},"gitHead":"a8a49b9bccaa00781b3ab62b6e814c524b3aee84","readme":"# symbol-bootstrap-cli\n\nSymbol CLI tool that allows you creating, configuring and running Symbol's simple node networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Build Status](https://travis-ci.com/symbol/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/symbol/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/symbol/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/symbol/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap-cli](#symbol-bootstrap-cli)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n* [Development](#development)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It specifies the creates nodes and services for the given network preset.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to created nodes' connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to created nodes' connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`dualCurrency`](presets/dualCurrency/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n-   [`singleCurrency`](presets/singleCurrency/network.yml): Used to create private/user networks with a single network currency configuration, just main network currency. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard api node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node that contains an explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): An special assembly that contains 1 api node and 2 peer only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: the generated explorer configuration.\n-   `./wallets`: the generated wallet configuration.\n-   `./reports`: the location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0-alpha-202107141152.176+a8a49b9b linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a demo -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples are running `mainnet` and `testnet` combined the `demo` or `multinode` assemblies.\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"1.1.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n# Development\n\nIf you want to contribute to this tool, clone this repo, and run:\n\n```\nnpm run init\nnpm run build\ncd package/bootstrap-cli\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](../../CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\n\nGeneral users should install this tool like any other node module.\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202107141152.176","_nodeVersion":"12.22.1","_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-+kvDW45eEKpdkQm6LVXGqW28wBoA3e46/0AQ2OVaadQHeRxbuit015uxFrCo55BS+GTQRhuQKey+58VhMFDvTA==","shasum":"857c9a7ec45584485fee9cc95ad94ae76a8af59d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202107141152.176.tgz","fileCount":98,"unpackedSize":276025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7vpFCRA9TVsSAnZWagAAluAQAJz3b+dJXPlyqF/lcflw\nRhWvT/1HNNz0vrww/0Et+CPtDKc8E/7svuZNyQs6OVqCKjVIMVeppa/g9gWO\npT7op2Gcw5d5TvHVUUF9nhrvqspF8Kj2XavFCpfPCdSPBKRRgyI8UV2nkazg\n45+BRETrBwDnam6wBj9KF60DbdB6oygoV2EOiUxGn7FtQmy4JrlkZsUJPKlV\nnFbBiUYtsiLTNIXGFgQ7+IFdgPtk3jIAK/pvrtiXpE+PrWNeTMpyD+ScWJCL\nF518nOXtDhGUBoO+DC79FRrxgfT5g5O7l0pv8Ll/jlr0U3wCK+97V2vki66y\ngeoIeKPW6LdtlbDMNZ3KTeGvk+4fajG2nUjFQnpd0fXRrIWXcqQzijIRQXMB\nJBtIELrXr85pjIElaY9TGDgkv7o+6qioAGV1UbjECNG8i2wd/YnInZhB8NTl\nQybHG/J8QOkIMcRSbPSS2YrlDsbY6Vbf9MM4oGODZvhsnv5NL5bUc5b6mnsi\n7I5NEXmsZom0NyFysWTWyQw1fSFqsO9D8DAM54r6ikrJMZuvqhVqJ88zAS2t\nKfrYXnLVPU+0wZAnYZ83iJbgtJLQfVzv4holC588rKnfU9Zgn2TL4fiBgMfZ\nijCcnl/st4KOFlIFxzmFELF/Zmfn840Q69Y3Kwbnx/9wZF9n90Q81Tn+tTKV\n3ErI\r\n=kWo+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCF240qXh6eKT5vlbyEZ2U54f83aytHF6QgDaTJsRY05AIgGmhvHSvWpE3mVrLc7JfzDq/CJgZB8Q734CXfuxX8zIU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202107141152.176_1626274373204_0.7883416934995189"},"_hasShrinkwrap":false},"1.0.8-alpha-202107211346":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202107211346","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"e6b474ca037c97a566dc9687fd1c8a13199c1b60","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202107211346","_nodeVersion":"12.22.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-xUB5HXRjjxvPVBpFMOg6MTqBD1Og7yY2UQ+SheBPjxjZmciqCdFl/eXvDHxYxlG+MXTWdndp7qQoAHROZwrntw==","shasum":"ed1111815dc5df2aa2c1b1b8b3a39ebd3854c20e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202107211346.tgz","fileCount":179,"unpackedSize":7082951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+CVHCRA9TVsSAnZWagAAKiAP/ReNpVffTzsv0oNRp0qe\nQBAvNmis46janddHYDnYNzo65u1qSp8R3bKV8juxyApPjDLM+Qbd1XZOlcOb\n5+Sh+UnwP+ak5qjdct57LFXaU7qzpdum4T4lOnTCsVYJsK8VaNULczUPKJQb\nDDu1s3TvfdH/9qnpZ4P17cEDjqxfXqT2JXhCVlBveE5+KS24kpRFYM6lLaX5\nSlMQ6ZoixSuicbfYK/DUFEEOcKLYwLI3tRquiRAG0lSq6djqvMf77vJcn6vL\nYO0x5snT24xLpWzpInm2W0vyO3mN3L8TQi3sPqA4VmBCTV2b2kggnc0e3Xgo\ndro61umvkxpPRlEltiBLlLvhR/zP0Hvs2ILPzIXWiyrIScXjZgjqtFNneNjw\ne1kjYsZQ/tGZjE9Dvl6mOQqw5PYiGVP3AVZAWW2oPompUjetubevLqztq8I4\nw/DTH90HkooFNn+182vkZ7ZFO0Fnh+gVpc3h4jkx8KDmfzbyGByfUd6nb4Zt\nJhAbUMkJEzEKrWmCRSDYGGgNvN93xVplxHmHFbc6HNasVV19HxdJ0lVF449K\nU7QwFkB+492OYsHZxNieYouE2mIUJe1EFilASgN/8tO1N2Kvk3wFJRC6bVAh\nBty6HDTcDqt6U0znrNx2fTxJnP0HS8oMGHO7L91ttDqxNekzFrdnoqzLtD6x\nQKCY\r\n=6AET\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2P3+WjeJ33jmi+CNY888+2727LO/3/dqobW19hbwW0AIhALDJEHyBmA9GSDYTdfJGOZtdn+jITZ3bOdur0PMv7CUC"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202107211346_1626875207606_0.6852129957272699"},"_hasShrinkwrap":false},"1.0.8-alpha-202107212001":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202107212001","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0db5c74a47d33f687112315f07abd85c8a3f45d7","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202107212001","_nodeVersion":"12.22.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-KrOkgwGu4ObglizTPoJNPQD2sj94QGczd1H4D7nyEVY+mlvn2L3Du0a8hZERAsMXOC5fHY5axVWS2FjmLFs4bw==","shasum":"b2f6c8e523eab1c35d2ac8e0dc5b2dcbb5c4710e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202107212001.tgz","fileCount":179,"unpackedSize":7084163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+H0QCRA9TVsSAnZWagAAVFcP/i98rDXtPuGFrnRQWRg6\ny3Yy8xikXQ/CswSBwYdx3/wXJ9agZc7IVeTLaB4zjTPxCrZKOlkzKYq74csV\ns21frLD0I/8Dj3/+Sg9MlbzZQjG3941lEwVE0Ea3+IMvdXCkzWJKsvFnDemf\nNGlY2d/DQ95mzU77iTjhCdzXTYIIBxu8QLokEkDV/ov41nwNXORYwAbZR3CU\nKU2XTduLV3fu9h66rrwZ8I9eHkqVSyLWOFZsnQmYbC5DUOnULrsq81oMRwdb\n4ctnVdcf8zXSYXMQjcT/9JgZXUPygKy0RCdeQkLYRAmar8kgkZh1b/hbgjSR\nZYa4XIM8IThea4mt0+INo2Twf1qENMuy0DHuS7n1zrcTZDjT0nosjHCI1tMd\nDoyDlwmDvFZpU2IoQtq/qNiY87X1JuVU5CeZwR35d3C7bzxKyNTMVfsSItC/\nshUmKfYWM9Rxiv/+fQQ9jBK2fPs+TH9BzgN4kL4VUfSPzmDs/AnhgwUoBCi6\n91D4cQBnImqmHAcLZQ1QhaH/AWI9+w9jiyRghbnIzteK/mkefN3M1eZN2Z34\nZawPv9kXY5UwAQYzVGQrHov9MR0ISbo/oiA7qnQg9jR5ci75aubg1qHChyyF\nCPEszbatwO7CucYLaR4a4C6eTq0MR2bs7c4SXt0MJVwtG3GMq2DVoA0XI1kL\nfwiI\r\n=vUnH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3dUFOaQNa8A2qtb6KUG0eQO3fhwR0pXmNisGaXjYnrwIgC9otUzU6qKz9GdOFMfe6XJ3SLYNHn5mKY8QF9xtsuiw="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202107212001_1626897680212_0.9233216354872669"},"_hasShrinkwrap":false},"1.0.8-alpha-202107291804":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202107291804","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5777deed034267fadfeaa9e31799f8b18fb009a3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.4\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202107291804","_nodeVersion":"12.22.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-8HzjM+rfOEmo9/o+6hpmvPjRNQ2Z4U3YEQJop0FuQHhvubIB4DChq8+tFVWDUhxhYg2Zy0HcSdWws+4/9+m9kw==","shasum":"94de6dfc2737b723e7f4047311adfbb0610f03e0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202107291804.tgz","fileCount":175,"unpackedSize":7069089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAu2oCRA9TVsSAnZWagAAOqUP/jh/cOZ9pOY6F5if/P3+\nBHXlRML852J5fwBcPy5IyUxL3pzhMz0nYe8LP9HlRhWe3h02/EJeYuoMhxAG\nl3M+gDWB/YT2rY/sb3XkfPapSCSqXHwZPyzt5tYLHh44m81wF4e9rJxgGUWt\nBDVf0+bOiONIbGwyE/xHc1FtXILirz50jiP1U7XEtz63qfbJZihO/8KlvrMI\nP5xJnDaqUYIo4WH5CX3M34pDnOEaGv/Y/W4YMjCt/chJ+9hoemdbQAOdhDvZ\n8NH4XsGDESuTtu/o+IvwEYHJU1IsvenaJzXylW3Hdx6X3KnhYeRz0mLWU6T8\n0FPhJzVSJX70wnxZDf9pTa6mrSPZ+BxKmBC9mEWYTZisYWFM5kufl7LA8ddu\nbZ3mWJUXvads5rfh7xljLzP53yCihYdVrfpx0CoUZ7ar/pIfULutX/wJJvCA\n7DzfiVb7XTl65TXpSU11cHbptkLWyBGI7x4UCrDliimPWZvcUDPCiOPrKsb+\nQj287IHeHlA9RWLxKtygzZ48pOiCN/HZeNDU3umbdUnMvYFzS04dygsh/hfV\nJeNi7TFVaX2lrcO8VftlTyKVU6wr7KZhzw4fZsVWrlLdc7aj/G/BNOPHbpuz\n3L8xlQK74N/uoQzpvrCSuIMv1p3cSzXvgNFDF1qDQGbarTaLV/Y44gZ5tqTh\nVdzk\r\n=sdeb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTvds1aReRTQmYVLfWrSgXH4GVKWUKAzkSJOILncuN/AiAm5PTbEUjJ3zjWvIQH3kZ5l2qjr5SDoZCm9oRlAbX8bw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202107291804_1627581864544_0.0539145091152784"},"_hasShrinkwrap":false},"1.0.8-alpha-202108132130":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202108132130","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"c7160bb7ca98f5a127dcc40ed05b65d295f04f80","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.5\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202108132130","_nodeVersion":"12.22.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-9zTs2xAd/pV8c+41Xv7jmjBg/D7JK6Vzt2LG/HNdyfeWGwuqEK8n+aN1lbDUQQmLR70smFsuS3ITYvAFYTucmg==","shasum":"d429209c91269b9612aac2be9e450dceda686654","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202108132130.tgz","fileCount":175,"unpackedSize":7069178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFuSeCRA9TVsSAnZWagAAwoMP+wTmA6nAHc+LvFlVg9N3\nBNgUt9VZD3uNWYx2xXY9Iko8+wnucL2HYB8aRDd/B/eXfdy3q8my01F1bePg\nf5gdlICUqr1hQRtDQ4JtQN22diy51FHIj3aqRY6pZkQBMzVob8/Uy7muT9qU\nLPT36PORnG4kuaKGguAB1CyuUs34/xoGyobIJUFlqYLED91gSgKPyMcJOxnM\n2vZQ0vydHGQScFPS8oGyZu4IDkCARiyAAtTRA6K/wJT70HyEDJsLLKC3hDC5\nxz57NaLea/n5ECdTzkMEnlZDMjsuDNdIHmPT72/DGtvsVzRUPy3/uqAz+RFy\narlULIGpOFNVEH9Rhz7nKKDS1SSaLTVoPx/6CA0GoaR+D68GFDLVur5AOux8\n7K7iqAafg5UtzAHn0RSF23B42JpR51TFzfdveChMEnoWxYcfz7uyXlplcKXN\nGDvUdb2yk3IfsG3leHkBZSwTuqwV1BLd6ZwVjc9bCCAuj6YpuwK6rJ+3qgb1\nxrQggi2nAhRG3HVVeFXizdwfuj4Qm8Nx4poy0+g00eFZNhE2g2W7osSEOX/q\n21NFewzZXOK9kfvtTaNZsrLF4DyDcYVs32PInE5kszwOoIbPagT3EfofJmha\nVxM0L5rqZx2UdSh/h8KTYRfrEmdB/bQcUpgEZdLCX+zdAggQY2Q5IH/hHrjv\nDrpr\r\n=sfN3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZKi7jLwhFq8c9jWiWnYOCiIE6lyQLWNrmEalqxrjeyAiEAg11R0o9iZAwrls6Z8eoIQgNAZv4dTUQmBvMypokk5Z8="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202108132130_1628890270578_0.07825525444815784"},"_hasShrinkwrap":false},"1.0.8-alpha-202108171450":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202108171450","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f340d72337fcd0be1e6391045acc17f087edf074","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.5\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202108171450","_nodeVersion":"12.22.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-uVh/LvDs/gmIKY3um8ohp0VjH4KowQklIgBj6rOwaH7kmseEgSltL0aEkbD+pSKp/hjpzD2eryWnq35ZRfKDXQ==","shasum":"5e79cf08f23ae7f19b97ebe4e00a6eaab0b9444b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202108171450.tgz","fileCount":175,"unpackedSize":7078827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG8zdCRA9TVsSAnZWagAAjcIQAKGiXAcx+UdA56DpXreb\n1LTBQnsjEWBarOaJXfbst7et9tfQPoOl3vomZKCVvfhxukDVsCCU0rmPBMC+\ngPbY8cWNrcK2AIYfrEhHqIQIZnUagN3wadgyiwvgVeI7XGrOUIg/YYZ6YnJe\n5orGZT97180TUrAL0vP+t1DMqn/IVfhp6aPtGkpJnt4TS6vYDLUI/yjpJwSg\nQlUYBEtIaw0hzvVWgVYQgzUFJWh/OVUcXbzgRRFebnEy3joPEih7l1QqoAgL\ngp9ZdoqMFMNX1PhSsZLpMEMG4OZzUYO7K+2QZFsAWDa8Z8lLSXBDazcz2gqO\nKBt08WBV46qnnXCuRNH+OQpqmvKZ56rlUAAW8JeA/Gw++i+m2zAgmujrqALd\np9apLTgk29+LwyvAWyBWpt0X9fjDd9SbaOAvT2OkQ+ARylovQUhRpDyEoT5D\nBvbrp8cyY6Cw8bdI4FkRUaRyD/MHdH7CNMaHUuQ15EexaaggpV1pgqkqDSrJ\nt0INsiKgRf/AlDvepr3tJVafoLiKPLRWTuJMegbB6dRGKOh1T3iLYuK9ljbw\nLH7HERRE36vpQ4lbp79djIEXSVWw5dQX9ThnPT3NRY6fX7wnMNeHIrwY7pzq\nHY2mMgZiax4KTPvlZw2OASgoIAVqCnKdDmvw57Z1w9spQVtjX2/DQijO4Jmq\num6f\r\n=6vl2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+b4ljdTsSp67/tLSMQpYSj+mI1FIOWmQ836Z3rfSWrAiEA3yqLazkpCjPuXX1S5h4oQrcY5jdwrNwTpbf7Kv2GBMo="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202108171450_1629211869093_0.1292971524057751"},"_hasShrinkwrap":false},"1.0.8-alpha-202109141312":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202109141312","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"cccc7e6218a9f209671d2273411be44ef72c37a1","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.6\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202109141312","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-avOcICJRTZvgLwRQ+Npeff7y9dC6w+f9kRWIsZnwcB6EVX0f4X+XElPzi21lset92zxJ/bRdrtkt4wUnTt3yiQ==","shasum":"27c7b03fc8add139365c988eff9b1b9511307584","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202109141312.tgz","fileCount":175,"unpackedSize":7078825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQJ/rCRA9TVsSAnZWagAA0QUP/1tzkbflXhXTG5/pVtcq\nDaWBW71dEoaoH/jMf1KmjmbyWXmwUbyNc44+ni8WXgQ0Ehikg+KwCQXoZLmi\nbg09yej8LKZACTdxGTrmedNB9PLa8MtOuW3zpZW+AVELLVCRfsbnvEIBVMr9\nCC/l6wl/yNbaY4NiWThBxUSSwuz2dfsNzM0DwG9p7Raj3LzdGv6W0CwAHat1\nizlN7p8D8IsRJaq8NvSn322hwf98Iiu93Pjc2fPx7U9KLBkVDy2SoZviftch\nLTUiC8ZcawGOHfDpgXY0BFNPiq2Tz1+TclZmd/dzsmOZdmWm8b+N2EH969DU\nLy7hLPbFPs/U1xDsLnJRq7iIr0Ud+XiXs69iQUOTkmv/NuYMiHaazEa4YR+z\nT3BZIB14NlLXV4D7m2fi0dB11Q8bXnx/EZsaD8TA+SGuBIGBVrma6whYXsUB\n69AaTVncpMcQ95AB4anJ7whK4udynxhnmRxBys0vWRNdXVkgDyRou7J0e+MR\nEQFGItGgZ6zJrXhyeLn0uemsRV1Us8ZjtZvpn1wkqz2qef4nDFGEBvPo3kMZ\naboYUV2dRt2GyFthRuXmiG+6KpJlL6/6lGY4g3P4nfADoKqmke//GY+sJ59o\ncWgXwgOz1lcvBDW9NplAQuAhDcBanY9J9WQIaV3P4ZqLuGN1Can8c6P/wDSI\nFxA4\r\n=o2/9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/CHD5u0d3BkvBDaZH38qAcc7OjQmQsrNlfvMaCjBjrQIhAJ+shc9tGQX+YecoEuopBbEbeAS6cre0hAXi61oZBAEv"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202109141312_1631625194915_0.9708913240346795"},"_hasShrinkwrap":false},"1.0.8-alpha-202109150057":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202109150057","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"725de3606067c5efae2bd7b851aaf37df7e0f8d6","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.6\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202109150057","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-k8Ue1ELk0w7rUlWU6ZTSz9tOg+84VPAbnyhQQWIF5cwHH+oFlEM4pXHkpeh7XvCj3Un8uDWvgjUCZ+4bqgY8qw==","shasum":"ffca4d73e9cf902beb4e21dc9a0020d26c2e6ec2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202109150057.tgz","fileCount":173,"unpackedSize":7039796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQUUVCRA9TVsSAnZWagAA5aQQAKS5bgnvUwvhqSRDOFm0\nlqX5KrPVmBYlqFoB5tUkiEDEWLTcMBJoWTyBEq6NyrcJCTKuXP8VrqLWQGgV\nvke7YLiScgXsX5Wr7p6pGij9pKv1eZY6P4TWcpwabq2HoAp+jzrs0DnM/DXB\n49vNHhTKxrGCc9i867kAPZ5cZBZg4hCKUkIIeOIHLj7h6lCSrosVJB9FZiDm\nt2cldehu8aBDQin757KxlIhSKPyZ6yRys+mNf5pf6M/f0Xy81GtnysXAwqq4\n0mlPLTq/ocAYfHaRbVRIJl0/d0ystKSGRMzgOuOKuAK8TrWjO+f1OR0mPAOc\nidsT4hdmmPYv5tQSdlCuxAI7E3rF+0oRngBnFltZBU+1r0IcJLCZzV/McNje\n6WVvI8NVHWDQf/pvuJ+L8GcspBAPfB5oOKHFTix5bOGj/Ap4wFQwnQ3JUfwd\nkFrZLQRvmMHg+SLRIGOgZ+OF9kOGB06/PAbLkNF/H6mTkxAGLawujueEntNf\nwTvRwVTHEB380fgQ6X++RZJcSCtViV7hvYla+1twYshOdCWEd8PW7D9wtlxR\nVtOWv94remtQd7soQW939+Zqncswoeat+wO9F6VT6zNWFSJD1m4cAhhQJt6d\njxLI0izVGPmERmXsglhPtl8VbAu2PqMzrL1o/4x/6yx/us6jMTUtbgC6YaDS\nGMvZ\r\n=3+Ex\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDq/NLCvHWDNqccuU84wAni6ozMUsUmesJe/0lrBLZ8dwIgJpJMiytX56cRf0PdWRx0RKb0Hz29bWwWo4ocJl/W/bI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202109150057_1631667476744_0.4111087239481239"},"_hasShrinkwrap":false},"1.0.8":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"03cd88a1ee26569b6570c90f0cf501342f403b86","_id":"symbol-bootstrap@1.0.8","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-c20TgtGDVLVBK6hshFsABzixtXqOfBMiqbCKL1vx/WSxTEWeTAL9HoB3P62JCBRkDPRMOr5mwbzES+V2+Z/BGw==","shasum":"e7b38c6a9a66256a1ced13e0f686e3f3d57073f6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8.tgz","fileCount":173,"unpackedSize":7039739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQVW8CRA9TVsSAnZWagAAPOkQAJqm5zqWxp8q7LFWB5Ha\nYvZKPqxqxA4u29M8s5g+uNYhggcHEP4UDr2anxWkH19jVH5amYMgcyshrdqA\ntuapK/sxY8ZqEI94CDEMGPbRuCefLLWRGlFDte7m8gHZqNMXZhYBnC1VWaqr\n+h81r97ohzWi38W9r5i4l6WenTvEEvmb6llJhWk8s1EffQoC1BqSF3/thO07\n44AlJzx423JMVUBJriJD8GQqtfH6mgpKK3WL54HCqNiHVvGEoU6iETh0nlz0\nd8CShVL38gtfTbEABbic+wXG026jP2j7tfZiceU/Yq5jAFbgbbudNAuACgan\nfiae+ajvvTdHy8Ooh6+O4HBxj8KtaHeNsnqJOEAa77VzoJZPprcmhlTG4Qkt\noZvcuHdbRtd4fhuDJSntC4/YSCsSSEz10o5g30SaPauu1/ZVTVLs/dvbbHUF\nZwUiQ4dNeSw8OPsQQALoHD/ztG0XDNM6b/IUtrMmWHiBO53nSHQNDUbnyp3C\n5bDRC2Nb345oOxCm10rSn8iUdlQsHSa+Ua1AfBEbWs3/GrJrCl8ZmZFsKb3M\ncNaOcNfefY9HhSLj8457MHnwxEOvEwCmns1bQZmKSIR9KqgrAgE6EqITKJnv\nyEMdgig/WPkf2VKTzCnmNr012zBWOj67f/askM5NBU7Q35ZoIIdh7DJDCRSa\nxcZh\r\n=bChK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnOKvmU2B/Si4Ph+KFyDy3zj+GUFGQu9lbgay0B1kUowIgezLmN0Tgx7DoDrrfpThBC8ADiFYrLP2EajLyc+kyRhQ="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8_1631671740067_0.647683047643079"},"_hasShrinkwrap":false},"1.0.8-alpha-202109151315":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.8-alpha-202109151315","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"cccc7e6218a9f209671d2273411be44ef72c37a1","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.0.8 linux-x64 node-v12.22.6\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.0.8-alpha-202109151315","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-IoKvjCJf7k9/VLHjhrb26faCguVXaYu8KBV7ByTH8Bfluv+DqLW3SihhjEI7Yxp3M7VnrBLos4pViF2nWRzumg==","shasum":"f5b2fb5f1c1394b2aa5252f1dfbc9d5266c325f7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.8-alpha-202109151315.tgz","fileCount":175,"unpackedSize":7078825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQfIFCRA9TVsSAnZWagAA16QQAIXhoW2i52Dk9FsdWNXT\nuKW7P8HMZMgabSt6L0wbTJ0SRLkroK3ZexYS1m8SF4zWvSDncWd9LS/dbgXO\nnFpmIY1P77whbdKFduCYnF2w+EOlYDqYO+SIuUojaLJ/ETNTxf/F5ZEo+FXq\no75ttwFEXP9jn5e7MSdaJi9Sx3HJwU+SG6xM5DnDNffPIK9898smXlmopLpE\n8zP8M9Vk1Mzwh3+eUOOrVgywfivx3Krob00nX2vAEPd0hvOX3vFA2yXHJgEI\nVt/9AHy8Wq31Q1qfcOxTixDqiR2osHtgc4+ZDRbRvZ1amR6Vtw/KHBwAE/th\nY/sEdZOgcDML+epFwsS6Ofa/cUALgfdupY72qfJJ1J7qOl9VCk9KLCT4/FG+\nAAp6riaXcUUAgjk3vNai8t19KSoxYtu5Hv19O8aS0RAcCnxuUMEAQnRz9q5N\nXlGji3ahCWKIxAMp0o50/Pc+kL3zmXkBHhuB0iLGFYZOGRqgabf6HHnzPYns\nyeNSvrmKAlF9zLWiVzDcu4JGT9MqtfFeE2KRrBtkbkytkJKvr4/mJR+kkJVi\nWwnVcF1heQr62RuxEqBv56893Y9EvskmiSHAGMq7/uGlcyEjhh2MQ8lyWqXg\nmzScm/AqTh5Ecoutjkj5dHc/hG/JuwtOZkFqXKfwu4BfFegLUi7pPno1J+Qj\nFjHk\r\n=4kuQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPPK324Wr28G4zNZ6I1IzoleHsbMQO2yoR2KBXr7FULgIhALa2IhKbr81gY/D2yZU9vOlqhKfZHUhld/H9v9bw3GQe"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.8-alpha-202109151315_1631711749569_0.6126074796380339"},"_hasShrinkwrap":false},"1.0.9":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.0.9","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-forge":"^0.10.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","sshpk":"^1.16.1","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/node-forge":"^0.9.4","@types/semver":"^7.3.6","@types/sshpk":"^1.10.5","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","prepack":"shx rm -rf lib && tsc -b && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"862adc1d40dd4721a12373312b17dae25333e1bb","_id":"symbol-bootstrap@1.0.9","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-V10vne+vk2AmDmchU7pdKXA6cV6FGgMgC3wZeMvnO8asRkxAMBK4mRHYqi9BgI5jwV27rz/iy1JCqoOnbfCPdw==","shasum":"5fb7cc5615cb3e922bf5d1df99a649d411c40ef6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.0.9.tgz","fileCount":173,"unpackedSize":7039842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQfpMCRA9TVsSAnZWagAAI4sP/2bf/Lxa+Xq1qRy1Ca7U\n044gKEutYCCZIUtRYeixXDH9ogLo+FU0x6DKsifrTa03vsGyyO7OK7kDp6Zb\nj+GZwEIvaJP3qM/xX4kW/mORm2MohBdAwkebGMAaess50ilKTtwQoS0bP16W\npDDaW5EFsyvREB0wBks+kAg6Xmb8dXX1Aq7VjkcSx4MbvSUlRQftXbNWvizT\nWpI+W9UPfVTShvp+iRjTu1cgEo0kDoEwbFQUmGqV+D60yc2yKzP2O1V3YjOA\nahFliFiB6SMpZQ0LxDOEdF7gHi7BNUE3IJNLg6ZL+Ui/QGlwKmBgzd1t1/kq\nB0ve9tSJvhWoIwVbFAj+bZGJCQ94dMaOFVkbAravKE/2YzSN8WbNrcOi07Gt\nPe3Gbg3EFgi69viTeZ6hXzmWgp4x50cbmyLwPa07bSqqDsqbO5XVmsiW2M6Q\nUvApY5BsAvrIOeGB2+GUBqP7/lBYtVOsYikVxlBWbB97Nip0QwTlf/IgRWrX\nwrea2ZqQFbJI3TNqIUyEBG0aD5ijaJatx7JQkPtny9htxjRFsc+Bzez9E+Ed\nSTtGq+ItV/K6iy0gIavllnIxEj8utSrrsEM5zqak3MWHeO/adbT4fvPGVUIa\nYJRq5XCZeO13ASB0ekAPszcGDsfI+bC2WzcPtgVlenrraLXEpGWQ6qpskHC9\njVCC\r\n=47QA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQVAiENyRVf/tLRvFjJrPTJ18E+nJl96N9ICHOeJn8FAiEA421ghBboRw6UwcwEzwWBty51OAH/PHLD7hDQ2KYz6NU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.0.9_1631713867597_0.6161026731715842"},"_hasShrinkwrap":false},"1.1.0-alpha-202109171011":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202109171011","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"dc77ed7e98197668d7040aaee45f4ef32f8fe2b2","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.6\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202109171011","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-o7HtP5DfxcId3vXr5DCqzmxX0eRwXsW/Cpa7R6nvXgnQnIS3BM3PQHlZwuDJydRzSksYlCDejAQceugeDHdBmg==","shasum":"6161fecc3cf5edc4d360c1f6043c566343789ba0","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202109171011.tgz","fileCount":175,"unpackedSize":7080754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhRGneCRA9TVsSAnZWagAAqz8P/RLD4VFRJt4pS0ENIIjj\ndMFhyZRG8j1tcyjuFRPLAATPXedSERnZdMlmIh90/8wz4OhEzA+5PxhG7+aZ\n87hbz0wHJe4oMiAIZfZ/j3c3CypoEnTL2iI8rtiyuFXQ4az0MbEdlyB4soNk\nUr1guTpx+K2QF1cUl7h4pDJ8kitVnYOf7momZooOE5W1ZUy+Vr6FKo3hfh6b\ntbZRqlknXIY+jp2cQV+d+q0/1WVjDJNuJtgrEjjH56wFn3BVkJ9iPcn3mVTN\nEqmqhyN/ZCPE9X5zeAmUbzZ4tQ3K+IJdcBBO0MErQidcYk/Rs7cwntVR5Xz0\nXYEJV/iLNe9UhqPx+8EAfQSf0mbgionKqY+q0QgkjbGUAu/O80mlpYIqnZwX\ne5d8pTOZWy2Yu135ZYVbMWhHnxHUye0iAZufLEjQkVVinksQH+3Bug72X3En\nU6SkDIU4P/Ff4ka7BwJF/l3QlREt+mPDHIDCGcvztLlF6J76w7T0NmaO9nNe\n69Z48ooVVnSvIp73Ho2K5DnPlZT+ytHjAf0qdKiZOqCqeBmRq5Y/BpL+nSu+\n66Clfgp2fF1YOs8vc+oCsQE6ITbrMghaBBqFp7nq4lD1mvhl//G/uo0Wo4aJ\n1A7zpJnS1frh7DSPtNoxQ9beIHYCkKYRKFHuTll4aCIUiXqXmIilME6i4oIH\n6V2G\r\n=KXhk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQAJlpiDJAVJFr6DOVmruCn0XY9wSoT9F6qXTPrvFpYAiEAuad7RGf/6BkZvVobDds1zdeyDGY58zHkrzI8WTE58Oc="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202109171011_1631873501730_0.11101066600897691"},"_hasShrinkwrap":false},"1.1.0-alpha-202110051739":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202110051739","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a2b7503f9439aed7cdc62eea756b204b0aafa0bf","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.6\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202110051739","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-+lvlQM2IDg76HuviUgcOhwtGN8SbO70w2ccmiVOkbsOBPaDir0AUGsqaRctnZU/eZNcszJymHdKHBX9W2KrObQ==","shasum":"f4bde604286c1b63fd59dae74e2f935f4239d618","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202110051739.tgz","fileCount":175,"unpackedSize":7080754,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAOWKvIYGuEbQ9Nw6WBouJRA9nAUr6uZBA1bc3sOXvtQAiAkKYeK9cSwX4myEDj/wQ8zDy+SYkU2S7PA8Qzsc6rETA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202110051739_1633455558565_0.6238922634848334"},"_hasShrinkwrap":false},"1.1.0-network-202110181134":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-network-202110181134","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to created nodes' connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to created nodes' connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`dualCurrency`](presets/dualCurrency/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n-   [`singleCurrency`](presets/singleCurrency/network.yml): Used to create private/user networks with a single network currency configuration, just main network currency. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard api node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node that contains an explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): An special assembly that contains 1 api node and 2 peer only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: the generated explorer configuration.\n-   `./wallets`: the generated wallet configuration.\n-   `./reports`: the location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0-network-202110181134 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a demo -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples are running `mainnet` and `testnet` combined the `demo` or `multinode` assemblies.\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"77b1339da7f2116ed6d8787894aefdde8af09358","_id":"symbol-bootstrap@1.1.0-network-202110181134","_nodeVersion":"12.22.1","_npmVersion":"7.17.0","dist":{"integrity":"sha512-JsZSGaRNKbrMEiFQ/atjeK1S6hyy4xxfR3/0UDoNr84Z+LU1qWFgwUlJz2qrgOxq52Ar0TPan/wAtjSugcdwsw==","shasum":"c81656d91f693322e5cf867246df169e2decea36","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-network-202110181134.tgz","fileCount":181,"unpackedSize":7089651,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA7/wxSrLMGl3fPat+ucj00stXHGjiprr92vMPZp3e6qAiBwwIj+riTirSUil9jFdjMPTz4rh/T4Nv/tIEveLlIHIg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-network-202110181134_1634567690532_0.8306244550752044"},"_hasShrinkwrap":false},"1.1.0-network-202110181908":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-network-202110181908","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to created nodes' connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to created nodes' connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`dualCurrency`](presets/dualCurrency/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n-   [`singleCurrency`](presets/singleCurrency/network.yml): Used to create private/user networks with a single network currency configuration, just main network currency. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard api node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node that contains an explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): An special assembly that contains 1 api node and 2 peer only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: the generated explorer configuration.\n-   `./wallets`: the generated wallet configuration.\n-   `./reports`: the location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0-network-202110181908 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a demo -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples are running `mainnet` and `testnet` combined the `demo` or `multinode` assemblies.\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap enrollRewardProgram`](docs/enrollRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enroll transaction to the registration address.  You can also use this command to update the program registration when you change the agent keys (changing the agent-ca-csr) or server host.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"06e78bad564f91edc79866adc6350f554d0d5573","_id":"symbol-bootstrap@1.1.0-network-202110181908","_nodeVersion":"12.22.1","_npmVersion":"7.17.0","dist":{"integrity":"sha512-Q+Dolhx3W2NFJdiexFp4uClRdFyYbocYyZ2UxuCGWfZdEc7Xu8w5CCTvZ9n8QQ5q2+5WRPAE4UdsB62XzoufVw==","shasum":"14c53db2a8887d281a35d792429fee1417229847","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-network-202110181908.tgz","fileCount":181,"unpackedSize":7089929,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGgzT5/7DUMNe3iSmKh1nwntDRk1LhpHW369CrntuYQ9AiBM71dLS7uGVZXDMvbUbDvUShasMdLBIa3BqQEVg1XxYg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-network-202110181908_1634594939190_0.03064461037838151"},"_hasShrinkwrap":false},"1.1.0-alpha-202110211346":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202110211346","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"9c199f63ee11dbbac60c96bd3ec2956f1143782b","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202110211346","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-qDzdFhnUZCltvprAzkOvEKXKQ6v3kbHRY1W98ZDp/eaDeeH874/TlLPOsK43mubgji5txFeZU3+7jbzJY+JuVQ==","shasum":"62dbf7eaf313c5fe90749385cc4f0b44ef3125fb","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202110211346.tgz","fileCount":166,"unpackedSize":7047594,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFbMhVGgwsDHiW3S1XCcJgdmFuiILfLiMItkf9UjmmcwIgA3/4x5nUEiF2V4O+ZDICCn4E2XrrOs9cn9C1817q7OI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202110211346_1634824027743_0.5781083853240239"},"_hasShrinkwrap":false},"1.1.0-alpha-202110300727":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202110300727","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0-alpha-202110300727 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"56239efa3100116ea294c570ddab317160e0e00b","_id":"symbol-bootstrap@1.1.0-alpha-202110300727","_nodeVersion":"12.22.1","_npmVersion":"7.17.0","dist":{"integrity":"sha512-vG9Lc0j/zQE7rkJcbH/ax/I5LQuI9FvTdO+KXBLTfqUN96mEB0M977E1NV7NKoT3IgUsgGnUTx8k8svJM9N00A==","shasum":"963de789f47f09f49f4aa353688ac6062804fc76","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202110300727.tgz","fileCount":165,"unpackedSize":7032992,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDG+j50puXbmgo+FOwr9f4wzwcDkqh9CIFc8rSBnACjpwIhAOUBerX8l0N3WsdR5B0y2aOg4bH9qIuHs5kR1tBLqQxJ"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202110300727_1635589687579_0.6860989303611709"},"_hasShrinkwrap":false},"1.1.0-alpha-202110301232":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202110301232","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"56239efa3100116ea294c570ddab317160e0e00b","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202110301232","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-fdWiorSXuBz9M+fc1cKtoMDY3OBBFs+zYk6wKDnF0tYqgDvTMFgo1p9dPatnVvEudvk0FHYcPNKT/MHMTyt9JQ==","shasum":"2363b21a954c938af91103831e6287f7d1eb2f0e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202110301232.tgz","fileCount":166,"unpackedSize":7054147,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2Y/m6mjZ1bXCIm+N8cIW1XMZJ1asRyFzS2/0F99x6OAIhAN8Ln5Clj7meL6KPWd4Hm72NMhC5ujhStPVP4yfuyqZB"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202110301232_1635597189516_0.642503589578483"},"_hasShrinkwrap":false},"1.1.0-alpha-202110311545":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202110311545","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f3930e0874d013ee0c9cff8d2f17d0cc70eeda33","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202110311545","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-JbmcpFshk9cxbn7e4K8bEsprAUy97habgbm+XKeORNnDFNgrzM+wYrNeKZ3m/bUeXQvMbwuXTvSwY439ccDcgQ==","shasum":"d8c49bb2bd1eef5f0bdce0311942448af181948a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202110311545.tgz","fileCount":166,"unpackedSize":7054147,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe1qe0r0xNNH4e0uTTtAMhhJ+1BThUe95D6r+pnrYTjgIgRCUvcesM93vPhAby6tdDMNOo62Ythz7He/P0siZ5wpA="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202110311545_1635695175396_0.516181286749384"},"_hasShrinkwrap":false},"1.1.0-alpha-202110312143":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202110312143","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"67287bce09558a1cb834fb1857325e2bb15484a8","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202110312143","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-PyyBHWTWjOy2spo4Z3TRoQAsLc8onzBGQtk5LxzooqWj8IEpoI4+vQA4yDnLWDJro2/s5YK3BdzemXDhp0/NDQ==","shasum":"bff606be21495fc2f802d942834fb30a235489b8","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202110312143.tgz","fileCount":172,"unpackedSize":7075938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFTSpy16VnlhmbR6aO99nYNHfNUJLGUBoxq8zVMFgVoAiBX1vJE2LG91uzSZwFdSFYl0C1S3lkjfSZfnsMTy2nixg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202110312143_1635716602037_0.9248777935166996"},"_hasShrinkwrap":false},"1.1.0-alpha-202110312317":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202110312317","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a84483bb48eb0f9b5de1bd6bf7dadeb70107bd63","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202110312317","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-P6XjhSUehkuFfulFmlJwhA+z+CkBx8rBArkoHPQaI0ceqaN/keueIu/xTZLI2EhAsy5FSRFdoW4gqpqWQQH3gw==","shasum":"b3c883bd1e56b5ca2f22e7086259b0a9350bb995","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202110312317.tgz","fileCount":172,"unpackedSize":7076030,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEe0aKST2IlHe7oszb6gHp/3J0b/faBnLSRVYR14GQbJAiEA1mWfrkAiEySO/Arudhh8Pus/yqyVOoOCNEsc7K/jBeE="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202110312317_1635722285267_0.47377467945083285"},"_hasShrinkwrap":false},"1.1.0-alpha-202111011351":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202111011351","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.1-SNAPSHOT.202110302303","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"ee7cf94602a5f79c67eaca132bb671c367f16054","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202111011351","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-6/4OsR/aoUwB/pz31ei5198OtgM3Y2ib5tfsgKqUJhtmPGYQk2cp3qRjM5dvIdcp5HRjxFy24Omvh8iwg6gJPQ==","shasum":"a10e214cb269c3fe086d9401c2e1be806f16c366","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202111011351.tgz","fileCount":170,"unpackedSize":7041611,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVSn7l05XIMtDY6gCT1YcP7cUtPxVvREhQEfrky6zkygIhAOMKQ4mvG8Sq0Ad85HZlZIWkua/NTLEgVA0/+EXua66b"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202111011351_1635774724984_0.5073351121845482"},"_hasShrinkwrap":false},"1.1.0-alpha-202111050633":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0-alpha-202111050633","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.1-SNAPSHOT.202110302303","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"013bb04cf3622618dd3b4ea190ffdd7ca12864bb","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.0 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.0-alpha-202111050633","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-F5v0Qv2aVvVPBSu7uMt01+SCu8vUchMeEogEAZUpXAYcZBn7tw4FEMvvvKMmtdhVoaM1Wg1GlV5jqQuHPSAOaQ==","shasum":"0326061f2386cb4bf1ce7c706565c245516688b2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0-alpha-202111050633.tgz","fileCount":170,"unpackedSize":7047482,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEluZ+QOKZcqMSRYFy/iBVrL5rtADBoqXnlipm02lxowIgdM5nrwylSTecRsVTVcISj2+LJdtcU5+jl/y8J5NdpUg="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0-alpha-202111050633_1636094008111_0.3003324944501464"},"_hasShrinkwrap":false},"1.1.0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.1-SNAPSHOT.202110302303","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3ab22854207b9d1d74b0d33946f162367c0256f6","_id":"symbol-bootstrap@1.1.0","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-av4Znw8TqMjMeS3hEtTDw9pS6v/Hl4aJsWWOw/z9QEBlmL1PLAQh6LuS3M43jJWI8FaKJnUzvaJm5Y/TwQduYQ==","shasum":"4136fe704fdfe38dc77d33efa6d8d4b7d424e0ad","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.0.tgz","fileCount":170,"unpackedSize":7047425,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADSMgMijV8sTKNOmuYEQeL92BA7ju40t6iPavkpP/DGAiAAhUkIhhILg80yXrC0Z5n4o6ZHYIrDR3afjIUdz8kSnA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.0_1636094664036_0.49340951503342767"},"_hasShrinkwrap":false},"1.1.1-alpha-202111101421":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1-alpha-202111101421","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.1-SNAPSHOT.202110302303","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"224002c2d8d133b37aa7965cee79664d92c98188","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.1 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.1-alpha-202111101421","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-tfz4SUE8C3p+WQGLLDAHTEw/c0YTcynJPLlcsPyZX88ra2xdWzgSv19M27gmYt3c6sOcuFhhfJrFSMYooXYfRg==","shasum":"30945c1c1583c1f4e6eab1059ce9b92afac03407","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1-alpha-202111101421.tgz","fileCount":170,"unpackedSize":7047482,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5BhV6ezbftXcEepjILr2YYVjjRR9iFN8cVYgKRtcYIwIgDKKzDquREeHzEVyy4FydqfqYtBS6NpwiAJ01lE/Qiec="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1-alpha-202111101421_1636554134294_0.2275466696164783"},"_hasShrinkwrap":false},"1.1.1-alpha-202111110842":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1-alpha-202111110842","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"e1c4134aab69311d17d46c89ada5f638a387a69e","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.1 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.1-alpha-202111110842","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-5Y6xawenokHTezF+CxO7pUOqGo2jM+ssws9hglRB7kdnRpSBz38DAZhHvh63ibkZeEFtt8fLP2/+Mjyi7vm4iA==","shasum":"ee858215ac88ba440ec19f5234c47f3171b274f1","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1-alpha-202111110842.tgz","fileCount":170,"unpackedSize":7047793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2xzpCZxR9b7Ke8b0I4EfmwT01/cSvXwxerRyYD7JmwQIgIibQsbG1CWEID1+vyCo0HzqRH67vB3XnCoT+44qnu0g="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1-alpha-202111110842_1636620170472_0.5698055372204307"},"_hasShrinkwrap":false},"1.1.1-alpha-202111121542":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1-alpha-202111121542","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b07fcfc384b70b64dc85981041e3fe7086689ab1","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.1 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.1-alpha-202111121542","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-t/xO2DReL5CBMHicpea7pOuMqytWAPzwrF0couwMHN0AH5Q5IzjlILdsdiMCrtKuZsJUoLXsOXVF3EmKuBEVqA==","shasum":"6eb3b45c397a11c2bec83d438fee5d9b90e7b157","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1-alpha-202111121542.tgz","fileCount":170,"unpackedSize":7047817,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBqQXMBOjCfsDWfwEhLQmwfaFILnZNdsOwTi3EgTE2spAiBnkAx66NsQeiNX97Pfdx9Yk+hiky5kDE76G05sUZhUIg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1-alpha-202111121542_1636731789761_0.049239773685257004"},"_hasShrinkwrap":false},"1.1.1-alpha-202111121942":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1-alpha-202111121942","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"05f14ee244c996043012a9c1762d56011c84916a","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.1 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.1-alpha-202111121942","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-NOluGHpZF4jr5tdGepwGUtEMdnZD35jcRdX2KkzTeCge6I4xnl75Tp4KARaAQCBCCg9X2sGzv1INg9LVvNn4ww==","shasum":"c7893fc03824063fe9cdbcd3153aff4d8ba7b19c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1-alpha-202111121942.tgz","fileCount":170,"unpackedSize":7047908,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxRhX9t5ulPdvYppqi6hgo1e84IobvTgoxZkVIAun4LgIhAIjzKu2O8nm2t4DOLlE+F6bqBif2D3pTeRWQP+G0b2bm"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1-alpha-202111121942_1636746195946_0.7285831651799679"},"_hasShrinkwrap":false},"1.1.1-alpha-202111161540":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1-alpha-202111161540","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"aa2fea37c2d381a9f496e817521ab58a30a0ad0a","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.1 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.1-alpha-202111161540","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-2v2jZ2R1E8/0+Rhda7iAolPzaEJ2rmYN/r0SBdQeZC7nq3fMcdRqwZ5f9kOj6lmk1i7nQlT1480dvBYRB7WObA==","shasum":"d1160564924a74c4cd79f500061e01bd24425b49","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1-alpha-202111161540.tgz","fileCount":170,"unpackedSize":7047404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk9EaCRA9TVsSAnZWagAAYcIP/Aq0SRV5rsMQmhoqwm5R\nG5nQH03NOVJqNfnA016IcDQBI/8dC6vWfEvaFgf8jIYIkGF+wK5PYeoYXIzm\ngfBkQzjoAjIIQrrJEvwNx7isYweetbyeJkPJ0p8ygj00ZWx0KoI4/IHHE+xp\nXHDbIKp+hikvXIwnvl1xy86UjcJyIHxj46dqtsq5Laj3LoeGShCPMohka4m5\n171Nw9d+AEkTMLrFkVtDp3CxJ0IJPwppPgJCkyMEsD/pyFlzv4YHp9Phsg7H\nRHUny033lDUR/8AHn+HQn9hnbAI2lvASwU1EsQkTQ1FfaU9d7ThZMCmBP9gM\nt6qGaKrtB0kMq/5/PojDHPwMo3bmvsPBMLFNK9xLuY2fYUZ6AsPjhB88zKOD\np0Eli4UTGwErcgBy5doGh6VV0MB0gbL4LM1aMRlbOvxXBH8nbrksytDFF53y\ns6Y2xDO+7ifock8mALT9e35JI8+7K5ta50a8EDvqrgm1VVBAN3F2RPX7A8Y7\nYXcCk2cW5wPVJiLwxRGsAff6OzYVTTrpdpftjqts7PkO5HTENmk7M0nmP/cz\nUn15y0eEi8UK9LfV/P88qvQzS7SQR2qKA6BLy14wRwLF3rNT7u/GhQ1xfDG2\nP/p+wnEitqbPVgYZTCoVnemaXvUKkrObdWo6KKYMTsUQCFQkKprfc8zFoiFh\nCeJu\r\n=YNg4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD23nc4aIbqfiI37jHTtxnrPQtbbdKxEFCtFRWgEOFYLgIhAIKt+27bTnFghI1aoD13zsb5Qt8sGw3X+QM2NqwjrtOP"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1-alpha-202111161540_1637077274351_0.8988040213191202"},"_hasShrinkwrap":false},"1.1.1-alpha-202111161850":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1-alpha-202111161850","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2cb29427ba2ec45a3bf1e6096f687bc1b0753d35","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.1 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.1-alpha-202111161850","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-mbRo3dcNDqjevVLpXzIWSA5kaItPE0YGa+A4rOAgZgnqcSPFxGek5GQcEvX9Hudl8QAw9+jpVQwarBRhNNeT8w==","shasum":"b1a0f02068e2e0abb5315ed66969113a3abeefa4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1-alpha-202111161850.tgz","fileCount":170,"unpackedSize":7046608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk/2WCRA9TVsSAnZWagAA8XAP/0lL2DK8E3ieMANtj3I/\nStT/j3Lv0Kro7ngt3mHM123Yg8SFKLpefqDffCqpaW7ZYSh3Q7axOJt50Ve5\nV04FeonrUyHZ4lMn20yoy/FA2sm3wRK38NVN+c8QXsMs2pcBm8oYaLMNwqrM\n3PV8uACDdj/zdGYoogPM5b/4OQdQ6E891GfUjw2XTOoRcNwIHqXuspZUCBhx\n2ukeT46AnAFZAqdQbBRbsF4/AJjVMCLUUbcXhHz8ILANql8uauoW9fQW0BTQ\nvw0hoqMTIaUgarZsIYDvVLlxbcE3CvA7btzLTxqbUTgZ8cUzPPZyn3492Ccr\nXRaY0TASh7ccgMjr/zPQebyCg7tWphftrjvYz+pewYTOri2cbksb6gykMGvJ\njPbEyPmQ/WALUqE53jWEQ1OhWmnk40l50KU1Xk8n6Q4QPxPB1VhjEigjwH3R\njUz3kpj3YGETwSWI1RgK+hnjIgV7hwFc9/M0mP5/ALL4QpYFRABPT6yw5D7m\noZixt1cJpdDTUlkVm4O+tRPqG20FlHryAlI5C9AT2bskXkQKwnRID6968LVF\nHIqhI9QWyfAw5BBR7RB6p66xAyI61ar0ds8/Gg1m+sPV2CuxTsFdoNF/7f6b\nIeMr8Fv7UreC95vB/DAsceSYV/BtfyXJThR+eyogMXYqyQ5cx+xTPLzkYQM/\nLMUK\r\n=0dw+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDfd6LOuNzNU8hSmkuRAmjTycBrkf6sMfsABZ7jDROfAiB5StGFYMCBSkNRghwiTAtkCOQN50FFFionMt/5PKiCyw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1-alpha-202111161850_1637088662491_0.06887527850200814"},"_hasShrinkwrap":false},"1.1.1-alpha-202111161938":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1-alpha-202111161938","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"9e7c480cd51087fae66dad8e04f4aaacf7e23976","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.1 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.1-alpha-202111161938","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-XMnngOX97oi7DGJUJ3wf4T0+NDyFiDVu95eLzzQyl12uigSi/ZCk3YIkSCSS783HkGFzMTcIaUat/2ispmuw7w==","shasum":"6d6492e59abf84c82cb98c7e9c530e91ee0b24c7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1-alpha-202111161938.tgz","fileCount":170,"unpackedSize":7046661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlAjeCRA9TVsSAnZWagAA4U8P/2YCAJNR5GsR6bR/h9qs\nkJfaCJi5DfmrDZXvV1mJGBzVkDRnnrZtAyXQttPwFVtYhZNA6N2mR5nYoXPi\nI3RWmsCIPyuwq9MHlLgRt27dOVFB1TeBSrh3v17WE78mey8rIOH0n9Ll3tU2\nu0xILMpj+kGlPPy1EsZY8/G1AtCQUcUTRs7gtQKMobslahAp7yzQK3Aq1o3h\ntenhI3+maYCnIDwfZHLy2xSGMEbOeVjr23Jpsdhq17uis93aoSfUYrVos39q\nCNWDtLs/Czya4+fRLru2G/aWu5QtcoSW/S1/zbXBUqdGpTSrVh9936uL7Pkz\nmNeOLJrLikm2VhEfIlRlJ+nfWwXcFk7fANPzDZjulEKGdbQ3l+VmvewTfV2Y\nUMyX7wKkNMiDIYzg63dw+LW3X1Qgb2Iu48+vE+KlW/jufDvEXUrEIHsb+9bd\nDQe6U0BzdA2CPVsOEN1cMDa7sggraaxYg+hQdx/sjGHAWktJ2xxA1gkPVGZE\n9qzdIKF83kYiNdQp04pI7xCrF23IjYTdj3lh64H6MO3UQClSX/gkW2VR9Zd9\n6Q+aSfYkPgqZr9H1ipWGDCjZkUrrR/nmqnzZLeYlWkGlz+7vSB+s6in35d0z\nmfIPZ8vb5u4jsLMVol8XzyakvVgWxM89Yx0uX9FrHtKR5ipKQEwKRJt0ncN9\nSm2u\r\n=x5Ap\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6knAz6mtSl1kjst/AsuzRM8xsjbsLiaVtBKL9A3GS4AIhAJZaV3XIadIxjXFP0vrncpOL5K+3i9WX+ExNtB1x1UFI"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1-alpha-202111161938_1637091550376_0.31930649555053114"},"_hasShrinkwrap":false},"1.1.1":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.1","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"9e7c480cd51087fae66dad8e04f4aaacf7e23976","_id":"symbol-bootstrap@1.1.1","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-iCDVmpF3ETyn1hKSRNnVHnlHlOd/itq+7oJUG9MQ32VbzvrJRyzCh22e4eCHudHe9H7X7lY5vJljOoUaF5nsDA==","shasum":"da0cc59c6ba7fe7acd854b3c026992761ac2f572","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.1.tgz","fileCount":170,"unpackedSize":7046604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlCjPCRA9TVsSAnZWagAAK6EQAKFX/DvdzMjwHwGM4seU\nwovNelvh9f9PgIV+0+hmB2oenWWFfRZLjvpTAjeF7QI9tg+CufYNgYzhIru1\nFddQUHVSEFHX4qwiz7hJd+HBwX2UEyk2B72pH2RJxkIVRkgaraI9/W1BFJ7A\ntAAg/kL3kzo7BkRb3ZMvkk/V/blhvyWTxXJ9ttmvZU5xk0Om+QW5M5bo53fE\nn7v2un5+coPl73+xurqiv5sBwknnGFqT1nWwBkHUrb+AiAgTdYAGU5M21ktK\n6RQAEhGPdF28RwWCqmldFPD5fJGGUhaT1OgM2JzyLZh8PkX5oQMA9xcUVw7p\nGrQROojkAjZMqt0mufjkPt9MW7qFPY+sI0bYU5cl/1drN1hI+b/9Xe20bTvM\nqX++6Fu1FHBj4zQ9/qC6LGUMfa9gloXzn8DjKJbu2KhPPO7kjB8S4JabPm2A\nHhWxeLFhClvPXoDWG+Qtd2RnPmPuNk7RZ+8RPc3yP+E3xpBgU+0C2/S6j+ef\n3v0KPOy5TY3LAQZ/rWEi52NIuvXi7mlgJnR1sOYJGui6HYpMMzd17bGbYXKw\nnDYzaUiqLkGs8JjSE2gvEZyToXAaCLsietSoyqZYDhaNpLpO8We2evgyNhZd\nw78ApBktAN5cx2dwrfjHHIdzbqwnYFIa9/xoqZjcVqP5YBhyjayRmeVTCv+Q\n5Lqf\r\n=KgW4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDD/YAY0sRXfrvIHPandjFcxqBni8PLbjfgrnAmutZjdgIhAI/ev2/wkWW0SyNJieZF6v8fCvZdTUvwrMKPgBJFb7Dt"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.1_1637099727147_0.6166417297701934"},"_hasShrinkwrap":false},"1.1.2-alpha-202111162211":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111162211","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0d4c5695f2f337abfeb28817337ceb1d4ea4c793","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111162211","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-yMW3aOfaG1dB/gx63wjH60qBsPt71f3gjqZE+hyhhge+mTOwe4GhPmWeShbimbSwi7JtbryohRSaMZGWwTAvzw==","shasum":"9754e02fba66d0b7bf6998119f641fb347ef04c1","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111162211.tgz","fileCount":170,"unpackedSize":7046661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlCyxCRA9TVsSAnZWagAA7KwP/jerOdupp/aHrjgyIpre\nJWNhV+uVklDihAjKo90l1QzxjoR71v9oW3o+qq0r+OSM4dDnkm6OWZmuRslz\n0hwvKfCdHb+m82GPOK+zqdXM2cAYTvcrWVVpKBHB/OKP4eujFxSaA7Se2eIJ\nO1ra/SYiWtnoGoWDfTgSnUGJs8tSYpo/AuOmMBLvvtxT8N7dRxXqcnafol5S\nGqOUEqiVnymnxPoMPzcJ7IpNW/jxGVg6VG8Y8pNLqMY/7xjS1+KYh8rjymfC\n0jjsvttdAfIN7LOMlhuwP3tUZg1tSeXy06H2sZ9xb0InTxv0Z2YJ9dbKLPKe\n6VgtbX+Xo8kefEuYHnnGZ9HNSFpehr6Epvl9lQsIC35Lq+Vzw39a6+PYEYIg\nxnNgkgEDCLLzP6SBY9XiaXKeZUb+uayK43sMq8stPGYHTFRzponXuBBWYo0d\nwMS0C39Q6kAF6SYS6d0ovvlpwkT8kXb3FKsOb+ZRMh0P1HkgQ/ac36hdWk7/\n7ki23H/o8+YbY7NdJgqwXpmcGhAcp3q5UKqZU8LDzLoiTQcksFNLWBtqxIJC\nzTH3M7ob0LXopIfD3GkGDfulhHj9/D8pVjJdzyoXnbHk57wooFlKVpRfzHt4\nFKVf4b9WKu1RWPVmX4nDbOzRvK1nW/f6Xgw65it+FQmxJXM7b99iw/3bkKLu\nH4I0\r\n=uMVV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJr0JxljlbnDUd2NexcZbyS+jv7gpy8PAsrYbkrHu29AIhALEuwDIISP1cH6nu8BCKtqST4aGjWQucezlBg3jYSJ3a"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111162211_1637100721259_0.23749774162575554"},"_hasShrinkwrap":false},"1.1.2-alpha-202111212116":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111212116","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"6da139f3d867e13f78051895baa6899fb46f67b5","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111212116","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-bG0r4AiogefkNyA3NLQdKLOLBsEROL2+c0PAq4FQUEsCBCRkFT5BB8gg4QXeae2bHQlQQTQdgCdZkQBr6/VZgA==","shasum":"0a09b6f6febb9a83d26f98cd97e7b107ee7b7251","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111212116.tgz","fileCount":170,"unpackedSize":7046462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmrdKCRA9TVsSAnZWagAAMRoP/j82PkXfmodiS0AE+8p0\nqX3pUuKQHf2PU3PukMiNQxZqNuDRhHrowsRVX5x7OyMT9P1zSfMwLfRwPgBj\nOnZU212H5bq8g5q3X5Znw+dfhHzUN9RTguaFVCvLyGNe3QnfVGZrrD3mnXKa\nRWQa0SRpe4JCpSBNgMlY5aR/kKw2MTSm4lIBwGG7faAs143+Eq3/L7LXrBZR\nDkuYG04+5BFzsy+4+ZUBJOYwWIxJ+ndik13KZH69fcvwcBVqx2zS4EGjTLfP\naXPaxWjcGEEn7l0XOu3IP11XE+V/yZBumTU7oj+8lARwTpFrnk1DizVKnW30\nX0N/eBJ3ba4z8j3vIZ4ZmWJzHNBlbxbvjcNHNYTRtazxaDqFH1i1uC0Sds6x\n1uidhozepYjGNH5NXp+JY8eEKM4EZa3QdCyFn/Kg2eOiC7SlKS1VfpJkRGDy\nu4Ho26kBS+zJ7sW5SK+px6ZBP4Tpl/0uk5Vai7TAECe5TxeKe7sAhf7ZUWhF\nrpAk0vqgbM/8zJu3+XXU5wlaloY7eh0cUfgUvedRCyZTyUQKO+qVqKiwuS9/\nAE44S2O0y2JuIYyLyuCVBvIZBlAvzE2OdZ2fVxtAnSUPhSbyQo/dE2XNodlU\nw9H81ykV3Y39SRNUAPUWDxnwdHc+3zBUn//bfq/Nf4sInCjeNs8qav8C22Rq\nJ4uI\r\n=dVAm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEVf9j0SKCAQzD274iFijPYQlqgMglW7FksTIUVdyJ4dAiEAp0nwp8QGNubWx3C4tFQueHkfcxl8CeF3wuRo+AWoNfY="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111212116_1637529418506_0.026950180672226987"},"_hasShrinkwrap":false},"1.1.2-alpha-202111221954":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111221954","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0f5baf4923a7d7703b6f543f326da9d872815096","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111221954","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-9iNsYB1o2RqqeuUIfCKjkWEp2Z7sFb2+LAKnWYdmmgCKT7VeZZw8ko9L9oF76akHvFTD1AoIUToZxdJDhAHH1Q==","shasum":"7d6ae26fd756c45c060c2ddc96ea0de5e811aeee","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111221954.tgz","fileCount":170,"unpackedSize":7046815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm/VrCRA9TVsSAnZWagAANbcP/3O5R5SfL+cNiuj/0KWi\n10pSmXBbfjr/snLrCHMWbJpq2xHA1q4n+Jr89Exs5EAcg6PI7WrSg14KTXAc\n5XlwhE2pmZpviYPHIQzGMrwp1tmbyty97C4y8tDPF5C9hK0EtDkPypeo0GEo\nCgednNaNo4Cj3pEVd677hP2DGfGG9Dkjfyood3U+VJdcl2YPDKAopvl5W5QY\nHBUMDVHNc+Z59YrT2yaUvPnChDswxVDmagvuX45oW1JONKKpxRiReTKdvs8A\nJSlTiH0OJN7ZabL9myC0Cl5ymsd4j42h2y+j7ZBCgcvCEvyENnAMLfsiUBsN\nyPU/6S5bvDf2i045zW7gulIoiA7RBtXq5t07H5l7ffWv64OP7IljBJxE8anx\n35PEMal8rthO0Rlc9Zu7Ox9xkYdR1+x1DJMeL4hKHj8p7KicO5ozDmmIFLqW\nqs4nOtlnEwiwMmeqSaGJW2TZs3rPbUM7YE3WcYUvCQ1bOOdP7ApTZ8FWc5P6\nHO6u1wfqL++v2vgb67y/fpdnbFdKsyQyWEZl2luWrk4H/lSgK5yE9i/iJnhd\nUrPLkBfX+W1b+Raf3+iYhJ7cNSyt0+3yZ+j0GsrURUdVn1wfEN2r/9UsRUj+\ni0A1JYdSf1acEEgD+q0arqVx81j6wrrEE3zJfNICMGhwq9M3zJt7LA8UvMnI\naNpR\r\n=s9Df\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAG2A93Bx4C6tSnIf6YHhw2/aNt4f209/qkjM8eseqSAIhANo9HwpTIwOkDLZbP4D3HkjWcgGk2KX7ASrKqoiYNFHs"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111221954_1637610858793_0.32039328482859886"},"_hasShrinkwrap":false},"1.1.2-alpha-202111242117":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111242117","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8808536591e9204e7e2b28518abee2e46758f57d","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets:\n\n-   `-p bootstrap`: Default [preset](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml). It's a private network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) network. The default bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111242117","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-17HwLQRAQNk2LZ+/CXxZ7eKi26IOfxVp+2DcTUT5Dt29BQm4MPEjXYrIqkrFNt9uj9l39gEsrT/7UJDo+1AtLQ==","shasum":"43fb943d3ee82340ab09c3d3632808ad3c2ba3df","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111242117.tgz","fileCount":170,"unpackedSize":7055615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnqwMCRA9TVsSAnZWagAAbuMP/2Kxy/RKZil46/Aio90b\n/PlbeSEROs+uU5kIItyZtfgqh+IdgkK0f8utCHtziP2E9F2ZGVchbvNt2Gqo\nMS6yng6AMZFMz381R5pDVHjUrdB4yiX1ib6gydHFvf8U8nkWc6B3crcN5PTI\n2Im51AoHjT9y1KVVnTnNCzG5JxHELJi45u5O9PI4KjB0b94m5D8yyVCJlmRM\nd1e5lh57apMAVr5pL4YcSR0nCIukMAHW86yqFckv3TIk9dtV/UUJZN7h5idj\nwY+p9CL6Jg22NXQ6lYhQslGMHSVVRFgTW5YV4MY0iOxJAiYDzBdul+gAhkkt\nCirNgt5gvRhQVqHWzp5dNEb6sDzpEmeHG/mh4r9qgMKpEAYD+LPmKtIY0QgU\nJ0pP2c2Ac63X1kM3scug4IHgLcEGpVcpAiz+vkcMKkPZvJZvfl1BIiLn5kOz\nuYK88wPqIeUkRlIjjb1jy0B610jRvZMd4Pzd3WqBAzhVC0tAuTwmyI83XQ9B\n5hj/ouS5/q38kJwsQJq2C4sITNf+ZOceS+mFY463znuPp9g7FWmgeoXAVpZZ\nVBGK0lGGkE6BVvSIV2azC23h/b9PxWOppt4+L2jG+I5CRQUunuhMJgj7zEua\npTqWQ6aX9l+eSPZrXib/r3J4rNHK4zho5XXx8SPt8Mo9RSIhbBUQwp530G2n\nCXGu\r\n=Rl+/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJOtJlr6EVz/zqRl0pNYYKTddzDPydhi0UpOi0HakkywIhANO4gtkedgGrhwGFVXvDROmKDyNQOM0MGNDDdbZUj5/a"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111242117_1637788684409_0.5124779234607915"},"_hasShrinkwrap":false},"1.1.2-alpha-202111242234":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111242234","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"420e2c1ea89fc52261d206b5ca7fbb3d47d00ae3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets and assemblies:\n\n-   `-p bootstrap`: A [multinode](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml) local network. A network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) local network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) local network. The bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p mainnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-peer.yml) peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n-   `-p mainnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-api.yml) peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n-   `-p mainnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-dual.yml) haversting peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111242234","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-XV05iewK2UuoMdEKh1wBAGswd7wysfIsN3bfS6aXL2AccBo31sd/VCN5TYjxBgkJPp9vJpMKdMEF/SbYbvza9Q==","shasum":"1412a0fa5f86c1ddfacb30b9bf7331036ea51694","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111242234.tgz","fileCount":170,"unpackedSize":7056798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnr4HCRA9TVsSAnZWagAAPuQP/R0IZBh1kAr/42to2FMZ\nwfcoUZOQ9dWVs9Ee9g3ehcQT52H7f1pasNNuH3TJoE7+SUj4UGxPgWrdsHZo\nOz7K++CKfulz3zlbIz8G36/kHeNyKY/yrJuSN395iVSSkFPVINxM03HsTT0G\nPqzAj/OFjbXoYepnRrUagJyHqs3AiZL1QAvmOiNExB3AzzOXgxeqc7q2gj+s\nO9bfOJ8Iy59TGvd9gNVqvElwzXj3XTCEgtedAv58Ok7vilweBA8NfMbGIvXO\n1uteHVKHJXLi2FxNejsrZg1lQCPAp4cIDrujsuBsJpSt5bf5PL49Sd94ZuKs\n1B7E6F7wy1Eo3x4UgEJ0mADrCuiyM9RurmtFrxPJbSnGmrdxapQq91gbleB+\nyOWDqIlx5fL9dND+7HfFKxzaFbda4tn2HOADJzm22riqFeF0ptnvGvjKKn2G\n4qUjyT8i9LoISkvl6pczjlsXwBc9jKYmFlmah8sIy3UuamHUdK4PNNSp1y2I\nCo5Xa1LRM66QbH4R74SpxAc4wutm7G6UAFbG0MJN2b415m0IDmyrZPJAUxjJ\nVcLDN98Qs0BplmlKPqtOpOKGsZ8epRvmqNHmNroS1G4njlL/vwUQ3SEB4UPY\nE0oh0PMLl07xWULaZjFUHNerReBbcc1+xxMt2UMIdIZ6p4vwvn/WehJkwdDM\nr9nK\r\n=8BpQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHMv7StrvzV59Fii9Aa57DwnOdaRtQ3tK1/Yj5rES6jRAiAXNXX605dqSzhQuoOowRVqtVdJk/1dy1CisVA4hDCFrQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111242234_1637793286723_0.2040333821734277"},"_hasShrinkwrap":false},"1.1.2-network-202111261011":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-network-202111261011","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to created nodes' connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to created nodes' connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`dualCurrency`](presets/dualCurrency/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n-   [`singleCurrency`](presets/singleCurrency/network.yml): Used to create private/user networks with a single network currency configuration, just main network currency. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard api node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node that contains an explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): An special assembly that contains 1 api node and 2 peer only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: the generated explorer configuration.\n-   `./wallets`: the generated wallet configuration.\n-   `./reports`: the location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2-network-202111261011 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a demo -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples are running `mainnet` and `testnet` combined the `demo` or `multinode` assemblies.\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"c626ca050e26dbd9aedd4198b61e621d1b5bebcd","_id":"symbol-bootstrap@1.1.2-network-202111261011","_nodeVersion":"12.22.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-ERkMO0tLOGX0iuNNetP9m0gNWZ3hj+XNnhhjimHnNRq7PRzGeTt/iPjV2qvucMhcvEsR4iqh+DMlZcPXvSRJZA==","shasum":"a8ec5e0a654b38e72e7e28501193a02beac2fa5c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-network-202111261011.tgz","fileCount":172,"unpackedSize":7058544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoNz2CRA9TVsSAnZWagAA0aoP/1ysD+PaUlqABX79Pt6A\n5QEWxKk4qXQ2ilKH6zFVGfgsl/vL68+XPUJ/5BGLBedUtZKgZbqOUaxPqOYe\nkR0EMUqlTPbCZ0XILsIktgwu467JmgHztOBWdKnYMC4VBIIuckZ4cl0MoW8t\nSTFsfMZDEcfbcDbL3AXm4sQzTZAX4SHIoI1PgDvjwD7RvWWke3Ak6DjtRCx/\nLQGXmamjN8dxhBrrS88yJ7IkhJoJvumnGXPIt2P/0YtzmBl5vOLz+iByx/dJ\n6Wx0Y6FUEUCsCBeFqDRwKwD5678EwMUzqJcuDatAI4k1HwmGzvQWAy5tLEGh\ncMm4DyM2CviLFUt8SuiPdSll7NXNLa3cg8/73NmkbpWsMrTnDZ7NXTkMws6Q\n+T9IHha0JPLbsN8tHNuLSTrJRk7JaidCebkc+eBvF9L2/E3F4Lcz8SZ4ZJHp\nj0CDgpP5u5uJ0vi7TYOlp2knWn0fOfCxiXrmvg8PvIx7OsXuHNHrwmUXrgil\nrBM938k8YCuNOGAchsop6eIOpdU0WLNyg2ZAO1aA3r/1K/0gQBQLwtBOg/Yr\nIipdGyH4xk/SG6gC9undLSjrZTH1J8OA69nFcfYIp46TZJ0ATS6/zje07ya8\n8gdRMfwxGqhNgaI9nlSA+XWeP9F5qKXy0MTa4TGzI+vQVNSetL1MEL2a4vxn\nCQn8\r\n=vRuZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICrTy1Pub9+4StjV02U8KDHwnwclkszxAhEwAhU09K9eAiA+bZBYwhhq+MwF8+2w9WLKrYcNyj8cx121DzacpTfkxA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-network-202111261011_1637932278267_0.9970679522118442"},"_hasShrinkwrap":false},"1.1.2-network-202111261018":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-network-202111261018","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Commands](#commands)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to created nodes' connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to created nodes' connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`dualCurrency`](presets/dualCurrency/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n-   [`singleCurrency`](presets/singleCurrency/network.yml): Used to create private/user networks with a single network currency configuration, just main network currency. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard api node that contains 1 mongo database. 1 api node, 1 rest gateway, and 1 broker.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node that contains an explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): An special assembly that contains 1 api node and 2 peer only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: the generated explorer configuration.\n-   `./wallets`: the generated wallet configuration.\n-   `./reports`: the location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2-network-202111261018 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p dualCurrency -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p singleCurrency -a demo -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples are running `mainnet` and `testnet` combined the `demo` or `multinode` assemblies.\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p dualCurrency -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n# Commands\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"30c989cb15b48ef1f0db7a717033e5aa31e9d9fe","_id":"symbol-bootstrap@1.1.2-network-202111261018","_nodeVersion":"12.22.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-X/FsA6CZVOyBHAMwYgs7eCcgXs6k0cjKNkbJIi1ORpOKSYkwvSbOxthQZdBTAcOeh6d+97uIKPlofHdW3MuG/A==","shasum":"c09f6eb83d8eadf09f0a9732577b1627a7a629d4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-network-202111261018.tgz","fileCount":172,"unpackedSize":7058652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoN6vCRA9TVsSAnZWagAAk2oP/3iUIWLxM11jpO77ZfoE\novie/l+EOmF+6GvIuxqiOKl2PITlnuLTp8M5p/RP+18K8UEa6WhaL/DMtVuh\nc8zqcoPjfVrOMdnJN55VK3lFfi7bHvmQIE30B903HK4i9AdQlPZCqUT2f+4C\n1/gVQ0uMH5YwU3dmAYrQ+l7L1Ck0tWR4BcYDUrawIBw11QoiLl7CZAiN3mIz\niRVWgNNCPrY1EXoxbNKUAo5PxYO+VGPe0cpLK4pghPWhsaFydJelmn6mJ8rT\nYwFcFzf+rCBP7kVPSgvdY4AcOQsc/uYDF/NWJiuMnTlE3KIAzjK3zRBWIc+x\nWMbKcHrN79JxlY/U9m6GXw6PxksIeBNBXm8rpOQcO3FVRTulPhqDPydgSbqk\n0GZgjIBUR01SbZ1MIv/sJMTz1VesJcqWCt7IBwQcku8wNp4N+ECKvABdfJP4\ntexjFjkhBVgVfUL1Qu7Sg6pL1GuPmUW40BbbdnJIe2aGYWEg8TSN7eYcyzkv\nc0LqCrqFfCK6mfJoMOhXCOqtXNeLiU0veD1B/nVkCh6VnP7bWZGi4A98etBv\nBXYDQwSQjD5jRpxZfvBtLogxiDDSCCkIlQIy7c8cCqGOg9a07GQgIInNgfQP\nwbCNph7kB+/P0FWlO8JJxUOKTVbCn196oM0PyBwXBqFN36roGtTCgVFebeDK\nKlXP\r\n=cvK2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHguyTu05blDTLxkWbkJpP5NqPY19fPJlWv8t8/aevqfAiEA9dOsfQErn0EdRc11m+iUwlUcCZBtDRJVafYqSyfg5+Y="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-network-202111261018_1637932719592_0.4130369624119026"},"_hasShrinkwrap":false},"1.1.2-alpha-202111261414":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111261414","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.1","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8b5cfd51d2c182a45e9e0122e89baf0f60bf524b","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets and assemblies:\n\n-   `-p bootstrap`: A [multinode](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml) local network. A network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) local network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) local network. The bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p mainnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-peer.yml) peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n-   `-p mainnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-api.yml) peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n-   `-p mainnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-dual.yml) haversting peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111261414","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-nHKTDoeRQWOZGep00Z31yjFSfJs+H3YMOx2rfa15VjhBQKIA6TU9YHjb5Ym6ZseeWDwj6OdnaR9pPETb27YISw==","shasum":"87b4e5c7d718d2a39350684956e151a2c95a8cab","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111261414.tgz","fileCount":170,"unpackedSize":7056893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoOviCRA9TVsSAnZWagAAkkMP+wcJTdpx96wG0DJy52K6\nZzrN5UCDOO9N6bjOhP6c1/wba02TYFOly8NpqmSNYXQCEivq80rI1bhZwsRw\nIK8/c8nkTYxliSh+Y9koNQoSsYXo5q0X0Y+tZqocQnGhh3/mdBh7ymvNziuq\nDSagkOWdNW4WzrXpAPGG/uk760sBy9KosuEWVK52/vz9bXFv8xJi0vaYs/mB\nYLbY5Kf3MzQMvQ6ueSWi8N4XtvfmmV88rXzceuqL3kGBhwTNAlEkBqL5yAuz\n9F+lqvxDB7b1KEzlKQRX/izvR1KknjpTlWBy8NKvcWGp9bnIAmO4qFQL87gq\n24oOzFUr6wfNb5ZTSXklM+n5YSbWl0e7bmo+p9vXCCPO+YJ+BmfcZuFml2om\nn7XwV0TEq9mUg5z0vRQMNDRal3SEC7OYyhiKSIVN+n/m4HFXh2r6rjAZDFfK\noMSEKKwEOwG4pbNOobHwddaNqsiHsGzBTKYDoWRLK6CuYi97zN3+dnKRMEJA\nWFxD8ZT4PcPhk+kg9dyvuJlhvNJtjEcDDjotWmTdgbWmDT9IRgioSWZWKf4i\nqp2u1yuOlcv5/3XoHpaSgqy6hYNgwpgIVPK3wkD0q5d9adK32N1eT94RJB0s\nnZvShpqfxsqG9iVeXRKBWW8c6bZ9HyI5L25MPiV4ut+hDwkWoxc2hcE4cKp1\nTaUJ\r\n=0MHH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcB5PYyg1kJiBB0eANA5nHr77h2gdpozK7qh21Llnp/QIgf1nDoWU0ezrm9J6IbHOJG6YEW+KiH8Vd4YT/Mq8D++s="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111261414_1637936097765_0.6190902219508512"},"_hasShrinkwrap":false},"1.1.2-alpha-202111261853":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111261853","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"7be0077490f123e1da741c62d330cc8220dc7d98","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [General Usage](#general-usage)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\nIt replaces:\n\n-   [catapult-service-bootstrap](https://github.com/nemtech/catapult-service-bootstrap)\n-   [symbol-testnet-bootstrap](https://github.com/nemgrouplimited/symbol-service-bootstrap)\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the main preset of a given network, example: `bootstrap` or `testnet`.\n-   Assembly: It defines a modification of a network, example: `testnet peer`, `tesnet dual`, `testnet api`. Assembly is required for some networks (like `testnet`).\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Out-of-the-box presets and assemblies:\n\n-   `-p bootstrap`: A [multinode](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/network.yml) local network. A network with 1 mongo database, 2 peers, 1 api and 1 rest gateway. Nemesis block is generated.\n-   `-p bootstrap -a light`: A [light](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-light.yml) local network. It's a version of bootstrap preset with 1 mongo database, 1 dual peer and 1 rest gateway. Great for faster light e2e automatic testing. Nemesis block is generated.\n-   `-p bootstrap -a full`: A [full](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/bootstrap/assembly-full.yml) local network. The bootstrap preset plus 1 wallet, 1 explorer and 1 faucet. Great for demonstration purposes. Nemesis block is generated.\n-   `-p testnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-peer.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-api.yml) peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p testnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/assembly-dual.yml) haversting peer node that connects to the current public [testnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/testnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/testnet/seed/00000) is copied over.\n-   `-p mainnet -a peer`: A [harvesting](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-peer.yml) peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml). [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n-   `-p mainnet -a api`: A [api](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-api.yml) peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n-   `-p mainnet -a dual`: A [dual](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/assembly-dual.yml) haversting peer node that connects to the current public [mainnet](https://github.com/nemtech/symbol-bootstrap/blob/main/presets/mainnet/network.yml) running its own mongo database and rest gateway. [Nemesis block](https://github.com/nemtech/symbol-bootstrap/tree/main/presets/mainnet/seed/00000) is copied over.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored. The folder structure is:\n\n-   `./preset.yml`: the final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: it holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: it holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: the location where the mongo data is stored for the different database instances.\n-   `./docker`: the generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./reports`: the location of the generated reports.\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Usage\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\n# General Usage\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p bootstrap\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p bootstrap\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap --detached\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -c ./output/my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](https://github.com/nemtech/symbol-bootstrap/blob/main/src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111261853","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-zAaBnRqPrr+99+WRgTMMTnJOTXo71ioQYS98GwxvIE5h2SV+ShioVoaUmNh2cZzup5vdue2mx9IxUJYtFi6VUw==","shasum":"2654b7c74e9b2e75750b3365e2dd00de755b2c66","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111261853.tgz","fileCount":170,"unpackedSize":7056893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoS1NCRA9TVsSAnZWagAAmr8P/1pN5hnJWsWm4shtLw+I\nU+ip90LN/P0grRsMTMI9OuPZel3QAzmm0YZkmS8ZridN1vdEgIFudNgnU/tP\nCxCIE2QB45EYjqr66btUEeqP5RxjNBqmWrPeTmWn0UVszigE/rKiiaq21rd6\npKTmgKk/4khpDETUtdQ/DsDuVkTV+Al2CoHKMSpDgS99NKqvLCKCm28esXr1\n+HwUD4PfPhWKoGvWr5ic8/amJfiAnyO6kMJMv1MvL/jD+1mv6eRQDNi7P4li\n45fE2afyNqZP7a6jq2ub3WbeSLkWCowrvMPuyrVZxrrFVsn6w37vr7eWC3gu\nK4oYXygKCTynG+ZIkv6EtJaz2e6z+YypLDsPQ6jkVnZfUwE1W9jR/D0kdVkT\nwBvAJg17FOuMVUDOUbopOf704Zig/NErLx8br6sbMRT2lzfeK5vAUCX6xaxE\neqn0cTDxs9+g0XNAfa0lSCl7I4IYU/1FNi27yy7HqvzstFRU3VPBYikeQ3zD\nk0H5Is8k8MVzSQs3es/I6TuNgGa5qG48wRWYEGQyTNTy41BV7sPU+/+KIHor\nyYjv2OHJBO2hpuZJTzMb6Xal9sz0q3clAN3mI+YuoYmJXifkBjuILjiQIZDf\nC65YTcjomr25wkKLx9zfmxgoKGhe5KACqLo5gAzr2JJD59E10vMBjZsf3rpi\nn268\r\n=xLh5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDemJkNCKFuULBSTwF8Dq+OIq6IL9JGcVgrD758KOhfcgIgYU8tE/vJ8WkrL2e3Zr847NMaHjMo9pPx4r3xaErX2XM="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111261853_1637952845780_0.9443759075001836"},"_hasShrinkwrap":false},"1.1.2-alpha-202111261904":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111261904","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2b6d7073f59c6a2599a619bf04ccc68f307d757d","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111261904","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-KZaDfhVUcAe7a470ntZ7EDxdc5RJwcinr+I0ujK/J8HCo6vu6tqX065JfqAcsXP9MXQ2opzU9yUXmhUaMGZw1w==","shasum":"65e210a71b7842471f89863b43159ddec5d80fe6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111261904.tgz","fileCount":166,"unpackedSize":7055473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoS/LCRA9TVsSAnZWagAAAkYP/3pDkX1/r2F7T+xnacTQ\nfIptWVl9BXoUIHGXgkZYXDwnwi0/ro4NRCDYc2Ifi465KZj0S547BfPYMoCH\nHWgWe+nfy3nDAJ/RnxTGIU+lZusSKNXesPvzFbeYVfvlsMEYnzv+ZoKhKzda\n52u+/7WMJbFl4rKMJ3ky19kRcJw6CtyLa93FrXkSDMK/AkxKg89tjn2iTdQG\nCCFE/dl7ElnQg+YFBdioi+P3vS75Z474Gb45RBJMO9chPVZmCnvkawOfDZqu\nABlUV408Z0QHrKkkTnplmfTWye+fvvNDi7JkRcGAC4yV74yGtUfjiaqysvCq\nFcP9tgeo/NEzJgQ52sm9kwWdVftq3KaeiJHe0bXdQlYNMT9dcG6UE5Kg6htk\nGJDMCmEjzGCuxtuV3DBr0iV1TbBm23UCyiTKfW6rWuJxPHe9/OGk6ILXytZI\nFIGgPPp9gFUqXjmV0AyLWeg6p5L+iQ0JhWN/47eolGL+clZ5I293zu5+KUNI\nvL5/p3rzrJt1WIt3zcojcu9DFlG+Ydj5TvHxxvy1ykCPNPDZYNFUyrZST0xX\nyHtQGp5wkvd/jeQ+/9ES+5xi8WIlMQrbhFff0vHTn0MbYpcj68b1+byG3L0k\nFho/bj+2w96Skjco2vCjfk0ADRE+CmCqe3iZnrh9d7Pdca9dm20BSFaXNiNk\nC20o\r\n=dTHI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaJlxw8EZ7jxis0sIktOxK6QZbuVwH9vABgL4By/5VDgIgOtq6AASKINsdJmDUITk13nWb2y+uir8yX3i4D395P4M="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111261904_1637953483399_0.28994448759245506"},"_hasShrinkwrap":false},"1.1.2-alpha-202111301314":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111301314","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"0ef8c29a827df2d5e6712331f5001290f845587e","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111301314","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-KxnKHfzDjzXQFR1UjaHlUaMGs3fKnar8+mKEaWilQ3UK0FnI4wN8MVshe10F1+KQ4yy4jYHC81WbJxskYHfE+Q==","shasum":"fb8f9f56cd57d18983d56f55f8bea9ce51261ee4","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111301314.tgz","fileCount":166,"unpackedSize":7061867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpiPBCRA9TVsSAnZWagAAL9EP/03y7sYjXzyBCHxA3T/J\nCsn7iHcYWNiFxMiIHPgIdzd9q0jN5pBmwUEqO18mEvxnF7+0iXLtJ5ahP18v\nyldUze6JKrHpy26xGVK0wlYVAY/p45qghSROeidiwBoBp+RUEmBckMMu8elh\n6h83JCngcgjNWgM0I+aI77YTXtkeV5nLWARn/v7i8k6J+9PCEls3XPffrgY8\noy74swRfvWp8A2fEyeGDxZ+FGlZDm/fQedbJStOgQIUpah+/FZC4yf2JGEfk\nN+Ii9L6hOMtKcqIr4sSgACVIVbXsT5yrBbb2FPCHWbtqTAyZGruA0d6aQjDf\nBeMDuPX8M3taH8tSc1BGUQc0eDYTxxfmV+BDrhFShem2WUMrybLozLUJj7zu\nLmnwsTUhQAEG00fvhbINAM4JbUwbrOHvQzDY4afqIFRUwNvhmGChzNucy9Xe\nVRxVW+Mrp1s5GioWTEQFz+thu/KmCXSbjSDmyE9i+up4mguUhhTIRUCFrIIX\nVbWw2m8KMXoosjPJj2XjHmy7WZtDpH+r3B4lsq/n+COKRCcdKsovEA5JFC7F\nHvMaPGQwCWGanfJDs/3QcmZy2yAOhVMz9bFnG8PIbjBjZCt3WQkpcxkL1LEV\n1qqmNVrhG1/NiEFROXNuJ1h5+LBk2rI5cT51TuyULJkEDChqLU0xCpcqUNUz\nL4Gw\r\n=oeT2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4xmztG1+7k8y0MLJFnqhP59ZxhvT+n6yXXiW166VgHQIgaKW6Jl/XS9B+jSlyVofMtWzBaMTLKmCQ+4sKOhx4k50="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111301314_1638278081497_0.9341850824589737"},"_hasShrinkwrap":false},"1.1.2-alpha-202111301834":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202111301834","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5bf0ed1c204a1a6d25540fb0fd4530bda1d9caec","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202111301834","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-QwaBHBCUC7m/IQOHOuTsCbNXV22UiyvYdCckZFjbrYD0qPKJcLBcx0gSiLcWKA/Far758vUQdv1JY7djedBSSg==","shasum":"f42ebcf135288748a3e24f86effd81b5c084a0f3","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202111301834.tgz","fileCount":166,"unpackedSize":7061938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpm7gCRA9TVsSAnZWagAApfgP/3YnuBz/3KhYAqxInOPp\nVwo+yLbfKofVJCU/gqAcbnPZrjf4LcCQkCKEdMCEp0NBoP1A+PaaieVEdWPa\nAav4WSnEKaqf+sYJ90XLrKUspbNnbTdYYmsVX2VCEFLvUY3jItLxp9x5iCE1\n55rtQg8cUvwi2GyzY1xwNUuQj7peOqqD5VGFSMskiO77ail+fWsBqGxtzXhZ\nbxrN3MlA8cgBiX7JMjT6fsI4s/SU4jp5Bq+UmDoJO7ucq4x8qzgX7xaXoLu+\nvrd11odm4DpHzQYNcM/VPzMMbTikWFjwzAHac9OoepAQPV0soovSsK++7yg9\nVUmrBVUSyX1om09p2uT5pgd4ZYCY0LQixTOw7hWXzoCSud5mhw/wLhKbsTk3\nyn+9rrbn7TrlBITZgA1pSP98DcR6tclD/F7jZAJW9NEhQd3WFR+Ypk9yxE/T\np22xdjbR6cPqMJ8lOLuHf/LD3Df1WvhrfmrDim13T5PdM9yw/h3Wt+di5GRF\nupGHu0S/yqCc32QiAgNMNJExnp+PZdXF7DUy5wXkOgZ2nLTDGHgZ233LfS5U\nzQlxeYBVvAXPhSb6tR9albyDtav08ALPNSka4+99zSJSY+T5u1EWokPR+2Gx\nzx/E8rQA3iYwgBnZ6w9u1I14EPMXlj9Tvp/J8OyMCDF60mCGNyza0upPBzgy\nl0gF\r\n=sisb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/AWTOEtNpCnX8viuDyRUf1zyoGuQ/eMtVSIci1HWCPAiA/ZzV+DyaEi5uVLMAuyhYuWcuCiSZM+4IisEf83Fre/A=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202111301834_1638297312063_0.15108623192661486"},"_hasShrinkwrap":false},"1.1.2-alpha-202112032036":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112032036","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.2-SNAPSHOT.202111101304","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f3188d52d28141a7d62d465403eb808e37366dd2","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112032036","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-NMqQiKxM7CDZYfGl4CTkyuxvJc1U3elxollmuPFDAmhIKt5Y64qkHPxGfyogfcjBegy+lZ27U8ZeOjZkLYilMg==","shasum":"db1bc591040720fa0cbe3c633e8cf5b17122c835","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112032036.tgz","fileCount":166,"unpackedSize":7020407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqn/JCRA9TVsSAnZWagAApm0QAJ46idldAdS1FWl00sOs\nvkSTtYWlMArt5l2gXzZLLInn1nJjU21j7VvRLtNYB9gFA61rTjaVfAgMqouL\npUkzeLKAHm1sBCv8IGjukpx3nQIfg2n6tOfxAQP7s9+8PhLjm2oswPSshe16\nMKfGu56C8tTs7QSWeujcFkE+KfJRIsZQgWahqvpFfNXTnrNoxqrsGy7bWn4D\nGN4tpHCHHlx9oNYBsIiHw73gnZZR3387YVexzwjwdiVYXthU0zZwKkHniErz\ndOTuKH1JOtf9nEDA8nHNFiqGpDJ+8aAPbb/Bo2IM4XJOzvoiGqmaPAlNYDYf\nC+yEpJc0KdiTHPsdhmUlOduW56U7WIJgPtfMu52qD5lQ9BdWZ9RH5LMcoOVu\nZXG1n22O8fLgzK7Hc0XZBqvtdrm6Kx9IWhRqJNVDFshoR6Im6Zaw1o3ReYfq\ncoLYFI/AObjlg4DCaPcqWSl2xeC6jkN8lJwWOiUFowJqUMC2a7a2ksoP03hJ\nDqGYSC3QqJkzfEWAr1YVlJUTaeBbr8LNBqSrLGShi91Q6XcanYWuORb0cjeZ\n4K5Cm5b8wleyZMOSNc8Uc+kD/VQLmkOQfC+oCqNRstrsxm34/Op5fTnI1jMt\nokTGaZ/Z06sxWqGE1+MhnnWhoEpvBeNHI3x/DIXJO/PYrDT3fnD5Kj2GcWCm\nLfEX\r\n=NeQN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJIJfs2JbDwYemKtg0O83NXCjBDpghPcqoGPAUOt1+HwIhAKAZ/y6vm33sCVBEru4wMmQaIhWPFFnN+yI3LdpITkj7"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112032036_1638563784888_0.031289147930926964"},"_hasShrinkwrap":false},"1.1.2-alpha-202112061047":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112061047","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"b44334427ade93966d512ce2aa7e02bb6f636401","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112061047","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-6O/fmhUDh90o+QIpurwl5AtrsySOdL2BgzlcFSTvaY8lGDQZtzs+qmWAHdH5OK97xLO5Du6GqUGFuisB9i38dw==","shasum":"c687cb416eb3d39f4863916b560b888d72171068","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112061047.tgz","fileCount":166,"unpackedSize":7020385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhreo3CRA9TVsSAnZWagAAdy0P/RWcvD8RcFWZowy9ZHLJ\n5D0c6fjwPrXcsGxkyqM0O3odMIbw+RhCTJWGytXOhQ3T0g+v9ekAkus7Yck3\nJa2NgEcvxYURdJeYRVzofznrAUQ6BK+Hnf4MkNUq8pFBrnROY+IrejWCF5qP\nj65RpQsuS68obf01A+aYWEsDAYFxf4jExAToiAzIW0Vzy9dhgN4Q+kCWmSvb\nBQc/VQJz2kgYWS/z0X+H+UxTJtWLJ0S+1UrwRjXHo/kPXWNsl03AYWDvCkke\nJRGh7J9ktSkdrKovWBxefs4oUAXHsT5GO0lETXU4lAQBpGlSgaAd42zk8Xtx\nyXBhrcdKvrQ+neQIUzFcQ0y0vT4xRw44PnlNROS23maLMgv4WMHMpkShItdi\n0Vlra7b06cj1DHCMh30DzmH89vl8r1PmJomC2iggUg1d2CbybMIsqOdNaeju\nkbVO/qVbs+55daPm3fCT+COqruHbKY73s2xgD9Zl8iZ82iuiP1Eehe4kSo7y\npTVvnCmjPT5s43nsCntx4UElE2hQb5VG0An1NXOkypQfEZ8NXhaKcjwwwDR5\n4omWBdq6Gc0K1MWksU+UMq1Q+01rmrCNZLdK17phn/XzhBi+LHMmwzGmf4rR\nUvjIrvj3VwFqid6CqG0BWm/u7aAFMF9ylm9LZP4DXFQlvH8BA8uqP8Z0Iz09\n4x8a\r\n=5rLl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZmBSuN9kKo442kAq2GvhqQryHQD4KwJZPRmLetAnW9AiA+kd3hBRan0aUXHwUnKzzT4OLq4EgHDorct69qvx+0Rw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112061047_1638787639265_0.6764074300507013"},"_hasShrinkwrap":false},"1.1.2-alpha-202112061437":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112061437","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"454c2537ead2bbaee1dc2d2da81e31b242fe1a88","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112061437","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Naarjc1iY7fPDQ+OH/kCrcwMNL8uK3/dKxoJg8IbCFnt+1cuVv2e4OMiUdCFUq2NNzMIReDy3i1XlASgky0qXg==","shasum":"33bf266b01d01d11d8c3b552ff58965eb4440098","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112061437.tgz","fileCount":166,"unpackedSize":7020385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhriA4CRA9TVsSAnZWagAAN7AP/0alvWRMnUvtLHWcP5xh\ndV8BmsgFNeWToFFgXFn2m7ced6zNvOXKNW3oET5EM+HuTIMqfmoic0PPU2tE\nR8A16vsefVlfUZoeWRmjrIm8Hadg/dxmyHETtylPlKPKMCCpcx0sawcOV7WN\nl7uuOA3ZcLA/it34WZz1uR9wcPurlbooQEEX/AohvCXMHmgtM8VT9FtaRljO\n5/xNxznz+Fkeen3CcrAXhlMcxPQjZTQ7SxDPHdeIfp0KKzq0dtexTq7IKyhu\nrv1dvHU76tTPKbqVvdwDGFsIErmiTWnXIUHcJSbgh5ItseNeWQnQSK3P0oQi\nriXSJgNSbnwmu1vO7V5ldoaPwfrtCdcwVZSSCmBNTABugY+evP/QYMD8xr3j\nZw0MmzGDeUvlmutuC1tsdl+owbDDKNpizNdWDYm0yoDIl7jsEkG8QQZ3HLbX\n1n7IBaYzqdDMWn2q2ce9pzd2EFef4YNd01A5s3IF3vy5uIKNnqca3OLx0/06\nNR4/CE9qk6Zc26Jb61Gepv6QHU93tdLzdNqDK/Gx6obLFlw1tsTzRAgUZhUc\nNlwoUemm/hY5RTmTGVF1CGaUO0pcEWzZkR+nZt7MBAiTsPKsaNPn2VrtDlo7\n27wbbkhggMdR1zlC2YW7h67hImdafKbwy0umlITkfvRY7Tw4BA5Jc8RqAmou\nfeJH\r\n=UPd/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFQebdxST9nO6Mq3PLaA8nmDQXU8nNd5hN1aC5BKsubdAiEAuByTI+Q8GZW8nbJt5kBZJp7kgQEdnnezX/663w1uK5U="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112061437_1638801464460_0.1645493629926318"},"_hasShrinkwrap":false},"1.1.2-alpha-202112082043":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112082043","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8f63aad0527b0198435aee3d3bda726076553119","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112082043","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-wZ82DvViHz6JdsGZ3r7OO5mjM4QVyWgEnyYSjWvT0TvULQwXv4DcpXZTaG7clrADwzf+wQsMSrHlSQvm1XDMNQ==","shasum":"438ef9676dd79e0967015582d2ea4cc62454024e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112082043.tgz","fileCount":168,"unpackedSize":7024413,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsRj8CRA9TVsSAnZWagAAvQcP/1FUWutNwjD6zCBPPY+7\ni7htI0UaJDmQP/Y9elTMsnd2UwjJoGYpLnvvmCwfkCoEu0RWj4JuBEaujWwP\nYe3fBQi1HhXAlWqPpW1c0jrNP+BMErCuopqbNaypJuMT7GJmMLmT4CRGihXq\nNm1wIImzVf5tg4pZu1jowOMNiJ/s1Jkxc9SGHiACd7pfQdPC+AhAHTT8mbPr\nctQCELz4C0zV+/C2r5ggtSalC5bdCIbwhOeRqaDW+wdjNZ8A50HSeAC9j8r9\nMN9QsQlWzT1A4j6FK2elApgfXlAAfUW8rC7LTbFUED0Ucyl5Ku7vrHW4adC9\npcUYczIqYjFJf+tWDJbJYZLw9aF+saorwJs6ASqSFNALDDCV/t6J/GfRbhgP\nI6I2Byw3GqUCFyPLAFrOy/KjSNqTpNZ7RM7Hb2V58gqWs24QSFloT3ZPr5fX\nZvBwfx4a1N+F/46BSVie7WD5wBRubUwoJPk3yZByV4yA7k5vOtrdpnIkl7QT\n51ld5hTtfXB3HI5oNeVcvP7RaAyqGVAj1MghJpWXrOsuLz8aRfxo9Kh89RQD\nRfzYyks4iIRdsDT1UWVLAGj3cOQZR9E9C/Pv6FmmZoAqzIxFrUt8BwdAcmju\nkIi6oyg6AGMfTLVWmcYNRPVqXYLD2xp4Uz5PnyFGygsS5U9MEvLYrGKjI7V1\n5Ye1\r\n=6Ndv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIACR1wObVCAKk60f1d9zo/sfaxqHv4n2xuEkXmqyZ7jOAiEA96JPz7yLh8/ZSvqN4J9DhyJ3iw3U0GtUMKwxH1yotBs="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112082043_1638996219731_0.6652274440964705"},"_hasShrinkwrap":false},"1.1.2-alpha-202112090220":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112090220","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^8.3.2","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"8b1e8f4cc5cae4e85cc67d3aa07048ae4a449fda","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112090220","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-f6BYAEi/6+7bzouZTDrOMftgt3A+3IeerWTOtQtdNTH6v6cmGC0aPe6ORF4iYB/MOZ8tIIQOBze01rRkGXTprQ==","shasum":"a5c547380156eed37a69cbd7bf3ac85265e49ec6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112090220.tgz","fileCount":168,"unpackedSize":7026036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsWgECRA9TVsSAnZWagAAQPIP/Rvgng2zxIS7wTwDa9Ft\nqXRpKiCngSwaw8Ykivzl3nYI4ei8voiEHizQPOoHp2inydQKpreH1iT9vp0l\nJjtj/cPOD2nS15UU3NSb/jVTD+4j33VlpC8e1iOHf3TLevU21aLjYynZov9Z\noFi2Ye0eIylej1wNbWWbAmwlmjN/NYmoIMryVjt7biFCDp4efMYfBypn3eQ9\niYCGdA9IjeE/keUEqo6mBm8p7OCr7P0UlFeXNoefKQq/0cTNyIbXi3yAKRFT\n1p+GI1jxjalqkRREwsjZnMysCqhxgoLzpwRLMW8FABPYxi/XtBHMvUNBB/Ki\n3UG2Zz/ScU4+pvHKppLoZRtlryUKaxJlOP0B5C77/lO6pzs97LH9CA0kWmvU\nkF8WqMxvwWYNfdY9g3d+55z2GZzKaAU0N32S+1BwYCc3jOL0FvbzWnaLKeSO\nI1MXq3EoiQsreSrEREKrik35B946x2svLRkg7XgiJQem6vHmup+H4VbB6/rm\nmZ7+ok4GSEkLWm04OoBh9Wx6/8pZmeI4f/rt+NNg+xrlVCHeSo+zdyO+YRnm\nd+kfE83RVBajbWieZLe9/CG6d9A3AxGVeFa0CGyEbijJLVttMMA2kSI2ttxc\nqO14EKKsJBP+Lr6Yz3v9GLbCVjwidDy/2Ih86LR2Bo/xdIVxW4FxovQIagUj\nfjdu\r\n=s+v3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtwgISYXb4atJg86A5Ap7IALHPuXjdnNEHRHe0DC8+rgIgKTVj0TgnqSnjXtfGylniZcve3JVUoAABFuruqR5UI5s="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112090220_1639016452257_0.6903391735105524"},"_hasShrinkwrap":false},"1.1.2-alpha-202112141553":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112141553","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.7.0","@oclif/config":"^1.16.0","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.1.0","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.22.2","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"5da0c2c6b8295ed264d75b910db632445f1479ba","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112141553","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-2A4WV1VDP+S+e+b+gdCGWGwKL0/kzKFJ5JMP4XiY7Rfxw1w5zUfzwkgud9W9RKbDMRfjQxEXYup0X8VSTAepgw==","shasum":"22ce466f3a11bc4a0d1f26b29fa051c25930a405","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112141553.tgz","fileCount":168,"unpackedSize":7026036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuL4TCRA9TVsSAnZWagAAeysQAKTrgvdEvbGqFqQ8SqMQ\nV+nprtIHee+v+KYYu7BzEieYrzLfRQ1VbEtFqNeVC6PCf0qiqsa4+iFge7kd\nMdxs2Sqaw0NdowKRqai1l2uGmx9Z4P94BrnT5GteL88t3tRfnCla3AZQayJB\nxvy4FCSyAhEGzXGq4psVYgpAGMWyTv5kOVd0Y9YwFN8LrfW7I+cNRqqLzFMA\nOWV6DpzkRH6UGJdCXLTttXjTCjY1ym7wfINGcZ+IHAI5Dx1eStdH0ZevbAzu\nE69jyJWIVAxml/DUHVsfMGoilc0rjWlRkN3qV4GJcH53W63+hzRIZ3CXEyle\nj3oN7MoocjloHPFvYlL7MjjtE5oZ9KFLG9tlMgcnCehQ9ARhH6jhr0u/gPbN\n7ndYz5OuWwaLLUasEC0VBChLTAj6XF5gJpbRKUaangqOjvASQO/nj0jOrW50\nGVcY6YQbbEGFXnizeJlIutQSfnCb4kcUbQycy3NkrFoxqwYoDlCdfoBp7Aum\n40SXlhFa0Lh9Rq7NsCPtVpUZpDNk9ylCiJWPB5jRJz1A2qcm6O2GBmw3dzWs\nsjN95BBlA7l29JfH8fyIxeabwUY11yiPycG3xF99rvokx29JETZpBQieRXLN\nrZZ2gYNYlRgsmQu2tXbkAvHzRrXg7WeZbGrX0V9DKgWnGqrFY2dpYxDiKSe2\nL2U2\r\n=u53Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/WM5L05IrwOl+xp6qVoCEiCxj4oLR+6n7Py3r8yrvqQIgKDRCiUZnN8Xe5Y+lApOSIQpz+s3ypeziC7dkb/yXwes="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112141553_1639497235312_0.9957507568364767"},"_hasShrinkwrap":false},"1.1.2-alpha-202112141602":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112141602","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a79950b7eb42bd95c717ae14d018ef0acf3ad53f","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112141602","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Hyf7piyNzfdGC42ERxqajs7gO6H+ouZIlXGBnzQDVB8o7JU2FYL1ccKJ/KqyagXYDxe59cYJstvBxpyfpeZRkg==","shasum":"a87737b90db5c6f516d8045eb103ae07ee721533","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112141602.tgz","fileCount":168,"unpackedSize":7026095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuMBDCRA9TVsSAnZWagAAI5oP/2tKoT5Ngqho6Ngfqmz1\nzl4JKSkoacssZw11L9y8MGFiE2T2vMNlRBSCur6BMOBrqT/EWB+Ev4Gq1KbC\nDf+VUUQypShgg89i4NVRqLo9a/WjqYgsMl7fuKqoByW4/XT9BIOQph/GTU9H\ndeKsOYhjORUdHiZasVM/avdb5hWH+fL+ZnOWPEi4rft0Lw1xxCTCgiezLN5Z\nNm+67/aeGNluiKhtP4SVt7smlwjTrx/ehxtklxxI2rAZVj0nf0Qx+hb7f1bN\n9WYAPm5qYReYqiUWBlEYa1kqUbN/TV+tCSCUJXBzI9dZvC9hvtg0mY+/nPYN\nwUcqgzSxSjrMbRE1Upwy8sV4xVLrlbYZyVPvchUcU+5rlp3ifWIugEyrKUkB\n6qS1E1ugK+NWkDZBia5Z23KP1HZyU6C3rHH4VRkIGmNVQcMTUaUp46IyA9dq\nGbZ2/RM7UNM0dfZQiSUq44JIAfBy2TD8U7PagDJFotIi6iZlK3yLxslOG4dF\nefflO+F4ZxJIZBa5MgCv241kMiGbhc5Ej27ztiTHHXLmDsk2POVFXuSFOY6K\nxwaTBqRCqp+fYyoUHkRzrrfyPQx9caZ+Ijwiq3GqeVfmOr8v/B36PfVsvFzp\nUJkq4FczKUOB+ZSp9iaY54zWlBO0IjNPZRG7c8bOIliH7NQEloKSDslJcbca\nzDYP\r\n=9pfE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG8tp+S6L3DmTno9NAR5JMFfGdjbfQC9AcTqoEvnE88IAiAz3A24cREfVKfKqCeom7tEb3mMbbfafS3K2VcgtMvZSg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112141602_1639497795338_0.4514190426056808"},"_hasShrinkwrap":false},"1.1.2-alpha-202112141709":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112141709","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.6","dir-compare":"^3.3.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.0.5","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f0b3117ce2504944e1868ef790f207998fc96a40","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112141709","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Ryfzdo0r0srfZru3JqetdUbNJE9mZJepEqlq+NJaMtDH/h/ShYfuJ4XYxwBgOL5Z+Ikzql5J6hjoaGwoWHgAjw==","shasum":"613e11e070c1de8d5f9cbe1bea94d8e0b7658ece","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112141709.tgz","fileCount":168,"unpackedSize":7026615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuM/JCRA9TVsSAnZWagAAa2kP/0UeqgMH9iYbJqL8nWLl\n0gdCV+Z0rBQg+OLCRtOJOvRSVE9qEWKeCqJqKU1KBTp0EEoTc0mny9RZxuap\nDSL3DjNjaOp4z6YkXKsGhtsQo9Ah/d5iOrCiCseuwhfmqF/dbA0G93Hphjg3\n0iwT+4IyPJ0MweNWAO7saKVC/fMEr/4DTVDKNuokUqUwQvWl8QY0+8qbiBaO\ncTiC6L/tKsBYfDIdeS+ZPiOBsKjRia+CO4EFdnmpvH3Fam0cayCb7woFFsPo\nrJ7JPQYTfSnM6rlZXKZKxjzmUcRGHMZcAO0LtBrSSQCkjDVle7OazlVekPjY\nSp39EqPtsIR5tn6HL8O5oLf3BcIOP0JpFX2gSfWoakdXwXn3UZ0a9FrRUgWV\nrEJQx3ySbzQ3kktZazUFtLkrxEicMYHiwXpw/oG9MiJZUYBsP9F4eIrd0tOD\nzgl0+9bANhMFxlhnQkwaX3jEP7Tf20V5Btsdzp/bW6N4JONEPbLIakm01B0C\nYAetVA9lEItJgvBFj3xNF6QyX1X6Bzgokfh4D/A2E6fJmNDLxspPkDixUE8w\nbwwgRMbiXR7rJod6z1lZmq/LaJDQVoICSy45YByvzUvF6sjyz/k3d6yFa7Jl\nevEoCm5vDMzrPWE/OwZRvCQSDYs22S0VL5u8+k21UZH/6OknGObvPiqf6Y3T\n5UCr\r\n=jE0p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCO+6D4el7/bIEje/1I0In+kSitnv02PN/DH+vzOO7R8gIgeRUetg9xH9kwxzBnND63axLbD4XRRyfQ+jNsri6PRnQ="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112141709_1639501769413_0.0299716344141987"},"_hasShrinkwrap":false},"1.1.2-alpha-202112141716":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112141716","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3e9eeed3094ced5a29bb5d5432cd2b3853b7e4c5","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112141716","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-9TdZJVBvqUq7UAges/lmdxNarVmYdHC4JgpHJHKzCVM8SxPS1WRpkMTAxZWuADqOykEW+sJEr067mDVkcTW3HQ==","shasum":"308101ed0e1834ff560e2aa7d2f170f4636517ef","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112141716.tgz","fileCount":168,"unpackedSize":7026648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuNGNCRA9TVsSAnZWagAA5r0P/3XXbfPj1/ID5UKwjvWv\nps07FqtJr4MHVTTkHgXI4tS7UULva2KeelvpgOPihR2aYqY5HIslLXpdkzpf\n8q+6KWGD+/cJUaCb3hkhx2BqYI78sQpnAA0ipqwogexiwXDFq2mCYr1wvgHX\ntvXnRRRX9a15ISgkc7PlIY5iwLKsuXlVOl0pL9qVzdw15dGFbG9ZdeomNzER\naAgkdME+YE9sAXsPb7GKtDkBOzo5YYd4EINuPXwL4J4OWaKd5xOXPgbWvirJ\n7N4oS18DbgKnLrSwqmXWFPQ7Ow3vWTzRCc4z1yDSTOOsKrrzOm+OpxNltcpe\nLQF7FSLprQmovYNUblZc+FBBz1JfseEBDbDL3UHb9nLlDYGHcYh5b4WuktKF\nNGYGTUPy/yVK4ZYfV1LpNbcfKImItCmCSNFMCgU+fXY89owJtlhz4VQdXhwm\nIWj8D2n59wLY3HAdcu0frQwPkTR1CMXdpC6mQkVr/0Ssl4bd0eLVP5AcGrF7\nq+UIDDe6iGonQ9+tQY/jS2xbmW/aqFsihmX594Orvs969Gq/Ndhmpgq/6Ge4\nEgn7jpwVr6k6LJEhH0Um13gfcjGYVuul6iNlDee8iX+QiZ16Ng3rBZpdq+dl\nlu4Y5Zut1lTcTQTLF875wus+amDsfiIcjKaaNTwCUvpHY9lJrTZzqSGBd0ny\npWYG\r\n=W+t5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBU/AheGbvNtQS6s0CU0T/8PFDr+K8In649ugxZfkyDtAiA5aRlXAMePNsgvKGj4mSgAE6dl762p3edSR2NghWebrQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112141716_1639502220860_0.3198555289480616"},"_hasShrinkwrap":false},"1.1.2-alpha-202112152235":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202112152235","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"9ec559aa12d9e997795232641c35ec87b98564c3","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.7\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202112152235","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-3XNStA2bm46b5gcmkmBARaxOjtFUuO2G5i4wDCUvWIVYT6mXPBOABu5XLCcZcRw1mclJjwsyrw4ieANeM1SKTw==","shasum":"1843f2789964de4e3ebf370841e19d9b7bfa2a04","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202112152235.tgz","fileCount":168,"unpackedSize":7026648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhum3CCRA9TVsSAnZWagAA+vgP/jADXPKPsRz0w1i4wtWP\njPjahitUZzJL4PyUh71fYgQMbZKkHbKK8jZvQTudXLZUm6I3atBHYsQJNi4x\nApB0kV7JOgcak21FMi56NBQBX294+KVotY/1upc+FO38Ne9+vJ07zG0/v4Ix\nsMSVXt8wIYpA0omB26F+zhQnQqFWpWhEokm9lY458Ypx2RTBcef90Jy7T3Od\nTiD0/JCIFu3gFrBW2ljPXCImB3ZO2n4jiAXytJWtSTaSXYtDKtrBxCkhny+h\nAW2r5wzH8UDoecO8TP0WjzgGMXvXyhGepzFXG+CX/uSz9DQfvB32ISakDNzg\n5nIIAbyRrR9Ky4/DblMk+/ZRn+j8VCogWMMxHFs8hjKIUeX7HLqvMrJQz9Tk\n7XJAdF3sYpapSR3qioJyQbGydgP81IlxQxi2YuKuRePE/LWW0JLiFn2LUIsP\nhfoMSVMLHmkBzO8hxPxwgAYvLjLhzAbM2KEmSUDLJS9U+AH22jUHrt5tK31R\nc1rtwB9l7VWy8/TfHWqik4sKDbJiZ6f362MofQMzMSdZS7148xGhNmT9EydP\nnY04p2f/LrVA54eW0PGgWfoTwdxU2AdZQZwT6J8rNOu4VmnXR0yFt5A8Ciae\nnlAA4307MYb7vjx6xMUMEITUzzia1Dk6s96eiuFwVr/ZH+961vAnpj5y7b1D\n7Vug\r\n=0YXW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO8pz5v2uUrltc1T+kzBbqHZ3Zgk0tY0DkZDCLX8/keQIgF7f57CYcl2I+pmA3bg9Qsatcz4MiYHo084wU7IFwDgI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202112152235_1639607746790_0.29594363142059765"},"_hasShrinkwrap":false},"1.1.2-alpha-202201120216":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202201120216","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2c23c38180bd79dab30ed554c2c485785de8de83","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/fboucquez/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/fboucquez/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202201120216","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-T0tv1wFoGTLDS3WQ/YvEnbs17Lp0gVkTkDTCbxfCTGgdaKR5fv5+zYdiHjAf8oK+KvZlAGVN9WtMIkmMPowg5A==","shasum":"72a73a6ef60b732f138524da1b1d52c9d8950171","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202201120216.tgz","fileCount":168,"unpackedSize":7029944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3joDCRA9TVsSAnZWagAA9mEP/0VjQEudkV/Homzv1hhg\niJ05v3oNgiPR0zPFTJ/coqrzYR4e+rUFLeX7B8evdOzf4Qhp3bTxXPo9kaJS\niVEoYjpggYc98nrfgIbyEfJUqk1oCzMVCdwJpVohm+H5FVMGTknyIAVOEolo\n0zOnoBCnNyJ1K5DVuT4OENAczFlRua7dggxNAU3b6YI6zWLZtxX8utcIGInX\nwj+0dZbBbb44KR+NUNwm+oSiZwaFNof1b3FlQYXSr2mEuY5T/qRDm0SwzqgF\nLgrjj6gwKz0HO8vTbgTeeJSD8hkFuUzuVKVsPWfrbMUyZwVJAkUsBRnkAXRh\nbjG7BTsuQB19JwOBSNoTdCUT7dTOe6DU4Stf8/LakgjnS4/mY0Yclz2l8LTi\nlbq1Jts/aclMfgSqKOZy1nHEcuojGUeaAXiO1l2CRI/KuIy0HeXZjUrNmfKz\nrWnJ72b2AcOq0i00vOZblMu1jSyo+zlG/yMOcma4DMzxP8sjroBe8C/NxH0n\nXRhPQIVEMjrVzclvBs77vqty6Qg6X25FZg0FM1uz6aaHHLzPeyG0mmQKN81W\nXsj4K7nd8SnTQ0GAiMOr5suQ7M3gSA12D04YjslAkbD03HqkyQzQ61gOBn6R\n+ZR+y4epUHjglJo/UaT3UfZ3F7VpvN+ovJltgaFwaWsHk6vZbWHKrooprUFj\n89ho\r\n=xOMx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwB5ytxjBEp51aDckTqo/ABsTrCnHC81IrZljfjFPZIAiB22D3ChRm4C8t51udAAMS7SRExSUvGu04vuFAHK1VeXw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202201120216_1641953794434_0.6638509544269962"},"_hasShrinkwrap":false},"1.1.2-alpha-202201120217":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202201120217","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/nemtech/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/nemtech/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"d15bd1d052d4536afee41cea7405633e441ffe16","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/nemtech/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/nemtech/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/nemtech/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/nemtech/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/nemtech/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://nemtech.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202201120217","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-DXFdbSDIH6aVRp6X+csMUISPb08e8io7BwMW388zRCIFDDZqLUEegk0B892SLus1OIuTJbSJedvMDgbu9KcA9Q==","shasum":"ddeabd0fa28019d92a5b4a79a7fba418f5a43ce2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202201120217.tgz","fileCount":168,"unpackedSize":7029824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3jo3CRA9TVsSAnZWagAAyNkP/04HgFoBitK6oaxgT2S1\nZRModZHqbjLJYLCdUc4FqUEdn3m0FuNKvgq0WiyqGQBxygrxoc5Bj6YrRHgr\nStw0Slp/I0bQLiqyieX842EfNQ/R2HUoqiPtb0Gi8fcWaWr8FhZkXbPTU5Sv\nINnE9m7z9RxmlOGwK0Tg0z4WJIOJKUXtYGXFRp7pdBRCV1vSsaKsRvPtiuT4\nBIMLmu1Va+OjT1MYyVvy3V65/If2RYfFHJnQiYRKdOVMRvgVcokVFR2nqu8e\nWFJk51Q7HPQoADdId2Np1XLCXcHWRtm6J0x1PQIxsW+O3dZEKfXcEFGxk/iQ\n2Ed4rAmah5wkxoXQuhBz0Yp5qUN4pAw2F76Attq0lQrrBF5Hraz1qcEsKR94\nzavQZMTBs7wrw1eQFk5IHGRAAF0iA8WhlifZa2y1+sPuBRmGjPLvjs8eBr5S\n9adqAu3CKIU9Pvsvtts4EryhflLZfek87N2a1dI1TSK1DRUalLvfUxu7ya7/\nPc45QtEb4Yd+r8mND6pMSfLc5sBstYF/qNnw0FY4a8Bh4hqI7D6j5nV0dtek\nZGWhnS+qbknGJOjHVNTWLw9bwFTYuMw//pd4qqyiE/4VoxNM76NfmWT1XGOa\n/NCqYI6VXkOg0/QRCqYlKW6f9SqEfgLoA29XV2YbKqWL+FK6jDh2NDgNhOwZ\nA+eh\r\n=rsAA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5D4MUfPNoEKIzUZJ4q2dQW2KKRlJpyO24MTdeYyPv4AiEA4IeqaUszLzzR4kZl4ccAtGuE2MCun8xlzlGiVi1LkTI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202201120217_1641953846844_0.9518409876352429"},"_hasShrinkwrap":false},"1.1.2-alpha-202201120218":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202201120218","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"54e7d0c0ecc79b53006c8c5ad48d0757d59c1cae","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/fboucquez/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/fboucquez/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202201120218","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-OfG77nBzyQrTOJQVg+lOqrKTdR794g5vk9kqAi4BLD8IAv70Ra8jduk+qzAAVW9D7nGXmIFgUN3SIO/fNxV/eA==","shasum":"9797eb81375daf3d4375ad3caa4ef1c88eba2314","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202201120218.tgz","fileCount":168,"unpackedSize":7029944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3jprCRA9TVsSAnZWagAA0NAQAKGSqgBcSbHzGIYhlmBN\n5XAQPAKu2gXe0RAGyEvwZ50DXcDDQv9yPQteiQrVde3NTS0TYCAYkWZxwfbx\n2SwVsPzEzP+Zu8nYby8PXzXTJ28m0JAZePSzBJnEh2XN+DmmlKdLxLjeRdGb\nkd+AaUaejCiWOV66TJgDRq3b2bKOZ8rleF7lPF8TK8A1xdnyiEh1xIi/uYlO\nVcn8QAiT9XteAOIbRJO2je0BOUTSQV0bnaOl2SnhsEj5RGwdn6GPw9RRWpgy\nLDeqV0Cc5CS+1e42TnOX8bxM8gQPJoJ5/PhKV0QnGMTjnMzseoOG8HnrFrjt\norDtPILVjZbIENn1r9WGrEjb24NTMZG3K643rS/PFp4TZn4DX+RhiXEzfK8M\n451I7qrdbepS6pTf1qpShLTSZ6Bhfj3YNywGRRJM7XkmQ2oXo1QctPp2vhkU\nVDVIP1p2LoxVJlhbLQHb3GJRZP+3681CsKxDgf1OBS5+4G5E1anqgzo+hVBI\njOYcsN0pbRd4myUpSoXQLTXabVwMqEeMcBxgP5fJcJ83F5G7vq8dR30LqWDZ\nA5SSRxwWTiCDblivecJn2wkvPNjxgOZwZbHZt1VlpnSKTmX+sQq+4lhDIb/y\nZAHk8r8WyM+jHo8w2BzMzVuAuS4PfbJxDB9+tdS8gtEHJZLHYFtbN0MEXT2T\nbny8\r\n=9Qc3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAkCy1eupuCfjYI0nYlMK8+4fggIr3gR8CfbmVb0oD9IAiBhdwASinK+TpahaoEFq93AQ6OZXhYfIE9RlU2pMHFxYQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202201120218_1641953899470_0.6271666020386863"},"_hasShrinkwrap":false},"1.1.2-alpha-202201120306":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202201120306","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"a77aba0fa143fcea55d76bb8d73ff72aef1839c0","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/fboucquez/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/fboucquez/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer, web wallet and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./wallets`: The generated wallet configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202201120306","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-gLa4TTDHpTdaoAwYhaOuMdGswmDTtgWNjr5j1fx6eIM7KPYh0Go1mwUEjlia7wLpbhjd07lVz8TEltqEwnQlDA==","shasum":"eef692c81e19684901d921887ec75e2e9899a13f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202201120306.tgz","fileCount":168,"unpackedSize":7029944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3kXOCRA9TVsSAnZWagAAgr0P+gPFJHxzknMT6EOtq26N\nKRn6sLGQnjKrOhnCqQOKTDzMrOzDFtFbxmlkGH0NcBazisLQQhRuJL2+wejk\n9AGk3OSF+JiFEG8hnJByEnjFVZAUJLBkAySQhcWPwqQD3sNZbQxiLZbE22NT\nYkqvABo4UlkAjicE1sULYMlbc0KCOwym3p+4dhNIVgE/Hnft6I3vArQiw4Xp\nfXFdJ6yAveI8CG19E7O6btbNMblEowR+Y4N3rfuqRmLZdgAjS6oiYFOJJC3h\ngHjWh6ORKWY2A+HqVv1w4XRCM3gSsd2pjj9LhwbJmzJwmTyHeTcfbj9HM8mW\nyYbOHd/XJADDklSuqchmqLF9BFdVARsYNNtN3XofVIw8fjJbteSxI7h0b18I\nnjkaxxDtZuXrG3Sj3cgoVldO1xz12UZ3P8rsOGbEUqQpG0iEEAQBdgSNv+b2\nywWuuB+iNh9hOxLnLm86TPLGljcHjT8vVSiw58/8M3Aml/4ysZdeSpoXnlSM\nI43qGahcvfqHIeEDrnk+TUGpCNlRq4eOK9KgsNVonnbuhi831Wk/y24IzO0L\nNxkmsz/+D8R9J46lXCBTAETpIYYZKtWtuHqSB2CYz93S17KPnt1FkPCHZiw+\nKWoQSLBHrS3vldtsJ5x5CWofSxG65A5Kabkvn0YmGrZh6OfHweh20h4ICzH7\njela\r\n=7QP+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4myo4t9BL0Ud6z1Eog7Rj/3lQI+m7ChrTim8vnxqzSAiEAwRgYtMfketLOir3SvatUbK3/qKhsDo/ugz85uC0lDxE="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202201120306_1641956814410_0.1436645639516232"},"_hasShrinkwrap":false},"1.1.2-alpha-202201120320":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-202201120320","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"c59da6e32bc8fd18116bb7a3fc2e45d4dda5a084","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/fboucquez/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/fboucquez/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","_id":"symbol-bootstrap@1.1.2-alpha-202201120320","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-qHadfxZvReeYv70Nv5kUreSDZ9LHn0hK11s/XgMe/d0SZ8eSIN4jm+pZyGpJ/7evckO/llHPSJfUsGgYssdCZA==","shasum":"1abc9951e81e7cdb4d8a44f61a2f53ce37b594d3","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-202201120320.tgz","fileCount":168,"unpackedSize":7025280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3kjxCRA9TVsSAnZWagAA09oP+wd9zKx17DIgcqhWeWAh\nlzWzSY1z27NZzZbVAwQ5d4l6BwnfPJiTrubofOc8ckMHQZqvP6KgE5GrA2vz\nmoMvNmPa/smcBDgIH6ar9Tg9ALw6v3TnMZfNe0IfKyZdCV9dzUWRHLfZFSWI\nx6xdCsRdwQ6vqUVRo4c3OPszuSP4bx80SNsHSWslYH98kVAGPHoXtI9nefcm\nivtg2oIWhrzecNCjl7ZiQLUTpQ/LVZKjsrosYrl8r7K9whd3mBknQ0klWiwc\nqbC9+fZUJzQvUoEhzHpWvLEqByKYO7tP5GeVA85RTZpXxFdFIOGG3rwhvYH0\nJ+2L25eG2Uj+vmvNQ8seP+sKAPWoMy2uCbyU6xp+yqKWQWV7mNhCucMyfmq9\nTQzT7OoEWQgFMDYj8JyPlWNhxIKPyq3TaKonbZnpAl/TTRA760brLUjsMR/M\n4hbojAPBKcuW8G+570/JnCPdct+YG0woAbxxJmrJzGPWK2n6zZr6WO64Iz4C\nwxA2VpLdguzyIcWplXqfK2u2cLBqi1c3i+lNN0SSDnhMz7hSPrUeA8TuGfPq\nDzoouVks8pbw28zFMXkPEhHPsyp5zknwYymyGKw1xma32r5BRykUr5aBji6M\neOW3gN5SF6RqOFc6K14i/tKIkpRfPkUdDVE8m7ij6Q0gbB/zxwx8jkdnANHb\n5Yne\r\n=OxCP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTpEniSduzxMgJXmM3KDWiQo5v1lXg5bPCMq4h/hoJLQIhANYXGTH9I6PLxAbuOnDVY4nIfloKRspE9d4AOAnzP38e"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-202201120320_1641957617017_0.35132956901401147"},"_hasShrinkwrap":false},"1.1.2-alpha-0e9495":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-0e9495","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build Status](https://travis-ci.com/fboucquez/symbol-bootstrap.svg?branch=main)](https://travis-ci.com/fboucquez/symbol-bootstrap)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.8\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"0e9495be2c4a8fdcd399d81a442fe478079f9692","_id":"symbol-bootstrap@1.1.2-alpha-0e9495","_nodeVersion":"12.22.8","_npmVersion":"6.14.15","dist":{"integrity":"sha512-I6RUpJdCQKrmnq5d41pDDsYRI5nl8Qifms+nInq+HIwdrvHeJI+p1YZ/X99BNDIXVnT6CsF8FE/lxLk/ZHn8cA==","shasum":"5c3dc0461b24d429926cb668f684c977ce30cb56","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-0e9495.tgz","fileCount":174,"unpackedSize":7028210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh30TuCRA9TVsSAnZWagAAY+MP/A9xmawAdu1Le8Klbplh\ng7zj4P+sxOwiBM3esOZxKkjRR2NQ92BeLQSkIkmipsNCZuZ+XB2sYFD2NlTG\nZEpixwmCtVrQby3CgWN02p/lq8a8Tu3rDGns1SW/yS4Dyc7a2Q46CLRf56pg\nw7WgQUvyJuXoTHFjyIjNYdg5DZvw42TDwdvKaNJ5ToHXHOxlrNA1gisDEMl8\nv1RXPY9Ax1gLfSIcUa4diQlAK1Y0pAcZG+qXbcTcpWYSt1LqJWHc4O2hegOA\n6/adsrl9nl8DfIS5QWG+Q1Bh8MGg69ZzMesE8JTLu7rkJzHdzOjMQKHfKj+W\nMVgjuasIDwg+NapMzEdocghtWKeOP1VBEA1yYPbzDxUY9IlXbyMQmuDqZ8Hk\nqZufFg4WUu4nVlC7q+O4Tjxa/1W1h+13Ds2loCdcYpXip0ChDsETB1SRDY3f\n/LZjHNrNGofRdREpUQCm+ye3YodfljcppQwkSedWkISfHoN1MxdzkblY9nXK\nqWgdCMuDt03eCJZ9n2fyNHy6OF02d2+cebyRPtBmaoJ3w+B1ZBY801BXnq6Y\nnaZCZOnlxjeiL/XmZvA/4uxbCAZTt9UkZ6sOUV+HIggROzmpBZIG0BK+M5LU\nQnH3KRyLDHlnFLgxu1T89jBLnLqrWkFE4KteKbU1QJuQYIX82Ca8iDmn4Yiv\nEDYt\r\n=0M+S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9oPsY1FRNAHUwY+TfSG2ORIYyokbXtQyzxpmGIideKQIhAIDL8hQ3aMTQNtVob4yjgfC47dkxKnyw3vA2AHGjJsGt"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-0e9495_1642022126357_0.6867357336450408"},"_hasShrinkwrap":false},"1.1.2-test-202201131511":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-test-202201131511","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2-test-202201131511 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"737c33cffdda78814dcd770a88c7c678c38402b7","_id":"symbol-bootstrap@1.1.2-test-202201131511","_nodeVersion":"12.22.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-N52M6MPEeawICqa2u1IXnqud+y6s1c070SIr0M9Wuc8fE39S95w8IQTgeMtFRoR8mBTwA34OVZrn1V3WilUlVg==","shasum":"da8980dd0ed90e3383e7ee9e11233b122beec547","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-test-202201131511.tgz","fileCount":173,"unpackedSize":7005364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4GuFCRA9TVsSAnZWagAAUeEP/2XFpPHyRsIS3Ltf7CZ9\n0ok38Fkl/d31waqLis631AP+k9+mu29XKCunDU7QrSjI0ANpTGpjQUWyNE/5\nsz6ZwxEznE1VHSjKqtqyyUobnIQ1XrSe1DPaflBPVLoST/n8dCtYl80QGZ+2\nL8ioNQ1Ro/apMahEEmZJer/L7j7dm8Mwk1sbMNizJoyPFMa8JJoLaPn/ixdm\nIMDtfyra+SHO+cM8+/JfyJvs4BvNrIC9I0ijf6B22vb5rNa+8ecXLi+n0b8E\nUDeqLinYmgtKNCqS7v9sCCZHmAEofPMyVOYVpptzmAZl8aDAVpVgWS71OwCx\ndtpeBRqlQ/CGO6+OPtxbeC/9JvkcN6e0u6AuOMIV165s8pBMZJ/2UtsEOjw4\nEchUDsW1NFt/OTj7fWDmrFwMvjMwRQ7OK7tRa8PFt3CLtQBA3AqIyBp6HT9U\nwbh8cdYBw5iM2GmQjeyQu3x9pBMxyzxxL3mqB6ZjyTMLPij+J7HCGYXmHbJI\nmvGTOx489mD8YChO01wCi5F3VYN5PXsCnaPm6GbvkVdrKJLMI7nUbdJp6EvY\nt2qS42MueUoaCHr2OVp5ZAxxXYr6F/7nJcVdLiqrY3XTK5sghKQPdY2aF1cn\ncZ33nn4+x3K4kLALy8SitV29IH07Sf9/MrEnPeBsZHLHx+idiULuw9G1+R8v\njoug\r\n=Ikf8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvzxgEDL+3pm8UqBVxOWdqmTSEg+KKP44kHFOw+/RGUQIhAKNQbnDZd8R6Y1t2Zoa7kLZUImuGwi37tIUzb7X6rk2H"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-test-202201131511_1642097540579_0.7965519483848744"},"_hasShrinkwrap":false},"1.1.2-alpha-d7f6186":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-d7f6186","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"d7f6186d99fc9778fd192b415a9d2983894ce457","_id":"symbol-bootstrap@1.1.2-alpha-d7f6186","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-tlhpnSXi2jW6jC9y5FkAzGzdhcbYuNVgfTRgr9sa3H+JRud1f079ir/dYhFegesmxYMzLzBb8v9PtirBk8H9JQ==","shasum":"5b52edeebc6459a394c60976fdd6fc8f56286feb","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-d7f6186.tgz","fileCount":174,"unpackedSize":7028250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4Y7VCRA9TVsSAnZWagAAYakP/1XEztHH1Bd0RFdxvaeh\nVuuTFP2zRB6P3xnZtofogkxxK8/nKVtASW58NK3fqv0qsufJxnpg7dcUD2mK\nZB0pQTwVxzOPH0+8255CSRmEtyUUIcF4LZwpm0qNvMCml12yZc/3ASGKG2DQ\nMxmJuJFF6u0uVUH/dn7qaXeKQ7NQO8tfa98dNmYswJdKPv2XWkKbAU1u/9FL\n5AoMGS4pUgryHsCYYVVbvnluRsdZCM6q3XRJN/5XWRoMJGBRj8EMkFzs0+Ho\nC4ZjkIOad0m6vx+ap/x41VIFvr57eIrPxV34LpdzjYJxP5mAcQJ1j/Lh+q6R\nq8OxeRzZ9iHO9HtUFSkuKCZ6pCYgH3AEoHmPTvS/SHLRylhtqRfRhds+1x4N\nqChtkOrdBKWkXY6zjI/J2ZD+Rd8M0i9fQzwCfbpzzNlJO8Idq2XPt4jKi4uT\nosyqglrDcPNHi/X7VX7xoAp37M10sMnWRZ3LO76cnj6r/T6PdjqgMvelgKAP\ncWaT8ApkQkXtuvrgvTkElh57n7zBCbuEKL5G9e9GG6QJ5WwoDA1HBgfvJgBe\ntTwsuYouIr9XIv0UCMB5FqdXGo2ncGycMR5cefI8qOeVvHLK+Bxn9T7CV8nu\n/NWoM+1HXJof9AcOGX9z5rXFMWAze1DfbsQoQFiNCMOxpgcZyqA/v0q0YY4W\ni/+M\r\n=x+WP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4yjOauU2ou4w1Wnw4QjXR4UnwQrdOfJADcpd2PD1UKQIhAL7tEyZDQEu/23m+bfQd2Gdcb2RUtr/S5A7IG9JDM74+"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-d7f6186_1642172116976_0.2390869905252726"},"_hasShrinkwrap":false},"1.1.2-alpha-347034c":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-347034c","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"347034c5597568818050fb43a4a9a55aa1c33b8d","_id":"symbol-bootstrap@1.1.2-alpha-347034c","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-vSlRzfidTAhvwmLUejWEh8i14B8ermDJuJbzHxAYgZiBWh0MI36AqKylajjz/x+mLsa4DjQgszqcsllZ8XyCQA==","shasum":"1b91cda74e6ef6a0bb95a4bff31476c8bdbfeab2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-347034c.tgz","fileCount":174,"unpackedSize":7028302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4ZCfCRA9TVsSAnZWagAAQ6kP/iSGjgr0nFUUyy22Jvho\n5OSGGRHEFBksjg9VwgVhR8ov1gz4gv0kM7C+2PCH/eIiG92U/KlJ64hkx4DU\nVlaqYGZeCWZMV+QAdovmxBPEaUnZNhY/bTG2Vzmwzl6NpLkS/EdmhaOzA7y3\nbxOJ1zoQQolZQe4WVQga/Zz9AuD6l3m9iE5Zxkv42oKpHtuwOvUAxudlQX38\nAR+lhHINsrV8hmI07N6adVQDYIZC79wFGUs5SBZrheP/8SxDsaCOBMPCpcK2\nGONjwrhF9yS6GPyZTbgaZhbOj/KsAbeBpwpJsVr6whwoVUr/rFxfGGB3swew\nWUEJYaIjPxyBvvIhpiphr/JkUo7sNt58SAdOZ/vJdVjJYy6MAgXz9TYHGFVJ\nZpqgG7CrsCtXNvqZ7TbAOhUTm6lXcliOuA/N6dZwXzPYcVM64tPi7oNyTQNC\nwe3W/7UdFtiuJCETO2HvtBP+pYsV/tCQKj6aWVtilE9qiYoZrrgoHdlCjUMu\npGivPfk0AKfw9kQCx8xytlU6b3mFjQvvqkhvcIMM+8rbwkiknk+FV49y6DBK\nLDAcmvFLzdfJVuxURCwWsjIfaXw+IdSA+GjAseqrUjARm1I9q/Ca+CQl/H6h\nWNp7brxoG50lHANZOFoFozVp6TH08whAf7xOrlLs8oqTQXFJiTm+SbWlKae4\n+HGv\r\n=HlXN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDj0JbHxb2YES5F7knzMG0CaR8TL15XPoKhjdM8RnB2KAiEAoGCbENj7z7VaCSWpKEXrmeTL269dx369LBBBhLjdh9M="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-347034c_1642172575199_0.4219819036267849"},"_hasShrinkwrap":false},"1.1.2-alpha-030d497":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-030d497","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"030d497d45abbaa511b7952e2f0d1752be812bd9","_id":"symbol-bootstrap@1.1.2-alpha-030d497","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-yD9LdK39B33uVshwJZHxG9nH/5RBFYmzADo3tZG5isHDTE9LrnHs2/NlssRxQR1nXy1XFZ5RQQyhtNEld55bjA==","shasum":"eef7ef2b951ba4e5cd652ac7b5fe73661d9a80e5","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-030d497.tgz","fileCount":176,"unpackedSize":7043012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4dLSCRA9TVsSAnZWagAA5rQP/1UW8IqOfnrtGrXpXyhN\nwosyC0MzhRdAa/FcdxdZSjoQ6D6ebzmZDRu3Ikg1nmfuUmVvsICOXrAV1uXZ\nqrAKU9yluFeEjqr74P7889xpklmgbwH7lLu8Y+Mnf3TO7t0SNvdk1Jg2TR8P\nu4wkv2GDg5GLYgKdS+1FNLRiyfQDN5oZJx3z/zcG/qoG/zQWc1HMfCW0P3y2\nFFiKZ6tqne4rnDTctChtKQ4+X5kVHFd3P6NMPphkMgEjeh2bqF0QCbQiSyho\nChwI0Ql/ct3v+QQCJFec5hCQImMbkIiEcHH/N8zXK7Yl5Ox4iBGgP1dis3vx\ncyAEjs920Q1jthGZ8i3ijG8NOmaV2Z4k1CczXrkQJUtwOnGju9TTepx24dmy\n9RsGELhx2FC1MxFRAz9jyVqGbjzNNAFpgTcjvst7R1GOMfPTxJYKAsOBFj23\nrdbgxvcPoiTTzhdOQiWLdZVhcibqfR+rNZogFTg/7r1q6vjPQehGZ5dPr3AS\nrjgXjX4otfourNCKPmHz5Lq4z0JgIwmB7Mi3oGoG2c6robYGE0810KGg6Amp\nX0RtUl90+1nqHSX68Zz7L2FSKMZ7cXOEIyv8bsM8h6UYBf2Iec/1C5cpPNM4\nGmX3w0SLEJD6oGEX8GeFXiinHXCHFTdNhra0zAeRW7tz5djPOWW3qN3bHBmy\ntVin\r\n=Eb6q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5UODxxE8vZ7nrw29APGbQqcwJ7vq6Bk1SFPTpdF5rbAiAF8EDZELQNiZf8wRL07VHMC1DxcsZtFup4197uXVec8A=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-030d497_1642189522630_0.25869507592006724"},"_hasShrinkwrap":false},"1.1.2-alpha-7146979":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-7146979","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=main)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Why this tool?](#why-this-tool)\n* [Key benefits:](#key-benefits)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [E2E Testing support](#e2e-testing-support)\n* [Development](#development)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Why this tool?\n\nThis tool has been created to address the original problems defined in Symbol's [NIP11](https://github.com/nemtech/NIP/blob/main/NIPs/nip-0011.md).\n\n# Key benefits:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It's uses the TS SDK for key generation, vrf transactions, address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be included as a npm dependency for clients' e2e testing.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```\nsymbol-bootstrap wizard\n```\n\n# E2E Testing support\n\nOne use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:\n\n```\nsymbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\nYOUR TEST (e.g: npm run test, gradle test, selenium etc.)\nsymbol-bootstrap stop\n```\n\n`--detached` starts the server waiting until it is up (by polling the network http://localhost:3000/node/health). The command will fail if the components are not up in 30 seconds.\n\nYou can also provide your own custom preset (`-c`) if you want your e2e test to start with a specific state (specific balances addresses, mosaics, namespaces, generation hash seed, etc.)\n\n## Node client E2E via CLI:\n\nThe CLI can also be used as npm project (dev) dependency (`npm install --save-dev symbol-bootstrap`). Then you can integrate the network to your npm test cycle.\nYour `package.json` can look like this:\n\n```yaml\n\n\"devDependencies\": {\n    ....\n    \"symbol-bootstrap\": \"0.0.x\",\n    ....\n}\n\nscripts\": {\n...\n    \"clean-network\": \"symbol-bootstrap clean\",\n    \"run-network\": \"symbol-bootstrap start -p bootstrap -a dual -c my_custom_preset.yml --detached --healthCheck\",\n    \"run-stop\": \"symbol-bootstrap stop\",\n    \"integration-test\": \"....some mocha/jest/etc tests running against localhost:3000 network....\",\n    \"e2e\": \"npm run clean-network && npm run run-network && npm run integration-test && npm run stop-network\",\n...\n}\n```\n\nThen, you, Jenkins, Travis or your CI tool can run;\n\n```\nnpm run e2e\n```\n\n## Node client E2E via API:\n\nAlternatively, you can use the [BootstrapService](src/service/BootstrapService.ts) facade to programmatically start and stop a server.\n\nExample:\n\n```ts\nimport {BootstrapService, StartParams, Preset} from 'symbol-bootstrap';\nimport {expect} from '@oclif/test';\n\nit('Bootstrap e2e test', async () => {\n    const service = new BootstrapService();\n    const config: StartParams = {\n        preset: Preset.bootstrap,\n        reset: true,\n        healthCheck: true,\n        timeout: 60000 * 5,\n        target: 'target/bootstrap-test',\n        detached: true,\n        user: 'current',\n    };\n    try {\n        await service.stop(config);\n        const configResult = await service.start(config);\n        expect(configResult.presetData).not.null;\n        expect(configResult.addresses).not.null;\n        // Here you can write unit tests against a http://localhost:3000 network\n    } finally {\n        await service.stop(config);\n    }\n});\n```\n\nIt's recommended to reuse the same server for multiple tests by using `beforeAll`, `afterAll` kind of statements.\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```\nnpm run style:fix\n```\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n\n```\n\n```\n","readmeFilename":"README.md","gitHead":"7146979d22ed5eb9dea48ef1bae2ee39e0c08c03","_id":"symbol-bootstrap@1.1.2-alpha-7146979","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-5wEao8m4QyD+TBKv/RjqNv0RvcLQnLTUOxr9AZKBHWELB/0Q9mx0+JP2XnyxBIsXZH+sINFNS6e3MzMXDjsMhw==","shasum":"831688e1bd2c4b406abab4974a579d5592f9ed89","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-7146979.tgz","fileCount":176,"unpackedSize":7043012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5JdRCRA9TVsSAnZWagAAYyAP/RtbovJtTKHplk16OYzi\nC69fQPFbfI+xK3rXICvRBg96J3sU0sDwYU1lkCpA5ShqrhHlb68hNewmbzwR\nt1FAeMg4q2O2lja3CqU8KOEK1eRglvhc/Rz0CnVzAnCN0nRQo0FfAzBLE9M7\nno2+nuIdRZ6bWIumsm+nC5c6toGkbhUMuxsjlx3wfgIHoCJJpJL3uOk9qlr6\nzA9ICEFl0RvnYS1OdWoOzLEp+GFRjfk3NzxsQEdzctkzFSz1Lg/W1Z2D2F+1\nrLeWliJTtz0M2fqk9s5qMx+FE17ttnKPN0ZEGhmPkKSHPOGsGnMCFAMGd7sA\nWYsIdmTdloSWaUy5tnbT+EN96U0bre64QOOA2fWpNsiXoh6PVqLh69kXurnZ\nwTITWrKzSBRCIosOr0r0ftYhAZDyUVq5Q/sZLkFS7gVr4jzuShsZsIIrrlb5\ne3/2diV4SXuT/4lG9Ld8XuOzyt0EEjPsre9saurTO3+eTTM91wPLuEV5/AGK\nkz1CIzzXmcVwi+De97pUtrh/w2atS/RXhN+wkg+X57E0Hth1Z3k7kmIvGJ0o\nP6KPqoPsw2SbBJJ9qcMJONx97F7WX0TuQCYBE6kBqOReOt1ehLgybHWNDP9X\nI1Iau+ZRF/zEVZnm+N05MLZNZ8yT7b2huHdakcV0sNxKlNOhP4y3bvN9fWyc\nggdR\r\n=g8tJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICnojX2o3HOyC1qnPa+S3t+qWOdZmLgkSdmir2YAmrUsAiBdBdc2K0MInqsfuNfCiur6A7eXOOEQwFNe2/7z0ue0fg=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-7146979_1642370896880_0.8759293492299107"},"_hasShrinkwrap":false},"1.1.2-alpha-4dba4b1":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-4dba4b1","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running Symbol&#39;s complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"4dba4b18cad532e93d0d274099fb47bd342fb361","_id":"symbol-bootstrap@1.1.2-alpha-4dba4b1","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-rx6QVE1fnM3+KbH6gKPsRvLhCrbC5JJ55LCv5pm3bVGysbcFgrpwOrK9u6CqadAy4Yo1VnknLdvkpqS6oVUJiQ==","shasum":"0c6a87319823f735bf6898ce6c34cf368d70edc3","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-4dba4b1.tgz","fileCount":176,"unpackedSize":7041003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5NbJCRA9TVsSAnZWagAAB/oP/2ntHrj1CBm6NqmHEoCe\nYQMZyEm+MfMCSOlCvVYb1SjCEi6It7zZlPIyocQ/mG731tpJu2CRH4QHj9cI\n3/G7FY0yOi/APAlOByeUkB6s6bMZsnqyeq0mn0uz6v7QrMc2Dfo80NPBdfY2\n1HUjxZrwnaPNB4fvuoHfyl9y+LYsubXTkI50af4639963TLuN0ZAJVgCxRmT\nZtZbnFaHhfx5LjrqEgARCEWVez6kdW4vhGgMYG2ZyKI7ATgwzcgASuy7+sz0\njpyEOVo7Mt8Cp5r1DqZFqbqCEdsGMBfDGPeY/A6+EQcrDS8XMlC4nK4RPnnl\nbVdjaLdhtpEjHENmNnr82c/K5Hn8ZrzzEB9vDqLsgnhRHdu6Bs3mrD5ujYNZ\nu8stSufItIPlOzGWur2DqWWEKRq5eLiT944T+DVvpNUvzJkS3T6LevZvA9LX\nkBAGPCVoqS4DKYfIBuUlvKLwaoj2Hfc2OduAIV5VCLmwi2WzUMPcNVpmnZtg\nMfkDpYYYZopuEFS9yiU++icvnLnwUYlCQTAflc5hv9lwg8WFelPGGggXqQlr\nsw4y1F32lwFFIaDr3eQxC0gZszE5swwik9NhXMbDpvKMO15e08+y+JPQDcbj\nSQ4Ccbv2c1oBmxAl9mZOFdJHohgMRlplSu1GRtaju5AFGcXw8x3J40YoWdFY\nbieW\r\n=ngGy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzixNXKtWbXMZ83riBM8qDj6m0jSjn7IYzqsB1RSOE3QIhAKgdha97bicrNiLXmHIaMIYJIem4op5Jh35tIu8OCpFA"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-4dba4b1_1642387145188_0.45262263437204964"},"_hasShrinkwrap":false},"1.1.2-alpha-5d35f94":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-5d35f94","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n-   `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"5d35f949a91e6d60e5b444637e84fb177378ff3a","_id":"symbol-bootstrap@1.1.2-alpha-5d35f94","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-yG6EtUWIfrPRrko+bgf89Z4J91apTwvOdHEpojMaW8f4IAZ486rQYYreKaxYGPZNE8vrnlRrLi+YCnhM2qdZjQ==","shasum":"298f8d99fdd2df2e6af1ff4cf81a2a6878267bed","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-5d35f94.tgz","fileCount":176,"unpackedSize":7041379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5YP9CRA9TVsSAnZWagAAh08P/13c9Bicg7pc+emoyR0c\nWZMjJJMSNHtEkD3/X6QiMhTR+V/e35u9KWdicGanK3J3bEtsXxl0Rinq0EtG\nFk5qS/Gx9gGqszHKieeXIf25WBccWCwZo09VFIPqIOs+A2O0krUqLlYCe1UQ\nwmxlYklp3PlD+E+Y4bmFAyI2M2dEUgUteVC9SO8dUmCIWsEcxdgbyN38R+cl\nWdheoJiWU8273cvtwWewtj6Nq+0Pv9O8SWmQSX0Ai08aVqC+pmghG4pH4MVa\ngDT3lq5EQB1lvsUUWlrf9tR8y87tCbsinR2XPxuPCwWIaN8zktutL4v5ByGA\nzfURacyN/4kilWshBQqc5h7g2sDKj1m/IW5Rol8n52jr0uzxj2LAr09e2M21\nMIpaJJ1rcp2XacGWObZBHrc18DefpgwOgyTh3aLnFHe9t5ISr1oHxBPnteJr\nKNtDo8mu5fJWNqsHACiZUfRiodsTIG6ai8AsXli8J2LPlNbLRlqte8YjTR1Z\nK4m3J42GtpAhFqj6OFFnktDIz5e7u8UBTymJt6SLRmugH9HZKFmrOktyh9nf\nLotSksvOHbIQQXVEXACdl9q0a4rMG279xPGrGfvcME1fmV782QWhmtyXjoEY\nqJLohJa34LeMFUomQ+MZiyFcikK009gTbgVmS0flVla4KiN+XVPM/C4nARYY\nD9t7\r\n=Nz9b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiC3cPsczoIGf2L74C8ORKXMyCjQ+Noq+qFC3T9yeuOAIhAOqtB10Rtuno6HSUrieEotJvU/O0vAd5LF7m1V54S2m5"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-5d35f94_1642431485619_0.9781226157845704"},"_hasShrinkwrap":false},"1.1.2-alpha-2a61663":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2-alpha-2a61663","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.2 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"2a616631de8c56735dd4546b9952ddb0ea52ea08","_id":"symbol-bootstrap@1.1.2-alpha-2a61663","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-mcCRq5bE6XAF9MmBbTI1ejZkOGUTqDlcfK1ghuHzIvKk4AnK2iLWJ4yytA87YPIkrUKqID44EGiV4Mg6CE7epQ==","shasum":"b2251acb74f1ccaa5010a46440bab72049f83906","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2-alpha-2a61663.tgz","fileCount":176,"unpackedSize":7041606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5YmvCRA9TVsSAnZWagAA2hAP/A9ToIQAISewAhvBphw1\nOei1JKAT6BFPD5VZrH6Nrfq609LwPmHhQ9m4O+/oZRLGEu7bSL6jbeVLbA2U\nXhg72DVJ8svVh9SY/lFTLsufqIqe9uOTNiDSeiiFgopJh4v4fucWr74vh+Qg\nb+guiWyA9guS3Toy9fzuTv4w9zX+zkGuJfvaQUlja684TcJP7v4jqlh9McuR\n4opMxFH8fe15WgZYULemiJgbPWSQWbUtWo6IsxV6ZblbBFiqxPEi0b6TR4aO\nqSykqFQNHtf7RR4Iq60ADTc+3i6352FTPFaDY+10oiPveF3ccgthgySXg9L6\n/vFAcCUtvXlW5Z2qM2Y0UF4rwvet7sNxfXvUdKbUPgKA4VSLV1csmgJWPmHV\nFFbxyZbogH2Cc4G56OzPhIdS8hnxMhaflfeRs/QFYAIXl2gAH84htuEYKqOH\nKyLRUw/a3n1ZZ1hfPHMzJ3z/a28iC6QPph0Q+4T7kEbNwN0yUY/uvKsxaD+u\nZYJxiz/7SlwzZ2Ejk7L1Rb5MunFxMfwntE4kSSnk8E80htwlyzpwedXpj1mW\nzQBQqceLmkDC0dRRKqCz1CdOLg5XHf3fMi9HMTobMI4A4SY8pFNstvsszzHZ\nBnC39gW1/SBWL/zRcrgoettnlpWneEdz6UcW15IeE9xblK+352fFG0GKxayg\nDyLM\r\n=3JPy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmR2DElTy+yw32UkEdtFc99LdGlnD10YsKBuOlHcWKFAiBAfy11fmTE7X3vQrSxqUEY/qemNzyxed1k6IqSo9Q/kA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2-alpha-2a61663_1642432942761_0.4706083296940269"},"_hasShrinkwrap":false},"1.1.2":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.2","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"2a616631de8c56735dd4546b9952ddb0ea52ea08","_id":"symbol-bootstrap@1.1.2","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-PadanSLghJDzeJ1y4xwpuCemxZqOHiNImZXPOsKLe0pVwmhteuB68kjgeLCbSN9uQPaUEFtiveDH8uLwuqxtyA==","shasum":"146157c0f1a350aafce42ca304362fd22dc7f1de","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.2.tgz","fileCount":176,"unpackedSize":7041564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5YrgCRA9TVsSAnZWagAA9/cP/0+haSl5xcs89OQkDJZ/\nH60xImDX5+HEQ9CvGuFCuILQbjJDXG9PIAiJkKMtQUn3F7v98jTgYPE+4tmb\nZXOB93WrHhisi4dcDQiBUULL8oATpu2iBm0A8ESvyWrvvMJuFCztm3DLWYqM\ndUEMR6CS6sHRdmGyj1NJnfGhOAZhsTokJJwHhMw5P4axXpLeaA4J8VtgGd0E\nuWpIbNM77dPHbTAGTNLU0NEJzbJrWcE2EEo+1YqGhlVBDU5XnyaUa8ymeJWc\n/ORYoXVafmTOBIsIFzOlmHj5h0HhLyTYzxNqGzbkag2sa3VMJVPYSxpYeHwy\n981GIyo3r5SjlzKjzK4FiBRexw48KGXvgP50b64zR9z7gZhEg4Nmo4tfmolw\njzsLNHjXRpt7ye0sGbwXEYkpGiUE0GeWPIUbV7MQEUNxuOOF8vH8Ix69XYDD\nKpzwlRB9NOnqukXx6YbBbt0P3bNC2m2Xeh3rPvvz6+E3Y5qYrw4xydJrvBKZ\n3aaNqefXWUpv1DrAG8MVqf2OwKmcELQbM1rtY/KIXwZrlNf9iq1kDHEhkyr8\nEuK3P7j5xD1p1+BSgFVFGILrsagz5qvrCgsdSFwYYdJ0IPZR27YFSiO+p1UW\nAG8K4EKz2p6gs2PbzTLFs5HUc6bpX/38IGaVVKMZkNLFcitjaaqB8WtsMm9c\nU8ti\r\n=gH2r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQYjOU4/0WmEHx6x7CvTwshCQBtsr1k83KeWvENFLPUAiEAzdNEzuFIhwrmMOcwDRE5N6SNMQaRgqZZXu8EJVo36Qo="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.2_1642433248035_0.7151378917781559"},"_hasShrinkwrap":false},"1.1.3-alpha-9b12ae5":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-9b12ae5","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"9b12ae526ce37da55ed77fa446dfb852843dc27e","_id":"symbol-bootstrap@1.1.3-alpha-9b12ae5","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-LHpqhJ1w3t5cnXjHvYHaXiIUPt4NtT1v0ZUNFezxa328Tnsu2cbj5U3DBIgHE2vLLsFutEIMBAB6fNnXZdxkXA==","shasum":"9ff6b4fef151b81a6f9a676dcff3cfc469603ee7","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-9b12ae5.tgz","fileCount":176,"unpackedSize":7041960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5Yx6CRA9TVsSAnZWagAAKH8P/3IaSkn9ZTqPlAn2Ld6I\nCYZnx0wjsvI9HSb95uef136hbhRyyfuMInfa8DMSabwfzN5u8HbpjS7kAzJR\nvNOYeJgo1ohLlOFobqHyJCqH0jnr6X+fZNZgcCM4w5v9LxfjuqDWxsUNcfsU\nTMbZq+VhtyoGAQUBvktOqvwFnlYLfWmubco8/8oNg/LVKs7LEmcETYOhnU5c\nw5HgOWZXAqyvH8bj856nseX+qdP7/+HavirsPeE5t6AjwJtU6fDLgq89DNRA\nQohopGvweiKP7z0fdC7WnUFWmeExnZ3UoaWJiicHwQNhcecgH5A9y3oPX4GR\nJUlwxlHhJ0BjLY7XaD0rc1sEPTxXY7L6dwW1IHrfuBRb65ZHJBJgM+ITjGZx\n/1RC0Cq/hd3tuKtRnhbn80aS+bR+J4L/Vc7hSXsdKs3fcvw56+AsLNLvNa4H\ntyTP8z2CpuPfewEm9ZGokPJF7nJrl60QM3SNzcUaVRfiTK36DqQ1sVzAPtrZ\nqJXJwlSNBLDuma31r0t8zD1q0kTjXup40zE9W9VA1rOHdskq3iA2aebRBlYZ\ncxcGC4QNC8ebfvrXzAuZ7j9WiTRrMqDv16gspCjoWfjY2ZU9rY6cLzywai5C\nJdmHTufd+SiS7lKiVYo+8xzDY+3Sgd78TpFTYIlV2fHXlFQp5sc5lq6AMo+e\n90sj\r\n=hMuk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4LJlHCGJMv7UbZA5hzRv5q0QMQy8o/Yrg6tPQOypwmQIgeJ4ThlidN/ABLTH01jfWE9RxY3qbFiUB3QcBgMpMV7A="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-9b12ae5_1642433658412_0.7183824000190315"},"_hasShrinkwrap":false},"1.1.3-alpha-a1a6e1b":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-a1a6e1b","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"a1a6e1b7d848de211cfac451a58ab025b9de798b","_id":"symbol-bootstrap@1.1.3-alpha-a1a6e1b","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-cdfS9+6GG9RJeNJW38uo75dOzkJWL0bwkm8GIEGs6FXAToLNuYat4pMQmbMnA7ahZbdiE2RCY0iBIzV0A+Rt2A==","shasum":"b0829793c4dec7c1c125f07ac09c3bf69b794207","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-a1a6e1b.tgz","fileCount":180,"unpackedSize":7044690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5Y7dCRA9TVsSAnZWagAAXeEP/jrqhuM5mOyhHDxZKTU1\nWijvebwYNyyGr+eZMIVHzz+2QiXK46enpg1MSdiBlqpvpIupN3zascQLDlkR\nwpAJefwDkhMTb5EJnZmS472jQeyQfkyWaPHx5GJ6URP37AfrMy/Eplh505UG\nmExCw3+N4QGkbJP1AJSmhbMNdXnfB8SYIsMd6aXeYcUSWaZRqVij4QhhQkm4\nbMRdfYShgQfuaD3qLL4NM/S09/l1Uj6FOMqzOR5X51eneIy4/ecIdxRTUZQe\naWvler3QhVkNUhdRP3q2AnQnzUGfCl3zaS0T6PaDlujwpsML78dTQBJfXwGS\nV7RwBo6Bp13SgvwQp3QV1RpDKs6FAsMaTA9er8R3NN91Yo1AGPlUEPxurR8a\nxfRrQSg91Y2aOIDVrQxtGQXrSWhrMJfyFG+hU/djkUPFmXzOMfbT/cDLsxiD\nT1gCL31+52XG0JhxHK6GC/T3cxbS4ajvorzt0f5UmHM4jHv6jDVJrpBOOLTy\n145UNPMqodAkcFQiXCkRlbb5zT+CUseZFijkkDh2EjJdtW/wEQkXehk+cXOv\nqOuiXNqa9oqUAPpkeoPEH26spHIn9sv5AHDZOHOKzbTBqTAh1we0+t4oHxc9\nUxO9csQkRAJMeB7lzVVIV6fk6uycq4Rv5jU8BRtO80CJfydeIoD7cX5mDtok\niP1T\r\n=dCSI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpcr/yxEXqWjvpqS1f8z552ObMQlEzcBYfBZ645vw02gIhAPjSkhL/n5tDt4hIpVa1VXcaMUgIdcS09R4KuIiG2F8P"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-a1a6e1b_1642434269625_0.7128843084911634"},"_hasShrinkwrap":false},"1.1.3-alpha-75c32ac":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-75c32ac","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"75c32aca33fa0f6a7e67ab1b05fd6c89e732715e","_id":"symbol-bootstrap@1.1.3-alpha-75c32ac","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-yTC8Is02LKn7El5WTtbQj4GWlpZWtyrtRUbjG/6w2rkb0wFHEEFD+qfiJsnYdVZbqYuvgbqpd1h+6Q7MI8nwIg==","shasum":"4c6e2ef008f98cdbb707b0f22d751abd9f1f81af","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-75c32ac.tgz","fileCount":190,"unpackedSize":7057268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5eQoCRA9TVsSAnZWagAA8RwP/RPQ4s7LOjTQVlNPngTk\nRzBVLr4XIw/6EBVLr9aZfrXdaqbGEo8r5WY3IAohmYeCx9arFapMNgN3NR3F\nRzWcwfgeSIrzs2wV2+Kigm4LjfhgaoNZrqcleeg9Suu68vnaNkj9tBNFURWO\nmb/Naq52V84itV5Qd2qk3klLibXfC4Q6++F+dv3fw6/H5J4n38aTDN3wHDG7\nhco2JestG0o/TPkQ6GOYA7x+tUoGjn7TapYNN2ZU3VDeFQTTPOUsIeULc/0Z\nao21ghvcQZKZh6HZmchUhXC/mGvEqugtNdD1BhQtSMkGBvlWKzKErIm+AiuJ\nPnALpS1Rh6svHgPVPq5PYd6jVK0K/8ysoZ12SCDFQEZKfB6Of/Qc1MRJqZbf\nVwSm5+c+IQTiPOSxJ9UejlgeqIMWvCU7BBudqfp2CwXaMxusUzmx5MetNvMd\n8Nh71hGfx24snaieRlDoPQu6iruIC9mXZAHLluSLvutJ6K0awL8uURFGSxl5\ncpoNQuffi170J6HPVi6hCc2arWEJpsfkiaPGj9/E0Ew2iAwcUyWTZU/ea10e\nWJVJ6Aahm03BqKVrXf6DVNqgNd8sO013glI7vmaRM7k09YUnsY0MVE01/WCh\nWxD1C8X5raTeqoACVKLeIHbIikJRT6QaXDqQL87fNPgyydRzzshuGDwuoZoa\n+jpo\r\n=b0N1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBuchfbhiIOGyKJ2+jJEBCQUnM+0Gqv3rIDp7XyR3bHAAiEAvNC7bCwW5yTSPfYjTGxA1Uww2MgjpjokpfV/Ym+nfTQ="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-75c32ac_1642456104546_0.8669028491270792"},"_hasShrinkwrap":false},"1.1.3-alpha-cb17510":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-cb17510","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"cb17510f112ec3c5f2c8faecd44044ecf8808d8e","_id":"symbol-bootstrap@1.1.3-alpha-cb17510","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-tj7skqOR2NYSnQYWnhyjm+KyR1bFKqlytvQ/QUXhEkmXoMHyOjGiSgNNbloX+0NIn0oB35RXSBD04fjCV/4Cww==","shasum":"f9ccde5110ffb4a895f264d7e285e5839c5c79af","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-cb17510.tgz","fileCount":190,"unpackedSize":7057206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5eY9CRA9TVsSAnZWagAAbmoP/0zHMvSLhC/aovfdeLpD\nzo8awgauZ4SoPQcEtOa6EMLbC11QsTjUoj9Clzwojyc2LVUgBA2joDeaUp37\ni9Jy3whxaYqlK02WfZaS2TKMp9VeKm8i+CHEFcVwJtPl46cNv/Q2D6UXVqmw\nmq415xKwD9Qtm3zEQlA0hSGra3zro18yDAdhzu6dHw3uo5Jv1kRVEKwPs+vd\nx7GHGSYae7uYLRXHLOLdNinN8v2bFFxUYuck+ctCrUCluQJgpaEVXqWx1THU\nKcTgQHtfJ8ZQVJwFWJEhdFkqxa30wNH10/3s5ANkXz1HvYXETdv0vWYyrAXq\naNxDT+Wn0uuNYnoGJ/Z1rOdYGU601RNUqos+cW7q5JfR3GK+lGdoDmrePQBO\nXKTWSKcMPKFT8YfURHyFL+CsXWTF+PQ+Gs41s771V0JnfKizY/s7PSquLGQ5\nOfK/FERbwCABxgMp0g7LIeIUAFr0+VY1cEtbg879KqqWa4Z3EQuMOl/wQiQT\n+MqcThka8RO+k1cf7aEDgZn0p4uogkj6RPjNwPlnp7rKa7cYEQ0zV9gRhTAY\nB5l+VEB3bG3LVvSs7xC1V7FlNUW08OWZtdqSLxzMOjFBuREFx9Rj10l/USC6\nH3FyODvYfnqiato85wZPv3H8qcDz9CWln7FYcF8sD2CwnEfGAzzVcSse2hhz\nNdXW\r\n=Ypvm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICxPfflzm6nTOKDHAQ+nkLgrS/jQDD+TiX6LXA2Va35iAiByi7Oe5ZO06obV9/MeZ5cUyv3jy9JGjvpcw1MD6wD0yQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-cb17510_1642456637685_0.15375708287869494"},"_hasShrinkwrap":false},"1.1.3-alpha-fc05826":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-fc05826","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"fc05826abe57c0ca8bf18d823e11bd9183665973","_id":"symbol-bootstrap@1.1.3-alpha-fc05826","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-z82mBSdcow0+UzUbRlP1hxLiEObMKEvLC8HHNQyxLDuSSQsK7LKsL2NQFYEPbJY4LJxaXUoVLyFE0iaxKyYtCQ==","shasum":"2d6eabe936234216c6222174f4cd3883382ac660","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-fc05826.tgz","fileCount":192,"unpackedSize":7058116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5fDACRA9TVsSAnZWagAAn6YQAJQey5I7RI52UbNRajAR\nNBXXjuC2x79YPAxu8sYZfrTWQih6TulgzeRvTij4kUYgdqEf399Gc0rXZKaO\nn+9ZP3d7Wx6mD3mdSh/it0WdLcpxOxc0GsG8ACSY6sA5etuHqfStndyjW0A8\nMU5f3U5OrLKZoRa48JMpKxQ6tSB7knKUCA4LescY6z11KPbKqGENnSyeyr64\nvyQThWyglU7z2yhJPt2PYmPHJf93llhMOS6v2H45TixyY/3bL8vfHo86JYBw\nyWMctwKcUW51gBAbxu/ULNdkmsIrXwzF+MfijqVNOHghTLkcMsstdUajmqKJ\n7WujVYFj9pGkrf3R2DrDoBDQinhlcgIBMO/dTJnFw2hLMnwhh96oh69yaK7Q\nGcZCvd/1LFGnbvRPbXcy6rxvxu2Qy+g1KMg0se1yzixditj3jV6JjEVNBlbW\noMlat/knGepF9q49dl0KmWjHPjhh8ndUYA6Uxw2zrXyZeB0bdOFnzTV/x9gu\nPW1KpV2aT+McBbIhd+IFwfPjmwY/zevHJp99u5KZzdOgk2IbSP/SwBcUHTtr\n2oeAyZy/XMPCX6MTcI/KXAmyrHf5wUcVwo7XA2Gqf89ip5Q0ECxceu7Gmbpa\n3PZKCmZmNoXembp+gMIRHfLuyOiPSgxNSvG/VQVqdhCJl2cz0zsoLY+Xdkj/\n6rtg\r\n=pdpW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzGuEi0IPOkpfocSK1t1+reDaHqDxKz7nVlXGj2y1pDgIhAJemgWqlXwDAP0Qc1u+3EWAy7oTI+jkP1SH/g0agJYvK"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-fc05826_1642459328512_0.6276925603772028"},"_hasShrinkwrap":false},"1.1.3-alpha-0f83ff8":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-0f83ff8","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"0f83ff88ea237203b3b96707dd2222c3be110d80","_id":"symbol-bootstrap@1.1.3-alpha-0f83ff8","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-AyVs2S/xayp0doSW0m5/xfKquQSP44/nqJiYYtT3Vtw/KQJFtU5Rt5oTL15n+0/93wrISgZqMwNIwvFDV0TGFQ==","shasum":"342f9637f68a1a914328f85ebbec408b9639d968","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-0f83ff8.tgz","fileCount":194,"unpackedSize":7059333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh53YyCRA9TVsSAnZWagAAeYEP/1yOsZZbi6rbI4YZ8scc\nXIINx8Pg/UqBgf2spYNNjHNn1RC+4QuLZaX/3ALwoMQCzwoF3I0trgVyLwpM\nfFNjmJdxG1GIUQg65FbDeKNYDtT45BUGOIWhLRy0b9z0flc5zk9M60afsNSH\ne1yAvYTBxfsu8LXYs9DU7OpDwWHkprHWcLSLvvX6XBO4QBmHeUrvONMDYDoX\niBp3wgDdVErBvYFBcmnPAT1sFRM9hgDIFBbEIycCrnSlRzgVQ7yu8xXSO9hc\nYZ41pkMoJgWr0iP4QoPd0jS0XRn2in4N0ws6mu4VeRv1QuVU9fhGm4VwbE0c\nI2Ky/fEuCW28uQODfb/FT/tvwmb1Rs/jnqS08G2GUBiUdGaxBm0v2DrjGHaC\ngRMeLBS/9HsBg2SClx0+5i6sd/zayv/WNtXEJ+K8iQHAdrqYx2vTKt97wm/g\nJphyQcmBMSuVLFnmBvNBCeU+TSGMPW+t8tBpBfiuLL3EyrMHGYaHCFrQ4stv\nakv+B+xks1Hs1YP5X6FatNAmpOGHBqE6bU8n4W6L8OyG/VVovqXzpbUv7DKa\n6ep+46r3VddlKyERrzZaHenFBb5bjZOhLpHKHuiVAkx8K2D1WSNgYLjWD9ks\n8BmlITXHmH+RdfxRbHXhBVBJvL9mbNuZZAmJTslVZS6n454igbh8IIv51Y5s\n3STM\r\n=/Pr9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2WfUyC1/dgCtTwOKeWg4ttoggPSdkylRNM2e8Co4gIwIhAMiR1qgPFwbkOK22DFJG8nC4pmSDnac3Kb/skeaww0KI"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-0f83ff8_1642559026050_0.5208835944016246"},"_hasShrinkwrap":false},"1.1.3-alpha-202201201146":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-202201201146","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=main)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3-alpha-202201201146 linux-x64 node-v12.22.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"627db1a458b97face1bd7c3ffcccd650d3c166f4","_id":"symbol-bootstrap@1.1.3-alpha-202201201146","_nodeVersion":"12.22.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-tQQPvrfueL5tU5MjgSu0vodWmgOchrRovKbmgCAcmeN7CBtt0cyiaPxZh7jGdLehqebvE5c68wprHZxgY/X4zw==","shasum":"aeb804028ed2358ff78dcfeb5446a3f4aefe42d2","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-202201201146.tgz","fileCount":175,"unpackedSize":7020587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6XXnCRA9TVsSAnZWagAAfdEP/A/Ub+DbNPVT17XlSzqt\nkT4T599Rt8UdVBP0lwNr1ZrYv5mr05atNiTr1aN7fF1VnyQNAtD1qVuNkTLP\nSHjfeqeZdurd6mcp5caqXl6jlsbtdgF1BKn3bX4O5JBWkLlZzmgPZMwvHaPb\nmWdv1cfY2kKZy1/JkzPfW8xRXvNok6a6Zn+f2a6p3iMjqoAxnnUBgkC4RH0V\nou0xH9WOmuNh22TOl94ySctsoyq3ybjct0SSCNeWnREUKaSPOuY8AoHhZvG+\nTMWPaRiq7xgCVM6wus7GD06qEoPHlbOhwbrDHhzgxeS9ALWAzrNOusK0mj2u\nFlpF1Mw35eq1tTl0y4uOR/Cn4YqhqFZEbtUoGehcC+/BqlnSZBqMGKfWjjAj\nCPl8e6X/BILlQooF/CJ0VOwFDr/zUNm6n3j0nkqrswNXsfjAY37r5yudzs3i\nTBJAzerrjFbPWZdXvi2UqMWo3OX+X3YQ/WgC5i9v+OIrSOZZnDfbkCHsJ5Gn\npHfcYFBOKxr/acVyc3HQUc3nmTVG9LN393qW4eD+/BeUS8KUdElLG/w2QTLG\n+dxypzvdw1+6ulyrr6hSslbvd6mUpa7BFXHdPWy/63FMwTKe5royGloe1wHM\n1X1cC14vzalN2jWqSVVMCpjxYKhH1prtxUDTLK0dZ4AjyTXWbrn52u3K3Veo\nEa85\r\n=wgL/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDv6Naf3Vrof8IB4n4MUgahVcNlGV+hDrd4VepTPmG0XAiEAxfCbQ7HRnZJHsTSLD4VAG20fMPu4RtZPIZWUO30TlUU="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-202201201146_1642690023600_0.953203959908123"},"_hasShrinkwrap":false},"1.1.3-alpha-fc57720":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3-alpha-fc57720","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.3 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the main ca.cert.pem and node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"fc577205e4e82d805b4ab488b19cffa8b6718df1","_id":"symbol-bootstrap@1.1.3-alpha-fc57720","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-IS2sl7Ui3zf540VOad0mIG8vszuaSw7ta7R7f8UXMJFN5imOCeeXG5bdXDv/+5/v1XPKhRaHV8CXF1RE1HxRKQ==","shasum":"c2a1455d8be1a1ae4665ae84adea06b5fc406fb1","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3-alpha-fc57720.tgz","fileCount":194,"unpackedSize":7060269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6YH/CRA9TVsSAnZWagAAytYP/3MsR9nSjAfyB21nkHKs\nZ0r7v1N7OCIcl4kxD6JKeRcMRHy/8R8hUytI4iJD4meu++3gVDvXTypdBKO9\nQMdszAW+Y9ufJllroUHkWg1G6INsWWEIOEfXf+4E1GkaShUQ2JmVP9EQoZ9p\neO53uQki/TEUiq2kuJTDt9r3wai5XMnsX/FoTXGJAKwrBnxR4j5WID/7El48\nebmdr364syRK33turTPZDJPrWd/3jGebX88uqdYHdUErmdW9N4TbSkR0MOJX\n20ltoHd+h0fUgYfvTuCYSqdB+XkLtT/geYBo7FOpz/GtjC1fUVAk1XXkFYXQ\nBrUY84xK9i5JaW1CneIcD/auYQ57BFHki2BQ6PmVicOm2fXSEQ+bd5H1YDXk\nP7TMJvs9TU/hJqDgjtjIF9m9bbxmA86cCrY7vSlFeSoe67WIBxqsbO2Pvk2V\nTyVRV7D3ivQqIwFlEwW3sQ7udcmtjA/yAcHQ6wlHQvJxUuKxEMtw8k/K5e89\n5lVruGNbyGMx4g/Rvduf8SbTfKbyNC4z/Jw2Deq/NSfrey29NG3Lm9slZn6Y\ndsGNbClru9HxsHo7yuWuuXeNDHRrp0StmPukKTjr/LGMA1AkivT9c383Zu0t\nLZV9B/UpN2Z4+pMB8OQDkWdURMDQIO7tBrQbMjDArpPT/iYfG3ehJLBFQdQh\nl3kS\r\n=IYgv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvIpXHNl/CbOHJV3OG9Q8iLIVmYSUqhih/7LY341I/gQIgRTGi3mwuBR8AHUnYQ5VNrDMwTXvyPn7CcnHyvir0jYw="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3-alpha-fc57720_1642693118904_0.9234992354771514"},"_hasShrinkwrap":false},"1.1.3":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.3","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^3.14.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^3.12.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f473cf3a36646aae474d6b3d21d633b9efe21e6b","_id":"symbol-bootstrap@1.1.3","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-zcPemiawHXVaDDfP9e0RCHOpXQCX7tboHC3yXxfzyS/E9un2icMadrtLdofAQ2cpUS8OuGdNZJWlhOnOV2C4Sw==","shasum":"c6d0851038d49386863d94512f806988f8a2e50a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.3.tgz","fileCount":176,"unpackedSize":7044190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6rajCRA9TVsSAnZWagAA7vgP/AkoV5uBjLUjhAJMD72Y\nAA28D1O/bYutc7v5HaLs52AMQsFS0HclILW9BnFVq5/Do1pSymGQnTKa4dek\n8ae/uwodNgbRyb0OsH/TMCOtaxSG6JBXDmu2bqE9qCAorp+yAwt+fYUpfX5H\nUuFa6gRIapXcfEYtGqL3P4HWSWJY5djzsWPKm3qeL3BwXF3yqNqzb/kgMQHX\n0fYnaIBOVK32GD+IoYrwxaX0VNfYlMcHrNDeS7QbU7SnxwZ08ls2UswvGjqA\nB9ROV7KeK8zL+DrZBTiZ0FLHX846FblnVzom4Jix7lN67gBipjruk8WkDwy+\npUFBV9AE/0EE2D947H5uxWZAtMu63Lyvi5/M/+kiVjhcA1IbP5j8Rge3hsun\nW4j8ke7S4bFdnLwNUEV5YSg/Husopu8kVVjiBwXOvIwV5ef+2qKKnzTEjeC8\n4BwQdjsoqpeQYeMUqsrShnM+qu0+PueCPUu+BsGWMU/M8w0qPDFzl88SeoWe\njW7yYl7fSRWt5STRbHqK00gl8gwItq26X27kYOQtLlGA5CgilYpIbAcl1UBR\nZTs06kQ5MiJ7od9fCZvqQQ7dD5pvQp+21IjFsNnXE0aRvJxgyaGSG2ChAQH3\n1tgrlhvPNnBet2f8sN9CyAb2zyNmJcMnYvmtX2QgI/1kJeYxVyD69z7EiZ0Y\nGwGO\r\n=Fl03\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbridrRg88mqbN5NzHSaBX8I2uR6BzquS0JHvqoBcwCQIhAOudAMczlHX+Js12CM3Mu/BBBHbyxIkrjACILRp7u2Rb"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.3_1642772130826_0.8087096726088678"},"_hasShrinkwrap":false},"1.1.4-alpha-828fbf0":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.4-alpha-828fbf0","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.4 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"828fbf0b36eabcbe94247e66e29056f1189c4368","_id":"symbol-bootstrap@1.1.4-alpha-828fbf0","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-f4uYN46/0xrQwhvcORFkJPzuIHMZO+6hgExzuOdb2ofswaxCbfTmnJjzmM+xRKJqDOU4BzbuCcLteTt940SD6A==","shasum":"4f26ca0583aa68512c76ee94a9b4fb70716964f6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.4-alpha-828fbf0.tgz","fileCount":194,"unpackedSize":7062904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6rl6CRA9TVsSAnZWagAAHoMP/2waIdGNG+zb+NLIHK1r\nm9EwDbMnIgA0zNMTOyTpfQok0/d+zE/M3DxGMvOCo9ddyhqk9XBNWic0y/rA\nCr1FEP2tsTSbnnfDWKwHx7vaAc+ycGv+wpB2xEav/6YlsoE6xCoA0BfrT+t1\nQ5UrPA+SjBeCFppbq5Rlh3JR2HrinIdSQOK+nzhTUlk2ifmtYHZ6IOH/QzYv\nTmuGP0yAv1oYEK9KVQJVew52tUfZ40J14dA+vF5cAOR/5ygwFSsA8PKm2Bfs\nidbOyByPISz6OsUUVjzVh+lMRWhfQbbtaV19/MWLI6uJ5OM4XBnPRTIvn8F+\nB71l0mZanhgvhOvllD1UUaU1agAwlEvMjLgHWCevKPdLoIUoRTxz6pzewFHa\noFHXPlCTJE6+zZu2oXBgaxH6kbm4BWPHN0GkDKXZCpuABHsV1zatTcLJnD/y\n14ys08ux7EIg3kohwgltC+wxgW2Q/gSbZE22uk8Mw3SpUa3BPsNfJP/xZO3F\ntL+OyAUpFCD+yBg2R7fy40263Hv6jc+yArx4o7bt5TJ1rEBil1h7QdlOOEH+\npeIoQ4R+ihpAF/dNZmqE1u6M9yzticA/P1PzmB8K9AsvjLV5tOrVeBNCeErP\nNh0kGeNUDfreZf/LU+UlhfzSrD/HZwVvnncCO78BMFNl55jkpDpeFHNSOBV/\nqicX\r\n=4vC/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtnHnTfYa0GjmYCc48phS3xIsFNvFcNdvLUpPoMzJBSgIgAkzOtKlRGUcbuvZraX6RsuviP3QcyybyqVgpyYGAsjw="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.4-alpha-828fbf0_1642772857894_0.9574305932493585"},"_hasShrinkwrap":false},"1.1.4-alpha-3f3b67b":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.4-alpha-3f3b67b","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.4 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"3f3b67baa65df7b86b4b36a65e2e70ac5b443eed","_id":"symbol-bootstrap@1.1.4-alpha-3f3b67b","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-1lbmdzbGAvCF8H8gCzL4TTtxQzVYDd5nPfzWKlakwmG+tYhEg/eNq9wVGuoNnrDiH8kmhKom1kIKvt4kJz9Ypg==","shasum":"2ea6a56008b66cc760c67b02d629bacb9ac388bd","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.4-alpha-3f3b67b.tgz","fileCount":194,"unpackedSize":7062904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6rq9CRA9TVsSAnZWagAA3T0P/i1UFIY43z2PFUpDhFw+\nWxb6B9Mo17vgHB9uCr3hFIkPHVCBknV1AfOy0gRmwh1wZ2PJozwwIRZJNWXQ\nNikqOuA/xr+NXkk9FBegN9IG9RUUSUnurFGgbQnQ3yUqjQqlUpFTeReMMbEj\n/OMOg6vje4acdLaMix/BWy/UKnwmsg1qY8mwyGRMRlDVCgncqMzyGQ1mQCFL\ndUkiNOEQkXCX1gFgecXrTmQGOW/kIOK+PpLFaYQUR5teEfAOItFQUflU3DpO\nw2sIHhGL531bq5b9PptB0062UGf4ULHKgmjuPvTAB1CR6jzdGLFRe+vOwxht\nUtBnrM72nv9OggqCQnYIg7mpl6P+JCtSf5uYODhDoo8Mahx1socPuURgerbC\nWfwT82gcqJAMPsHclJTZBREUDpBbVLHDi4owD+FYyutqgYSjORaXiOMKyCdO\nGf99CJfin0Bbd3zFMUQVzFAA+RnfZNhsZcMorsPQb2kFAbtv8F4kqNve9xIf\ntTNbO6NIoxvKy5+4Z8dk7e0oAeqpvPY6RvjZuPHDW/ewmvvj8fCVhw3cg+nd\nGGG/IhGze6Uw76rBrN/p4cH85bYhAyi1iCamXgckXUdWQ4WrHvsYamzzKOkV\ncjkTMrcJPDSG+aP5DgxIvc/3n4g66wPAfPIyg8eu1pbRDbUq07hseUerLRQr\nqjGl\r\n=8Lu/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwBhQVF7aSM2MPuPrqd2s5HU5jVvEV1F+9IeuYxcayVAIhAKE4fZvqXlZ4WJQosR/lQ1GltpHNXHl4hUIgJs/K+ebg"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.4-alpha-3f3b67b_1642773181098_0.18123495481362584"},"_hasShrinkwrap":false},"1.1.4-alpha-e63d2e2":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.4-alpha-e63d2e2","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.4 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"e63d2e2905750ddd1e195bf2aea5855f0a348e39","_id":"symbol-bootstrap@1.1.4-alpha-e63d2e2","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-6sjpLGf/9PDYHiq0JgBG0J2KHHgW/rN0PHzaacl3GqVQTaAUlWomKIqWnJZcyDAZT6m+Dpwk1Iz+WsjRmKwD1Q==","shasum":"a9cabc31bc42ce7f96979c52c3f61055090a10e9","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.4-alpha-e63d2e2.tgz","fileCount":195,"unpackedSize":7067680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8Z0nCRA9TVsSAnZWagAA9gMP+gK2B69NCBq5NjYsnB0h\nKlhCxC2hHB+U02xV6DttOF3K69VlQtT/tO1CN9wNdU48rRnqrrjSXRyTbdV/\nGME1VGcIkDo6QTLVKnW9V9h/sJtqEMu/Xpa3VRcIq29whFvtPc1R2fwZNexs\n4v+DTdSBvGmf058f6suUc4Z8jx8TMRa3dmwaSXDH7580BMVqqX68E+/Y3kxQ\nG5KsTxIrlfe1bvRWfTmQUK/AK3WU9rXdoe7IlwGxzjjzkSKhJQsQLxAjxfZO\nPT4U96cdsGwfhJRUovTQEEIc4GC8Dvf4NXsBGxEQjCVixZakR+9MzR5It/AO\n1dmnOSyNT7yjUcQu2JFhwJ91DQ45W1hBFCO3h/MpKfGQLapVLE4hlWpO261s\nPF48Z6ByYl5t8McHKODGHv+R6aByzW/hwNIbEHnZc8lusihqesIN7DAXcn3n\nJoqvebquGbUp6LKCtrHmF656RdVl7f+y7z2ubr6g/KTsNPhNTrR8NSoMxFCp\ng8CO954tyzgejujdqKRt5f7HTqCdULhDPK2JA3YpdsEUXcUnJhgsjcCGS69x\nCOHtwCb8x3E16m+uE7oc7z/QR2wtAKvNXZsHbO/iNsV5x2ksNQol8/116HaE\nMSTTG+0pk73TIhzopwJIxu0tcJ7DVMqx9BxxKMd4569ysSxFV3PXG1F7T8xo\nJ5Zb\r\n=X9zf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb/Otdcbl7miDGADlpQoSAmD8JJaM7xJU8O1WR9lVPbQIgfPV323IuFXe0uYEoxziiWmoGdl5yvYPeL6QbUJmFBFw="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"symbol-npm","email":"npm@symbol.dev"},{"name":"rg911","email":"xian.f.liu@gmail.com"},{"name":"heybaha","email":"baha@symbol.dev"},{"name":"bassem94","email":"bassem@symbol.dev"},{"name":"wayonblair","email":"wayon@symbol.dev"},{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.4-alpha-e63d2e2_1643224359572_0.772554284356542"},"_hasShrinkwrap":false},"1.1.4-alpha-75cd67e":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.4-alpha-75cd67e","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@oclif/command":"^1.8.12","@oclif/config":"^1.18.2","@oclif/plugin-autocomplete":"^0.3.0","@oclif/plugin-help":"^3.2.17","archiver":"^5.2.0","cross-fetch":"^3.1.4","figlet":"^1.2.4","handlebars":"^4.7.7","inquirer":"^7.3.3","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","noble-ed25519":"^1.0.3","node-stream-zip":"^1.12.0","rxjs":"^6.6.3","semver":"^7.3.5","shx":"^0.3.2","symbol-sdk":"^1.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.3","tslib":"^1.13.0","utf8":"^2.1.2","winston":"^3.3.3"},"devDependencies":{"@oclif/dev-cli":"^1.26.9","@oclif/test":"^1.2.8","@types/archiver":"^5.1.0","@types/chai":"^4.2.12","@types/figlet":"^1.2.0","@types/handlebars":"^4.1.0","@types/inquirer":"^7.3.1","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.165","@types/memorystream":"^0.3.0","@types/mocha":"^8.2.2","@types/node":"^10.17.28","@types/semver":"^7.3.6","@types/sinon":"^10.0.4","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","chai":"^4.2.0","coveralls":"^3.1.0","create-ts-index":"^1.13.7","dir-compare":"^3.3.0","eslint":"^8.0.1","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=2.0.0","mocha":"^9.1.3","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.1.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-organize-imports":"^1.1.1","rxjs":"^6.6.3","rxjs-compat":"^6.6.3","sinon":"^11.1.2","ts-node":"^8.10.2","typedoc":"^0.20.34","typescript":"^3.9.7"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.4 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"75cd67e765c6b411c1afa0d53e080cd6d1da8430","_id":"symbol-bootstrap@1.1.4-alpha-75cd67e","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-fwvRNX4vYP9+Hfo/SK84BbkVfwdCqlpyJ2A/sjNES2E1vTo/VDkKUVhBTVQ9IJLTkyeZ/j5/mCv9377d0d4PIw==","shasum":"44580a799b6f9c6e1234afde39943a57bd36fe5a","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.4-alpha-75cd67e.tgz","fileCount":197,"unpackedSize":7068660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+d2BCRA9TVsSAnZWagAA3iAP/2JWX6KWZmSlPVb6qxMr\neznAmBPBKD6WHYPPe9WKzmfg9DxFY9SSVZLElT6+I57HqL9aZdlU6TaIql14\ngW1gE333qBW/EZv4iNfRh9jUPzxV3TSJWvo620PqSwMLzChjJRBqdG2KPZiV\npFAqhEEpirT4Oju+GMCT6TQIiPlrsLrtBRCEnOuJQ3HprvJocnzQLIZRtjg5\nM7apsU1L4A0TupS85tdYU8tvFASSOXXitSQtoDkue1DvA7FqdKiLYIv5A5Bp\n+oljCQ2Pl2UihilGryIe3n3MLSzJ4k3sXX3ZJXrR/xJ/dTj0vyUjIrLrFi5u\nLDf9e4+Y+bij1WffklGlTQV83j/vjwtF6sRcUYyYWeRafXrtFgsm0A0wE+zz\nrjDbpUeGvxOuclYn06CcfUR0g09h2UkG0tWvo8Cx5+ezpWGR17Zss8/NapUf\ngMDslDeOgSNQ6Zz/vtbu9GY4BJmGmB/McgjpGXg3UrPj1gX3ic26tvZsqXh6\nBliwNliZEFzGfEw+HailJ0XNPc9XJpf1A27OSZstc5KjjgWMUahwnm1tjya4\nwNlsPtnZsNJ0gi0442k9gHqgx5ZFsi9uyvDNBbe4/n/18rf33UPHoZEMCAGx\nH+iLPBs3y42gdyVu/gayp0x9VNQ7UwvKiRKeff2j8JqKU8JC1lD15YOZXdRF\nuW+5\r\n=JyPI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+VuOOrcb09JacWMkfdDYF/1FQIkEQHijzTZg0QFAf3gIhAIbOxjQTgWiO8Kr0g6jdguGhsM7voZBXrY9XvFrqWfov"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.4-alpha-75cd67e_1643765120417_0.7763077599119961"},"_hasShrinkwrap":false},"1.1.4-alpha-7dcd80b":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.4-alpha-7dcd80b","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.4 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"7dcd80b8f0c1db3b1c36929036f3d14609b97ac0","_id":"symbol-bootstrap@1.1.4-alpha-7dcd80b","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-uFRU1YQAclX1ltZNkVavhRzL0EMhBbbNut6S0XakKrDNDiLI1bfV96/WKk8L7d1/2xxynIYZbdgmNUafqXUIgg==","shasum":"b7b3376a648a66409f41da363976d22537d6306b","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.4-alpha-7dcd80b.tgz","fileCount":197,"unpackedSize":7070801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+eCcCRA9TVsSAnZWagAApoUP/iQyZBFslLKPoLX+YhrT\nfM+7NNlxfE0Wzmihp8I6Qwttt3WS+OzbMlnn9P2S1ytXKivvUDwd/v3ZrV3e\n3/ZiWmeKkHU8tP73hfGp/NbqE19OUmG07xr10zRN8nO+NKgNYZA/nztSHH1T\nsy7Nm0aWtpM+zoi74XPoSvB+yDro7qSP6fCZNDHBC0aBEZ+QFYrsec9S102b\nOWlmz4XfpDuiLo6RwExItOjGEbD04BRKSFptavQDGUPUu6CIu6EV2zpakVkT\nZZkChJQt+YLi8PsJT2HsEtNp9v4TGKTrSB+HfIv4bNU4cTx4jZbiX2JymrTh\nEc7TOKCkGPx/Ouc71GYol8bTtLkerGiFWh0Kik/fPNbNDCiAlyTxJ0Ob3IC4\nEFcvGdO3qd/fHLQyL2cDvj7imdbPsyuS7T7blxZiT2C/D6I3BsSoX5i2J/jN\nLl6jdE2pNwA2D5FopQdtx8Fpv4BcNWSiqvi+ykbJnJwYWhbb8d0BVFjfKxuL\n/HYfYFaQMr7CldKNGqQNZ7FjrRKivRxkcPDTPoybw4v9tfNgXroyO8XL+xiT\nbjukJ3xBQ+cQL0COTMfhMZy6O8pGjUfyPPsGuUJ1pr0YEYhFjbMSgLOCt+zr\n+a2ngdEsqqV5j8IwYdpNnLxAHatBjE1JHnEBHMzXmdnUig4lmOFUlmOnW2p8\nNz+T\r\n=+lyL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDj1b1vZQuU4okKCJvAYeSchln1BgprkC64nWQClHmSwIhALNjCtsZfd3b7/xuMQEQ0AH556H3p5HOqzmDXTmSV9os"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.4-alpha-7dcd80b_1643765916694_0.9692224913643068"},"_hasShrinkwrap":false},"1.1.4-alpha-be3a0ef":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.4-alpha-be3a0ef","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.4 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"be3a0efe879fb342818d68325d6144f3853be43a","_id":"symbol-bootstrap@1.1.4-alpha-be3a0ef","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Ufxcw5rw1TWzQMkW3Z4a8KYXpPBTewex24/Pays7I8UyVdH+TU8ZIomG7jcL2m8s+Tk8RNbfEcdnyIgUTkDzFw==","shasum":"91c03c3127d77d2cb94fd8596974daad258313df","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.4-alpha-be3a0ef.tgz","fileCount":197,"unpackedSize":7070937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/UfxCRA9TVsSAnZWagAAN/0P/2BaZ6g6QH2/GMd/I5Ig\n67WqZDLelbGHKVTRaZ7qLhw6qFxNNa8+DUJ9orY7+28n3pfzX1mEgkkPIOT5\ney3fvnIMlKXplaaRZaaL3StuB1XWPPazlwP5D0sNkcJbXeZUtErPOWA6hT5C\nFiZiyK5IFSv0Zz3o4cUGrxdQfhYRIezwbscPGHJlQ9QyXlwDwLD1qbFIDl4+\nPm5z8IFkpciHuCnrvlttaaS2+nqrYFxzXJTXai9FZAoZIHe+vU1S6QZ9zr+7\nbPQkgi9tYiP+LFuqZ5IioXG0laH6crOCF5lUeGE9tzU0Bi+tnJPMjGiRPEmH\nXVYmuL3J6KD9insE/foz7w3/gL0d/crXpcEYDzkqXbURBgh3BaRnuofzC3Xy\nE7oIqLwtc8t/7KqXMcaTv7lWD//vQYTIKiotKLEDIEv6Zfjrxxdth/5IsPOG\nZbTcvG4O6l+NaKLAp8XVDBHc88/DLazlpGH6OgFtQIicqbNvdPQVoz5tEbIf\n6gR7XEM2+kgp/7azYsPAk7nlDrbY3eU3qEsEduBnfuepRvL6MYyTR45ykn4J\n3HVVTzmbzv+TfRIeARQqapfO9SkZPks0evZal6yZJW+XO6dQaZetzugMQta1\nzoG7qT8HTiFr/shrIEHXL+YWCrwKEC5r/2JtrxaamBL7oSikQe/XtebG6yOi\nDBz2\r\n=quH/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGG37+EHzHYzyiml8s3KIMB5d3mpgj/waTfjk4+xq30DAiAuLjTtnqq4I2Bw2xmjUbuoyOuM8wZNAd8FvF7kBWkMcA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.4-alpha-be3a0ef_1643988977267_0.922817090357998"},"_hasShrinkwrap":false},"1.1.4":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.4","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"be3a0efe879fb342818d68325d6144f3853be43a","_id":"symbol-bootstrap@1.1.4","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ys/ZGQpF0XSI2UwEjdcfDjQjcsDtAcXNsp+AaujWerY/cqEKV9M+Yn6dVkRZ3OgiDJFtb0W08McXJm1NGfJfhg==","shasum":"340879f341498eaf983b59377e76ddcb5932d682","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.4.tgz","fileCount":197,"unpackedSize":7070895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/UkxCRA9TVsSAnZWagAAeacQAKGhOET51yoBcgGncV+o\nd7KGhFz8/uVckqHlPLcPV1uHU30QcBtG8hV6xMwTHpmkXV8Mlegjj+lac5c9\n9LL+wRe52QcanxlBjZiXbG7N4etsAswMfqEqszXlB5ybhtBSCz5A+CKHQqNv\nvAXz1IOq5lc5Uv4+vOSDhCoKRPVl+4PDTwA1dlWsOy+lq0GB8Pbxx1CokyiX\ncN7uqHxgm0oxdt6txLYlDo8NJWgCoAHIFm7F1WXbZKIrooAkF6TOEAg5ZmjL\nuWnpXdDuO64tcnYWRUFxPNqISINhmbComjzckiSB4eWa5ylf7kkFwqZNdkX+\nV526S5AkR/Jh3ZZeFh6TljBFfrJXEav7KpiUVLuR/2HIdqueWzVwvnck2JyI\nJB3qu6Nn6EDB+y3S2jcqa9wLZWFQ/F7xhAJEsC6iCBrCy6e8bA37cgt7yrLv\nRdxlbJM0/QWtzE2weUeMTpWbjbj1pMUmWKWzBfSBi43BzJRp+G+ovpJehBy8\njmhuqQyiG1yGin0t7XXIwvy6ZdK4nbAJOwn+69thvEZFRZ91RW7MCbN42Df0\nVfrnNhqQt2jwEAioUOrcphgJ/yAJeTItbP9oPCnnQpHNGe3skFuhSbMmGkIJ\n4E5pn27/N41D9T3tDh2qejd9dGgoMiVUP3GGqVqLUyXq/vONWzSGdO48ewih\novhm\r\n=SmP6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGiDRXA/jyxYSMw7rvScAHp0Q2DBl+9mxtEs1YS0xEJgIhAMqyUXLMx0h3ghcorCbwNQHrT0aIfYapAvi97yXrN5KU"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.4_1643989297219_0.3035289595354935"},"_hasShrinkwrap":false},"1.1.5-alpha-684915b":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.5-alpha-684915b","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.5 linux-x64 node-v12.22.9\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"684915b3911ed0efff64bf5b8e27f167216d5609","_id":"symbol-bootstrap@1.1.5-alpha-684915b","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-QBrx2BKBxRAPHvwIZgDGl5Bh9i3gRmx9Zqm0DYhUpBZ86Vm+tiM4Zc924jdq5s4L/q4sZuxxD3Dsu/8YAB+DfQ==","shasum":"0b9949e86512697bab81e894bed54622ecdbf0bf","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.5-alpha-684915b.tgz","fileCount":197,"unpackedSize":7070937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/U0GCRA9TVsSAnZWagAAedUQAJZhQVZ7JQIKF027EG+9\n61Mi74YIBfpq3W5G3leV0HbCllU/DWUU8/5I6EsNGUJ49sti0j0tmTlSCXNF\n0ZB7YOqjkNxJxVOGbKRNvk88BE48XWFU3DSSzyPizInhCXYep8V5G939Vz1g\nUnUmI5P7xRiyYSLpwa7oLuGXagp3b/aUzYFJhKbZLnODpeMK7lDQ/mm9AOFI\nLenn6kTQ9nkksoMTmpFa69YGzZcoCJX4321f0999jSgkunr45NsGG9yg80+w\npsFN35orG9JZcMXXaG9F+AgBnILzwL2ZpuvjJp0NISYMoyToFpfx6RyUzWSw\nrKMaKb+3s+u2bQXDgOPc7z2pqHVRi9b3yXEV1FUy/Cnc4pWWcADZ9wH4Mbz7\njK5350oYuWJtNKljesiKsTVf2C0ieRCokF0lRYqugDnvOrYiVsl6Yf6DcDo1\nrPG4n1raCyqeqJAz2daDs6FDACYqsGtsttWb5Mrpfx2nujcM1LLhzx4u8Kk5\nlDRnGkDjx2HVqWw5syYWccd825+lN0os9HCHIPP6RLon2/GwDIFZZE+Qi67a\nE4oIe3TdNIHygXn/KegF1dhTCi1ox+Q5thAnTuYIpSOCs8E+yn8cDCbP8hmY\nfftCQIzRrshZPqVQWUT8ONz8rolHx/N3jEx7Vswn/yiRp0un/yYoeUDb7c/L\nqXuZ\r\n=4saH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHW97bzDxjtWQPcVLwe3OFiv6FRT3m+PNmR8oko3NdjTAiASdLxT6MNn25VFs/J4MMu+mrK1fUw0xvIFE8BkJc58yQ=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.5-alpha-684915b_1643990278367_0.7214569959024955"},"_hasShrinkwrap":false},"1.1.5-alpha-0d3a668":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.5-alpha-0d3a668","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.5 linux-x64 node-v12.22.10\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"0d3a668509870278257375145339f6789938a3ed","_id":"symbol-bootstrap@1.1.5-alpha-0d3a668","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-ZHZjs3qbcK/1YJSYtprdPjbfLoKKpvWeLQm9HqxfaEFeaxPJ3YApHfHRj9Rp3reVWE3OMrcPVIINCjulm7wnVA==","shasum":"6c90aafcee29633db3a2772762448ebe8a0f3393","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.5-alpha-0d3a668.tgz","fileCount":197,"unpackedSize":7070801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGhqtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/4w/+MtAMCYhD1XkvkSeofO5+qf/uajRqkAzyxwAj/3qdouPfqkyb\r\nMuZMr4wzU//oqZSGGAxKu3Hm3xmpejUfIa8JmDNzpABWTLTBafQir/kQblzI\r\ngdhLTYzMhuXgNeKE3Yx6vaxeyzLzhS648DIxpnwmLdfHS8fFLiMiAwX4W3G4\r\nbQcXw1dYAXdR3t4YBgRD6a9IKGqFs413jLVYd6nzGq6/B4jla/LBgrO9Hgz8\r\neg1bvSJ2ATibOVxM9HdSzeNpeRbfX8TWlBNvRS/r1te+q2rLC18gM1V8yf3S\r\nipiYYGf+77qh7TFwee5tnR5B7oG6JPXMypsjIxzWp9oKFQUOH9guqbRekKkF\r\n+GvF91CQ4fB0WALgug3tAwMPYlLko4WmIur9W/7tenY/50QVorFU9u2jJ6Zi\r\nL0tRTpjOxjLayRUvIuF9vLU44rT2RKNeWzuG95+iv8fCgmeTEWrWO8GeJDYH\r\nZsciYHThQe5XaGmHFsS7LfmxVxqYlGVNfM1zfrQPTC8yt6iB9fj/66fALUyT\r\nK+xGSJeVuF1pUhsNP0r+sGZP9Mkr+is+QKraAZzQfwKZ4DL1Obq/3HV4aG5+\r\nT5+W2G7Qp09NW9wWquxXl6N6XsNLuiSN9vxt2huAOJ7hzIOyeZCKid8zWHY9\r\nSDTXQySJD0AN9PdzDy5kGEXvRgiKzfuW/Cs=\r\n=aupC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+b6rYM47txjPHyspHP6CxGJoz6CC+Eq0T23t4Fyy5NAiB/G11tiDGI1By2qMei0Wna4LhrIj/pKOSmXdK7m1JwXw=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.5-alpha-0d3a668_1645877932966_0.7927917570419543"},"_hasShrinkwrap":false},"1.1.5-alpha-b89ed3a":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.5-alpha-b89ed3a","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.5 linux-x64 node-v12.22.10\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"b89ed3ab6f5f4eef87294e55c1bfdbda1edf048b","_id":"symbol-bootstrap@1.1.5-alpha-b89ed3a","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-1mFDuSJA6flSNfz+0EDobA5rojr8ssQU3Y0tooohi6sc3Y3UgnI8AKClfKGT5Nzq2hR+0m0VU68ZC5UsUX5zoA==","shasum":"13d4e10040edcc7fcec1701a49cebc811b4eb872","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.5-alpha-b89ed3a.tgz","fileCount":197,"unpackedSize":7070801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGhrRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIog//YXEzaRx+5uUQP+gNmRTmxOjgpnzSRIzsBB2Tnkz5hchAsm7n\r\nwWmyX8pUXItll1049QUhST1uLpysKHTmlp5u9dAHkvR3fpTg07Q9Bg44XUGT\r\n1y+4W5WYXW1bNAzhZf6aVILof5h8zVu9I7umJE6sPpd4Pz5eeGlMAKJiaO1S\r\nNcQsAJY/VN1/gHaLNG3d1EK0Mehu1PbfH+U3+Exo9poa3v4+xzyFgFrYLc1J\r\nH5kklcuNtWecTyFwn9VW5qUby2DVI4jVi+iv+ITz8f5KTZ2Hr6Q9CAyuoHH7\r\nw5TtOZGwIX09gX4HdedP2p0CQRoysWrr8gLnCYie6M5LkVIM2b2xcPAA6/rm\r\nk4VWcr49R2PJLfHlXzTUuhqXyVTj8ITJuFaq9It/nKMpaZ/gVrDhuKQUOF4a\r\nbvNMkp5x0BL4ApI+updc4JA0MY+wnUlC17A+8f61l533Gib/G5CRd2seMmxe\r\nxOMNxcy6orTZ+3ODtAVRFwhLa5dqiGKvP63fbS5twxPwVwDN5eO2Z3z8RwDs\r\nASjc9pPpxhXba/ax3XaoxSRa5BRXXr/V1Xn5HNhynIJc4S8k/hFj4z2znG1L\r\nPZzUwrXUIl4Myr89kKSwXOA0RR8wTmVmXaoQld4Rp1dUDDkHSOCwHKTrlby9\r\nt3M9OtiZtOLmm42QBrM4k3Uj9tjplfOKywU=\r\n=TjHZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDXZHbDN+NpstaLXxN6/qL9uIcHo7FshBy2Fa3XGcfSaAiEA3XY1LTwY3sBd6dchH5vRgHgntlCfJwpJ81C4ppXbPqc="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.5-alpha-b89ed3a_1645877969579_0.9253001133641499"},"_hasShrinkwrap":false},"1.1.5-alpha-3a69389":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.5-alpha-3a69389","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.5 linux-x64 node-v12.22.10\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"3a693895434f4aea2788633e6a29fb3304508d03","_id":"symbol-bootstrap@1.1.5-alpha-3a69389","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-SpYHbB7LgJhfmBcZjj2DlsCOjTAWkP8WIhOqL3H8JKTYmGwqAeofQvLHyXVHpUQe9Th3b1oW/JGoKXAARA487A==","shasum":"81214c10be4b67d3d45ed8cfffbf7e0876d98415","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.5-alpha-3a69389.tgz","fileCount":197,"unpackedSize":7071241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHmrUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvxA/7BOcox/cTpNHXoF90GxMtsp6Mtz0MYwRN4Q+HeRF4mUWelEqB\r\n9CNE0odmhH4Coe8vKeaWrOhFBtUSBnDKgAaxPqxLfteDxU7E6eSaI1KrdL3I\r\nnomg7dhNCCFtkFb79+yXNvjnTCyBMnYD1J6dU9IZnUvoakNwu1wTFt4I0DFd\r\nnwe1DZ3qAQRO3h+BgJunNJ4Pb25cMIrZVYS98o3tVCoV3LHQrY5QlO767jr0\r\nlGZ8TTV9zxYvAox3O2z7LzVvHdyKa4nkQM5+aCUq6INCMC5Wi1i/Yh3cV8kt\r\negfce4WLdKFGA1gNZKYg7lX03SMYmO5SHDh2+XMac1DE75NXyS5L9hMhXfkO\r\n71l5WhwGfunReBmrDfwo3zzsp75kag9W2vdoN32hrXVM0MDjaFpc78S+10gM\r\n/eVBKZRwRHX3Rsc+bc12sYVaMSwcW4Q6zsHeumRKnGbtxbPBb4v34ts4CS6E\r\nz95+sNO+mmfmRoCOnPrdWPuXyAvR5fjHxiq++y4KVMRQQwCKuuWjJSfeJq7+\r\nwr4CN73iG6HOFYO7BFZqYkBiHNICmi9BuFnGyvYw10jWa2/rsLuFRIN8NMkJ\r\nSWcjL4lkJCiiTZhxYjazyHzMDI9vFu0fDwmkwEaEiNlBrZUZ3O7IocsEoqMY\r\nRaBY3zbhH467PSIRTZoP7BKBMTahFALQsHo=\r\n=wQcW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOEuA22VLJ/WJuvuVb2bwKJFOeyIfauLxPHA/cLdBRuQIgKFuHPT0FZX3aCQP3xIa1aPtvFYzOZChN+8NG2EpVVKM="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.5-alpha-3a69389_1646160596577_0.565675522926324"},"_hasShrinkwrap":false},"1.1.5":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.5","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"3a693895434f4aea2788633e6a29fb3304508d03","_id":"symbol-bootstrap@1.1.5","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-sip393slgfD+NSzCoFo8VU955mHb8JEPpgMC7Zy0DDu2qj++Nu7nGl/0WXQE/TcYmqMcp1pW0VjxcAn5khxNMQ==","shasum":"d748f2593d7149428c65da58f12eb34be057d73f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.5.tgz","fileCount":197,"unpackedSize":7071199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHm0hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMERAAkOJnFIQZy7n8tGZMS2bP5h1J8Iy+spQM4eLYmbomjSaeIn3q\r\nztFICEySQ92cqBXZiEXJJ3F3zG8iwCHkuy41HVg7QK+0133qBvSim9EFhaoU\r\nV1d+6pCW74ya2i47Tmr/3afFP+NoUJrytLg2JHWMw5kWinShTv/502jv5EdQ\r\nzNXHeurKTfR8/DDM7IOyjGScDCsRpPt+7s5RmNKr6db7IGPUUhS57qeAj3SF\r\nRER8MjuiFzUdFgHDqatZOyRRr3MYFECrnH6rzk62E/RevUnEn3CEPC6erUTP\r\nBN/01tUNZkbstDFccbHFS5HyoFGMKbB8eJy0gPmO6dpZEwvns8RqOqhKY3l+\r\n/oFyvkqJcWINK4gM1XlSrRKYrt/Uq7TJTEA+11qiDyfIm7ABrCygvrd96TGd\r\nSVq/y+uOF6HaRvitYu2hRFlYqhmOqX6A7OhGIIIldxl2ujVaa2DRsY+WbD3c\r\nnsjQ3SFQ7goyrp189EpiXam2J2Mb+JRgZSbRX0aCjwutOzWQ/1ROYgQ/ljKe\r\nqZ9pKBIHd3hcZhpUErF1UDjxoYbh4SqcEF/aiAkr84uJSNLhu+E+jwrbomhn\r\nNt40FaGjzYq8nWkEFTQ+7y4ke4FjM9WUZTt/F6oNX/2yy4BkxdzTQpHtx5+D\r\n3boLv5PTCrmXnMcsIMOnwjhYWy/raWRr8pY=\r\n=FVqn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDM5V4z68JdkAuI4UmyEeKKteBWuG9Ug7/fWi6Qp0r18QIhAMgmin8Ro0vMOkJhIZivPzAouxr95V2nWsjIPHF5iLrq"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.5_1646161185091_0.40019711940145775"},"_hasShrinkwrap":false},"1.1.6-alpha-a60fb9f":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.6-alpha-a60fb9f","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.6 linux-x64 node-v12.22.10\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"a60fb9f7092a80ed2a44be37254ad7024771f12f","_id":"symbol-bootstrap@1.1.6-alpha-a60fb9f","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-bu3l48Zd+X+cChU6ml5BgFbeKeWWP4ufEhme4UNffq8DzFAN7p5nl3jY3gB+7wRMatak2jypoZFxub8UYTiHLQ==","shasum":"e30029cc47b3465e5de7ba66dc787ad22bc7674d","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.6-alpha-a60fb9f.tgz","fileCount":197,"unpackedSize":7071241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHm7xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGjg//aLfAK0KR4cAMVJNuuZiqQYvP1QMezhZgEEw2qVC4eFdHNJnh\r\n2Bh7LBH2+BOcIS93vkctPS5pyprA+yRq2HnXuvAXEzZF4JTJRki0SFpR/o1p\r\nDVC4sQslb5/qS5vaLmdsAPgUFLR/FRalRH+tOrpNsiUyG6lZyybt8VuPPHPo\r\nuqRW6eBmkByjtW96oLoZAhHa9FVvNS+bOiJm8ORUZqh37vQ+PfhRuEdoEe6z\r\neY9njlBAOnopI4ZQebLOn3Lk8fNEPCML/HOn6v4DeM/9sTQwtlzONFBzr4Ua\r\nk56fLh/DQe7E1iXOQGJ9GHrpfifWdj5R8L3+Wc4yTs+HnXvRktGeJnAW3YWO\r\nXly05PRFM0mkBWlgfrlAzwdoJlDqOKapVa8hS4rmOrwHOyWxrOr5jTIF8IlW\r\nO5AsbWq3qWwnt/cC1ZbGXkdPE1GCIUsYJFVETbrMhfwIn6vi0BXMZ/y1Ct65\r\naUUj++xxEiUqrFHRX6mMqhfLY75VQR3f0nASTp6gifuH/9QFQFRGWaTj47Bi\r\nVXOOSJ5iAGUtPDlmg1OwimLPiLXY5ySkxGH4Yhs1kWEhOzvRaBT0hxfJVQqA\r\nSxD4N935NAXt8uJ0Od6MVvCly1cUozSpufLd1eqPkYMvd18tXmBBEh8pLbyO\r\n0x+LSPR0mUZpj+qYeZnmH7jjgOJEu+m/OtE=\r\n=Txwr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqvgbXd+nnv1Uj8fWxpfEBjw717io4y8wFzI26S+nd9wIgKSFPdW5B1ji7ysiXNCPi6bZxlj29R3Gtnxa2YBV/Duo="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.6-alpha-a60fb9f_1646161649195_0.5481052693238622"},"_hasShrinkwrap":false},"1.1.6-alpha-f96e7f2":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.6-alpha-f96e7f2","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.6 linux-x64 node-v12.22.10\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"f96e7f2674485230f3442e54915ee63202ad0bf4","_id":"symbol-bootstrap@1.1.6-alpha-f96e7f2","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-NR2B9dcNUa/XuGP07sQKtyHhrwv1cehQomLyiAn2KO5TC/RNmQHxGtvnLW+W5DMQYKaS0aWUu0Rt2euOIIcFhw==","shasum":"a95f326d5b6c9a05184be1891ec19fca4cfad257","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.6-alpha-f96e7f2.tgz","fileCount":197,"unpackedSize":7071691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMZ8lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYug/+PXI9t6tP/6IkmoFnmnzWQw2+vfldLWX6Q1UzG5z2B/ddML7H\r\n68EqwVzq53dLqYg0u7d29NgMqKWexthk8Ris7z8pd27LqOKqGT8KcgDla5aY\r\nwz0WRg3xKBPO+zxjIez557hp/VRD4TJ2iV2JJcr3Va3a8bKSks4rEfZPBCxv\r\nnZfGi5p4JDNn1s391psgt6Uboxy23d9e2ekfkaNKPKisDZRSGWIt9UCNgHa9\r\nObphG3O08P7Jlzq94W2HTQ6xZCXadFXxU8Alk+XtjJI3+DTHAlysr6GVV6vJ\r\nP2QQRh0ryMgm2ocw2lzDZBVSp4XkrNWReV9vhiQOGriN97By5Lpy5S1F+XEu\r\nxYcpp+6rwZdzauiA1QJyHe+5NvKCRdo6w8qU2qMkZfvni/rJuCHZIH2/R7Cf\r\nJjKD7OrsE/cL0RC7f4ns0v6yBCIcs1VyOIVIm/31tTui9vuuD3b2w5wJvPso\r\nqBzsnHwJmkKBl8XWhvgXtsuLrFGnkHboVnBJK52oCYhk+zDpR3Qe1FAKnbY7\r\nePVnBAVYAm9XkgEIiznpnEPml7LfA2ROc4QtdejQPNHoMGVoY8gL+zWS3CN/\r\nQ4EAz3y6pqNFJdyo1pPnjGwkjrbfkMBl5QmLgD6mCDIeez4nlQmxxjvOU5LC\r\nQ1RNjS10NQgwGz8e0jKKKhlg5JTEMI/dmxQ=\r\n=8DXX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDs/K0CrPyx1pvVdNasQMBXXqJIJaGpNU6a89FPnpOr/gIhAOrBzO/EOaCHFmd5ZcjahjbVMzyAJQswQuajulFufoy8"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.6-alpha-f96e7f2_1647419173512_0.5426713110148205"},"_hasShrinkwrap":false},"1.1.6":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.6","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"f96e7f2674485230f3442e54915ee63202ad0bf4","_id":"symbol-bootstrap@1.1.6","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-gJzjWMJchlxG0wTggSz9NrDvHJDKF7xtzngQy1CYtuBwSWLzWE6BoHKEbl6oVr1ejkWxmMoUqCiL42DjI5n32g==","shasum":"8de70d518b0b1419d87926c5f9c882a4b6f0c21c","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.6.tgz","fileCount":197,"unpackedSize":7071649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMaCbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeFxAAjYziWTObvH2q5sVYGGhmfM+aVnyJw7Bjrpin37MZHIR5Y4rQ\r\nGofA+dsKFNrlw1a8JGAqSfAd4A/wl8p9xj3HTMy6cwLIqY9b1N8rhN3G1Dc+\r\nO1VE9MuKcNust/u/jMD+zpbx8fdfm/76dFCw3ZlkCMIoW6c2qm9JqQh/05d5\r\nHBKHJ4gyqPRNiLqgAmUeGVCiUh+gcD/LOYVNfpgdZPWVjee0A+NqH3VG5skZ\r\nD1cuW5UC6z2unW4xSi990r8JkCpnqgn+/wmLyF9T2hfgZpB+my/Vo+0S36pE\r\nfCrTlGGkHxSHY6WBfV9j597/1ZFXeTEHJYd8cjyEvSx0PgSgS8yoEIGwF0iW\r\nTLDgIpIy0OPCycCUkX4vdKftVzjO768NDSXkj3t9CqjupRf7VAg4OE5jhTGw\r\nQmTOJLxmTLqHqAeeInKC7nFIlrixIzawe86+iVHzWPBcPXWwveZkCx+enGEW\r\ncwQwH0P+1b47nclNFEmTwE7vulTfRMGQVq73bUoMrAFDQQOhMGR9RuKkU8Sy\r\nLbB71o7cnbjU2xwINaHBW5u/VB+d/aaVQXuOdeK0ulfgUDNBLltJO8SmrgLv\r\nASrZ1PLOrL6brbfrCvNON7Q82LeFe1oldJgYOp8OidEvnThyX4UOKqyC2uoe\r\nkMJrEgWMBtS1LlvLJZ1EpczctpUjv/I3Ak4=\r\n=2Z7M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPfmkIO2Laq1FLEV0OJ46Z1l9rbiPsK731PWp4eIiJygIgR6EmrQW0a6H3aG5sA3qTbVB2Y4kCUf0Lolz8ZTZOXbI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.6_1647419546835_0.7500668949189186"},"_hasShrinkwrap":false},"1.1.7-alpha-2b984eb":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.7-alpha-2b984eb","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.7 linux-x64 node-v12.22.10\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"2b984eb6800146866e8c32fcb529fff90ced4f72","_id":"symbol-bootstrap@1.1.7-alpha-2b984eb","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-32p9G6ES2rr7ShSceg6v/kIC036GN6bRGcemncOTnFobIeb30jzyYwyh5uFe4Zmn3Usrd+ySOHJWaHz7mV0K5w==","shasum":"3a95c2ea940ea13f9996e98a68037fc2169572ed","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.7-alpha-2b984eb.tgz","fileCount":197,"unpackedSize":7071691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMaLTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqF3g/9HfqKdXJTpC75nLxzXEqqj7CfGDSslLHrxXB+5b+0S+xP+gnu\r\nGNYcjgezR0j5vGEEwd3593NR6kXBEPsn3rxAs68pQg1DBIVXMGcGeFI4o29K\r\nbKqY/ArYOELWPs67i4fGE0n39BIibRWn95yZ+M/0QlL8esKnxH5n4jzrMYas\r\n4Ypr1lhNyll8vuYsCTi0/aMHIh7ZiXpaVeTZhhMXd+FyVtLYV1pInXicafPL\r\nbrrt3NuYa/G2v88dM42L1mJHDNu471+4LV5p4JLrQnHvLyMsd2rP6lIye7tA\r\nhzcL9YVfm31ygR3+yYxjx3zlTpAdSui9IYC5rIPVvy5eCV6pELRB1RLTB2P4\r\nvqceRrPCp0R3fEg86lEyO1cL/lk5socW9M73mabFMLrZVjoIEiA0PdcT1Mt7\r\n9e9hYRm6QuK/p7uMLA+z1CeadDjg7rOn0iSEhg6Wq7JmJbUsN1s3dkYlvxhL\r\nQ2AOzocn2nOwx+9zqmXDC/dI9LzglddtHWYe3rD4/w766dImlzWRWvvkER3h\r\n5Wy7loEFJ35qx4LVs4gY0wPruGiE59bZunQwCyf/ImcTK9ktMzcVyG9otU8y\r\nUYEsmmLsHfxRpUZ3zFVHqE/eUaLHZKE4edIQDvSOmqKKCb37syjTp/QNLlUt\r\na53CfJfWYV8YnYH5pDrINAGvChZ9QPyquM0=\r\n=LrJF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcZi5g3luUDWfGFUqL05jxeBwVS4XfnvNUge9svkxENwIhAJPcDEOS/u33Rxa0Q13KvvMbQnzJsk8UHmIynQcc2W0N"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.7-alpha-2b984eb_1647420114758_0.7014745859460665"},"_hasShrinkwrap":false},"1.1.7-alpha-8a56d9b":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.7-alpha-8a56d9b","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^1.0.4-alpha-202112211435","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=12.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.7 linux-x64 node-v12.22.10\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"8a56d9bab277bbbcdc287a4c6da849fdc2efbac1","_id":"symbol-bootstrap@1.1.7-alpha-8a56d9b","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-nr5lPBFzWKo5FPD8PkethWd7NmmPGyEmY8TXHcrpHWA3y0RRkBdqG4HNz8aaZjVMDwvo4D9x+2ufJlzRe/9ibQ==","shasum":"7935dc04c03d03d7a75d9e0b883e009718c7d6ec","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.7-alpha-8a56d9b.tgz","fileCount":197,"unpackedSize":7071691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQce+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6Fg//TcZAaUUkeg/NhsmlEXN9x03EP/VvbY5xhjt4bmXoAv2k1L+2\r\n2aZWp/bEZZoJokfQWDUyQ8Wm7MUuYR2gQ6LuyyOiIExjNp7a3v2EVDM8UC20\r\nxnksJemNxsoGcwIWz3YUVV5Qyr2kCn209vn0ZPIu9MLqiOko90zkQg+jXqhp\r\n6dylm5Mv9EKoXArXYS+gqdkEuy6LRlDyYMaenfY5Iy+ENGF0LPhOcYDYfCzr\r\n/AuXCx/x2P9UapDr7QkvbBNen4v040z5mhaYUoT4c27bwSMMyAR8gIGRpvb8\r\ndQMYsYNkfO/XEcfguCyHcj04K5g0YW3xqqm95F2cR3p0oc0DmHt23udDOW7b\r\nNENOSQ36Z7tDE6lx9ZK7CF6pmEjLcCeo0kTwDz53YrOwAZTNGZ7aLJls36Ee\r\nvSBTZFhvuv50SZrWqD2xjNhzdd7pWUVV8JOwJo69KPZlBqkZKp+l8/s5GYxU\r\nhBdcYa1mCj2lQcWKtrGSvtFHt07EqfqNBbodkGWVK6BarMiivw4d3BdxmulO\r\nEGilUmyv/SGzGg/Yx/7jzEduzNwXN+WOrerKV7sNuSP43stFKoFWZszfrbrs\r\nKVrM7y1vU84cOjlLDU67Hm8aBgQwuvRwXdpvW/D0rq3YSvLfOHE7PWyl+g3S\r\npNZXI/VvRBySQxMnXOMgs5JEJ1yHmWo4yAM=\r\n=awt1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXqzlfoiLgJilr0cUtOmoFjpT3mW0Vt1LuQ2PehHhgFgIhAJHMA5aZRQQ5wvT+rsCEVzm7cpeF9p4dhAHqc+JLz60S"}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.7-alpha-8a56d9b_1648478141775_0.06916531762534106"},"_hasShrinkwrap":false},"1.1.8":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.8","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"1faad8ac6a2b2eafd0834a0a3e74f5bbe23fcf7e","_id":"symbol-bootstrap@1.1.8","_nodeVersion":"16.17.1","_npmVersion":"8.12.1","dist":{"integrity":"sha512-B1CQRiBA/WDwegPK4d6bi4+XTTV5c89k0hH8k3KQqbsz9QrtxLwiahopYCleoyCHpKlrK0to+93zxJwf3QY/1g==","shasum":"05e3c74780f8013940721e204711b6c3944fe666","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.8.tgz","fileCount":196,"unpackedSize":7050244,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtL9vcQx0rLtsnc4ASd9Tw1cQsMCUnEKreAYT/NvyK9gIgBMkhjzoRu43/8rb7iiqaQPeURPGIhA9NXgichAlJZac="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWAMTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoI6Q/+JbJEeDdj+UlyJVg7xdPhv7YZ7mrE0q8EXCudvVTXu+UJuvIH\r\nMRDhsVDJXfPHsHwnqUaWucbVzGStMxBfgzXc12kTIsnSwEPzag7x9U0qunVO\r\nIoIZpvjwiZBFhcvFkVL3xNOOv4SlHXKh+cS6uwu7Gzi7AUJ2c6NszJ/2LpRs\r\nzNO3lrdwH1cKJIXs/7Z2jbTdDevE8gCO2RPbIHpK+c2t8NtGLnyCiGOi+Haa\r\nQ46oNoZDdUw4Df8SDAc3eTtQ2ZvGaox3SKM3G6hdIoMYQuJJN6Om2T6+QBGM\r\nBmy8B/9PDBzrXeLkfD9Eio0crJO+K3Rt+AMVUDo8lA/1RMxF2NLrFKOhg2/J\r\nmZ4YbtR1ebeGA95RVR3eeINHfPJRNYeqgrrkcJC56YURvLuJNJNAAlFfnLcs\r\nxU50Pz5ZcE5xnLhuAeQrUQzqXrByqXD/xDrdDAW/EPZc/8U5xkbXAmggOP3N\r\nquGlIwOi5MfyEHBFaT409DhoX3pAOlqbLfhpQX8Ggqc8JeOdu82b+4cwSPm4\r\nv1sI8E8E8RaRXhYQpovm0c0OWPoLDO3600cwIMnsdnajuv2z8R9PuoIIGbwE\r\nOm1DR7iJXvw6k2Tg1Wl3CcKzsYvGqmjXoI+u2nzatUTqLDoSheEFntg7HHq2\r\n8MpZxUVk/Dbq+s01E9nqKGTqqs8cu+oZIuo=\r\n=xQLX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nemgrouplimited","email":"system+npm@nem.software"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.8_1666712338960_0.5610574978648479"},"_hasShrinkwrap":false},"1.1.9":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.9","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"9ede38899381d18304ac09bcf05d737957abf4f1","_id":"symbol-bootstrap@1.1.9","_nodeVersion":"16.17.1","_npmVersion":"8.12.1","dist":{"integrity":"sha512-f59AlvIxLYsZR8n3Ae2OmOJTE9s0YKHzUh5s6daTfZJsH0LTBGGm1Oh0bnm/en+Sfj9yU/vX+Tfn3ubq5v6qew==","shasum":"27d984ddbd354cb628bd95ea4a665d4b1c91e7da","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.9.tgz","fileCount":196,"unpackedSize":7053304,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6+Djehd1nSn8WUmkioOfJqPW0ZjYLPfwlQlBZ6FrYGAIgQY8jEKfN0ZqHS+SjcyOeiTYzRq1CL1fvT9bsgHqXtXw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja+yGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZMw/+KQfz+3hz562bwZVAgIMdsxlOkNDEhFEQ+1lHyJSlFejkI35n\r\nxIbYmkupMBke3KA74vN51CxYe5SLQAs0ITxRuGwEIhoA4ctkVJA4DUgxl+u3\r\npNpbxLe8WMx1bPfcY62Ti7ZMRwsupZZiNCXX1Bt9tAImS2lq+dX3P1fELrQ/\r\nERIeeWCPIa2zm+2tywaNSOkhUoq/6sxjliLjCz3QiIHxjUpuClrRm8sbE/jG\r\nEbqFNxdtdJcO8YnB1i+YN3nzdpNxHanJmsknwmc7uqFW0KA6xDmdy44/TSSv\r\nAUfBqCKOTEUHAAZ9TlAsOhR8266NvRXWq6YDJogTDTSbqguEpgHmcs1p4yjK\r\nVsBpnJRXaEgxwxGRStE57JsQqB7Gh/AWNbL9ihM53x31VmzFp6uUH0kU9F3R\r\nDsj7MIRBfM3dPmWUE0i9KfsE7B/ypDEdDcE9G3KI0Jx//gb+E5+Ppc9YS+iv\r\nL7Yc+UtnhKuXUrC5TXMU4k/6K5onoyEpFaBxPHFwPRMPBmaIvdbFHNoZa+FO\r\nRu2HZj4r0d7qTENkIE2Ypt2lGkGLLggG/gxOpU3AqjDmh6GAvQhDYNiIyExx\r\ny0OJjFye3eosNU56ggLhrAtEvVrZtb9wa6nfxEsOuOEcfMERnrtwO0RzgD4X\r\nHgRf4qtE0T1u+Uzn65KUEmDpEl3Grj5vvOM=\r\n=ZkM9\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nemgrouplimited","email":"system+npm@nem.software"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.9_1668017286047_0.4962766022803493"},"_hasShrinkwrap":false},"1.1.9-alpha-a5a281c":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.9-alpha-a5a281c","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.9 linux-x64 node-v14.21.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"a5a281cc6b2ca6ffef835c7fa7ca27e0bbc9c2a8","_id":"symbol-bootstrap@1.1.9-alpha-a5a281c","_nodeVersion":"14.21.1","_npmVersion":"6.14.17","dist":{"integrity":"sha512-Ulrg0zDGqeQxs1m1jlmK/nyHWAhKc0TLghoyMKVli+zYlaX/KtRIsV5fvCYGQq1c1nP+d3RLQ4PbonNZQEqsKw==","shasum":"49a6baa1f7c7e11943771aaa944b4db1d5e8f6ea","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.9-alpha-a5a281c.tgz","fileCount":197,"unpackedSize":7079621,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFlcbMPWQiTMTlAg9AJ1Zi4IL0uKa4Oraa0qAbPnDdh2AiApW3lGvXdkFHUVui1lioQ9i9eE/jpJGmJu0GHTVEKCzw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuVWWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpX/w//VMDQm4Q2XC3NhZ/MqF4UKPty++UudGvNW4qO1WWqtGvQ8Voq\r\nauQjSP9wEGHqDjL/A3iZmxe/A7o0Mhppjzg9Y68G3wJ1jN9c5f28ndBgACrY\r\nByWtMI6cxUPDxdLV2RgYZnoiNSgV8yCIN98z6ly68VoV2mRzGlqWVOSrW+WY\r\n+XggabfiqaslSYlsAtsuK8JF92T5qH8PpPADn5gSI3edXCbdmB9lWCZK2tMN\r\n4fVNgKCPlVd78YRN2Xak1C5kdE26G85O2AE//CWtBS08rOFhV/ItCe0nilGX\r\nmsr8RvY9/WY9E5fiPSwXpbqkb4pY/yUaqFwWCSXyK8vqyoOE0oM6DXgvNbop\r\nhlGODIklVTadZ5CCD4+DHYQXg8qVXz+InIloFcWgyOMoZmh/BQoCnhfdSr7d\r\nYuyYFRZNVx6chp8VDO7W3uKtk0lVor1ZMSvba53oHMOJg2w9mklzJOQu+ic7\r\niY4fmQ17gGW7HtvDBPV8ahnxrTywOVvhQ6PtzJ6A3EKTYlFKj4pThEsBng0q\r\nlMB+V4hlc/VXM+Vl+ltu/SJXw3Ka45kGWiJxQtQd5AnBA66EH/2X2Oec3W/C\r\nSt0WRpwBYifLqFH2+29fCsySvcKcBPsW0d01UttQW8xflVWQ3uxwofyq3S8+\r\nGLc9CvHhTPTHT472AXWKb472pTicjG+0nDE=\r\n=FODw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.9-alpha-a5a281c_1673090453694_0.6910849372377434"},"_hasShrinkwrap":false},"1.1.9-alpha-c8e7855":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.9-alpha-c8e7855","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.9 linux-x64 node-v14.21.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"c8e7855d303165bb3b0c8f70449ff0acae6afa51","_id":"symbol-bootstrap@1.1.9-alpha-c8e7855","_nodeVersion":"14.21.1","_npmVersion":"6.14.17","dist":{"integrity":"sha512-R4uqJ0FFQM8gFPXMuTAVpJMNgtiTcuapz/pWtloCA3pRZw9wpeOKzkV190FJfYMVyJdXW6cGbCGnIo8vAt5cEg==","shasum":"71e30e41c2143474e9b41cdd0166f67a10d4248e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.9-alpha-c8e7855.tgz","fileCount":197,"unpackedSize":7079621,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICb3tqhp/QR4UZuonRVVhMACp4iw7YlHMv2hKiLvw4eUAiEAyNq7ETDIs4y7Mh0AUy53qvvhKWHKPhhhZD/I7lpMYLc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuVWbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkMxAAliZRoi5LgalSUOdR4zFAPfoW2Kv6LwVKj0uI2G2S1UYp35a2\r\ne9zn1A5lCaa2Ytffm5sHjYQ+pOncr/hEnRZ/4a2cxNl7M+/PS+N0Ym/i7JT/\r\nQUUh1hCzuqXnvZ5Uj3dqLtxj3ofVn5RTJ4/EnCs6lnbo6Pfg0pRvhfA5KVqN\r\n59jUsSNZ3579o5ITjT10oBURdY/IVl48EZhRTwXtpbTy8YdX0erLcKI65/95\r\nCKPeoq0btnqEI7M5NvU4LkWS6I9FBy/X5Ywsm/1I9IC9IHJTCQLg8Plh6Ff2\r\na8LSZmzdpYidnYgoZ7O7pWgQAsCO44KbQeYRQyd+Zz/y+jV0oB9wHqyJMNIr\r\n+cjeXBil+y1F7x9Xpujp9NY1wlQCm5LfwMQVTII7a1cn6D+ue2eZOumJTgzq\r\nKFKimh52AGx7f7jbaOktjehLNrtjWxLti3gtY1EmPTTTwEG4gnprWEkD25id\r\n/MsMgs46mxrWAH7pK1ZuuDCLH6uslGFZW1Z3d0VJWu01lLb1yQtQOfSNNQ4i\r\nJkdi4r+jrf5cTYlWPwSEigPjggMlhELBbEOy4gkG2WnTgWy4VWDP489lXXXa\r\nlHSHvNTtF4ydYdsf4+HUiruSXD9Zf9hqEfZpL/hT5g8/8tuVG1me7bbk6vOF\r\nop6m1cR7Rv5ZexTv+yWRMs+wdtiyIKdqrGE=\r\n=I/9U\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.9-alpha-c8e7855_1673090458944_0.5314921987188497"},"_hasShrinkwrap":false},"1.1.9-alpha-3b71e38":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.9-alpha-3b71e38","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.9 linux-x64 node-v14.21.1\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"3b71e3874998c1462746e382a2e430f44b3f1111","_id":"symbol-bootstrap@1.1.9-alpha-3b71e38","_nodeVersion":"14.21.1","_npmVersion":"6.14.17","dist":{"integrity":"sha512-BN1xzZHJj7aSnQmVFvlnSo0FLuZseTpy5HVRTO1rT63kotqVCgs+2gF/6OaRi1jXIRE4ZLtdZDDfg/OMS+DJTg==","shasum":"5d2158410179b661984b751045692a9d58fd9bc8","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.9-alpha-3b71e38.tgz","fileCount":197,"unpackedSize":7079621,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGjnZxqWfTWuamkWLzK2zI56T7B/Z2gsVgTA+LtnZOvQAiBz5f4h5h1wLccQL5hC2lKzT4yTb49ouLDxu5OvzErprw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuVWmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnDw//eC+Hwfkhi2KDmuB0q3Lqzy3jEIoq4o74QdzJ60Gn/rHMifZk\r\nfVGkkBa3EyXu6kxY6eB3PSWGvlJn9mxYZ+P0axL+oA5LY+svOYH/a0mdnjXU\r\n6dKL9u3cTUAIqJ4+t801Y0dtPJ4pl+TsKGgWD/7jzhg2CXVRU2gROapf+a0J\r\n6K+8yChPRuk5t41AOgh7/3/HdXKdPTrC2m7t8q9a8+ILLBRRQMblZXEHQOa6\r\n4wxJPOZRlJ5FAeS88Jc/255BBk2F+vg/VRb1RnrvtrM3eE+Jq4gMTzQUSPy2\r\nkcbTlCbdjM/Nf35djFZ/8nrMIlESZ4iqMbZN4juaL4SvZwPYAnxaxgifRdXK\r\nghnvHliXpQ8/MiJcKaL5kHgHeKxCMQp81Ge6We9IRPk08JwXdPK3nb4O/sdt\r\nSX0kDRCU1LtAjFl+Be0rn+zvg28C60XDLgMpbiayILcWPe5MT1JBmAYNpHrG\r\nDrfNc6zH9ezqIbaJONVx8jqenQhfPyf8Ls93cwnkLJkj/K/tnmzTF/tijacD\r\noiNdXZQ6ITwNhKV4PYnNzpseLKETJJmVqqooHjfm7mDgkDm62siU+ShopJzl\r\n/Oh9+PJ1zdnzw1wQWrtRfLDKi2Jj0RIyPVnfRCH1UFlUMYndr0YRdjX7pGgm\r\ncXv0S03zBkOhPiZfj0PhGNdB8AsEdhcijIU=\r\n=lspH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.9-alpha-3b71e38_1673090470032_0.9385450795416188"},"_hasShrinkwrap":false},"1.1.9-alpha-032da01":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.9-alpha-032da01","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.3","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.9 linux-x64 node-v14.21.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"032da010ac1c3b826496ce7a9780267e990f917e","_id":"symbol-bootstrap@1.1.9-alpha-032da01","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-rXDjXFpCnFoJ7JmQdpOXf+Ch5nG5I+PgCIXUH+QSwlbkvG3ZjX/2gfmrpqjg/csteoL1SKn8WCnDZY2JfNLuxw==","shasum":"de8e02791ccc5ad396ba569fb775cec14799f86e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.9-alpha-032da01.tgz","fileCount":197,"unpackedSize":7079758,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICc7LjBX1mAF80d/1DwnucHAqWYCE9xSHf0pvno/xrkRAiAoNkaERzXqRUX+eTwxIrRHbJdNm9L+1yfI3/ijrfDmMg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNsWJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPow/+KExSIPKvgr47BxWPDzMILRR2A5crdpldhEmWZ7QTwtLoZG0P\r\n2rg7YgZspJHu19ITOjrrE+XVXiLjIvotbRllDcyPgq9S8pBUbGBhFdAW3/vc\r\nszwW7K5wQBBlW7m1QzlEGcR6Aqoj5/gtjV7cGYQjim1LO8U1buO+Xwd9XFtC\r\ns2MmDyU8YHzjSUWRb9i87ndcBst75l8tFtKP5NFxUyTNPwTkOA4sSYAl31Zo\r\n7hDL/Jyo2uVlTb2ks/RsKbyXM/3ToLO0gv8IkA4paWghlJrh6we/v0Fi+5Ha\r\nm1ewV6Q8zIMVhJm0heK6BzwXYSgR9PFNEInOULV9A5QVHlG924CtnY37BLSw\r\nC5HUdC0MXfFrxTOsYinpXPICSMhByX7scg+qvtSwfvI8Ou6A56nfBFUKsJl5\r\nVRiztdFhQPu8qQL9sZsuU4rd8MuoQV42+iUjvQllCDf8dC0waFaI/uajk5++\r\n5eQWmsJIToF2sagf8YwoUuCVzB85TGj7FUvf5A2xPtTbAoFhAYHmwFYb/Nod\r\nmQSzUeoK/mVgjWaU4A26W7Q9YfNMUONgVACUcF238PTj2fvD0Ihj1B8fKvkN\r\nWO+Ci3jFEn4xnST1NsQ5vuHaJnqlXesp44VKFlCZebhWhn/f01n7CD9OYN7G\r\nW7trLCgtxJn9oidRwBLcZ2uebMgyVWbcgog=\r\n=0nZH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.9-alpha-032da01_1681311113661_0.7459132484009505"},"_hasShrinkwrap":false},"1.1.10-alpha-128f9be":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.10-alpha-128f9be","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.4","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.10 linux-x64 node-v14.21.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"128f9be4eaaad8c72f6d5e6f50c1f7827325629c","_id":"symbol-bootstrap@1.1.10-alpha-128f9be","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-bgNVVLs5yl4xXXziXKvA7V0v4g0Vq3kzGKO2iC0VoZi/aSacosNxkySVgUrjTJvocEGUoLRzwS65AeELdbInxQ==","shasum":"79c5af96d9c1b5a00ced2c8e890660742e05f7c6","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.10-alpha-128f9be.tgz","fileCount":197,"unpackedSize":7080666,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACtP8/Pn9woegIFAo3lgFwzmnoQkS3S7GWCXM3EdCnCAiATSDh9D8H4Gg1WNcZ/LZetFueJZJAVKQ4tUjr3CvWEAw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOVgRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq79w/9E/RsQzR66p0lSxPyLuEXyolJxJSqvPEOzFMXy6aTZZlXw6P8\r\na2lo/civD0LoMFD8WUS4abPjpqrHA++jl+FG71ZTB0ae0mkQfDNLCMmKM+TK\r\n4ACrcEe/u9T1n4RM1gcrf9t9/SjIKXLmxSgmR9RG4c57t4MXCetYwG4rz0I0\r\n6FZ3vD6UOlF122wku6xp/kFRuU4mcKGi78qY4zrY1FcaVoxY+znaH4x/1ZB3\r\n+OD27dSSotX/YhaHJXxv6oK+KQq3qs6zHbJ/fBgxtYmJjzcFlyNLZaIGbCdU\r\nYCtsuvhWsXhNK5PDRZ3BJ//HsDtrvczEiUfkO+/PcpCvNEgJ8D8gCjmkm6Ex\r\nSytlr4mvFdx/bGCX56PlSqDQKhBicWXzHnsJir9OHe3s71dhOHLExSj3Akpb\r\nxTGAllNf0XMHrELKbw5Ni/8W4xKT3FgwYPiM+YjEDHOgVaO70XFws/bbV9Lt\r\nkXW9Xh47tUftZAOuudHVb0AI17Pl3tMGFu1aXpg1MhCy8qYrqa1fRVQHxWRE\r\nIiwwX2XTkBdBUJsQCB4KVgnwLBHLDVBw0wqx0cRisuJzW8nGdr6VsjBEHIro\r\nTDeuRZdwkcVYzxewvBJxTjNQB/+DOOsqmOQo43xLD3l8Amzz6W+5MUn40CHW\r\n1tn4Z+mgsk2DB1Kt6U09kVdBaXCav/ng09Y=\r\n=/OPN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.10-alpha-128f9be_1681479697248_0.7911553911865252"},"_hasShrinkwrap":false},"1.1.10":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.10","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.4","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","gitHead":"128f9be4eaaad8c72f6d5e6f50c1f7827325629c","_id":"symbol-bootstrap@1.1.10","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-Db7pDjmbE712LeyhbwtwG0uGZdjPUcEedYgG/httdH7rVkKcxTvOeXxuB9nEu2uWHPrB4pPAmDlGeWwzO8+Rjg==","shasum":"59e9efffa22f8073a504667d4508a1f30ab52985","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.10.tgz","fileCount":197,"unpackedSize":7080624,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCs3x8o9ghcATv6yWuE7vcj3qbb0st5JhKEGws/zkvwPwIhAM7snKgFnyKWM6lch1+jgl3kLHQpTRm34ZISO1VqmbTy"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOV9+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqA4g/+JjM7ZmX4gZwcVByC6NqlAJQrKvmGlR93S+KXNDeJ7y5Emg9T\r\nFLKixO371PiEG+L5NLe6w8F4APXr23MsIvjFoHbBqpBtP3VZ3oh8hEvF91FD\r\ndjXN83qnkUkNahLYOwBQf9F6IZtlojzhTH9+dQUOsbFnrwewvW/+lMlcP/fV\r\nJ6WO0uc/DbDCxOThEBs7rcEs3gmmWTcUkw6s0yCpcJC9sVpQtdQyHl7zJQQ8\r\njrNnKpOw4DXxyJ5ZGg90zpKXBnnfkAZXwMe6PqckUaseCU8fXb1hkc6ZBud3\r\nrBctdCFWw7OTo0c+tE/hT6QXiauc47yGEum+hY/Zfg5tsrJ8IdPgQB9TFxGu\r\nNWikXpPD5/sgb3OuRE7kGqylb9avwN7DhBszUbHkjajJnl0UjWplMB6GwB0w\r\n68BvE9a7wyFAzy6eCJoTppxqB+gQihfUAMang1jJdnuOXtiW58TaF8Adae+e\r\nWqR9tQWSoSsHt22vknBsZ1zpkVvq55QKR7gW/uM342qXsIcIBLEYLSePdVuH\r\n2W6RvpNy9TnTrCpkrk5tKrNRL6LIdt5rTzIK4a3mlaVT+MYgOFXkhdgdkmQQ\r\nmPUVSww3dXvhlPz0kptRXRb+G0WpceJ0wyDEAvglyEAeO3jLfJF/QFsfvy5R\r\nvOmXX2aNhJVeR5CTNUhqeAjdujq9KP9FgrI=\r\n=K2HG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.10_1681481598478_0.12658446457146666"},"_hasShrinkwrap":false},"1.1.10-alpha-b1d907f":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.10-alpha-b1d907f","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.4","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.10 linux-x64 node-v14.21.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"b1d907f76928285156454290a60338194d740afa","_id":"symbol-bootstrap@1.1.10-alpha-b1d907f","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-IFGH0sb7fTvznhIL4NKNP4dAqtj+o1Olx0MfTa68YzMCiWryiJk98Z7WgVW80lVHZo+gAqqgVLZrIxkH+cZB+Q==","shasum":"d676e6f2daf7b0b18e08fee2ebac73530c86be0f","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.10-alpha-b1d907f.tgz","fileCount":197,"unpackedSize":7081424,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZnzNSaVVvPv17jEV+DC6GDW0Cxp41ywRIFWYBbuekIAiAqcqWp3qBFdmZq9b29qMZYH8azvH4tORo/XFywkiygVA=="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.10-alpha-b1d907f_1684788304475_0.30475860430214663"},"_hasShrinkwrap":false},"1.1.10-alpha-506ac79":{"name":"symbol-bootstrap","description":"Symbol tool that allows you creating, configuring and running Symbol's networks","version":"1.1.10-alpha-506ac79","author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bin":{"symbol-bootstrap":"bin/run"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"dependencies":{"@noble/ed25519":"^1.5.3","@oclif/command":"^1.8.16","@oclif/config":"^1.18.3","@oclif/plugin-autocomplete":"^1.2.0","@oclif/plugin-help":"^5.1.11","archiver":"^5.3.0","cross-fetch":"^3.1.5","figlet":"^1.5.2","handlebars":"^4.7.7","inquirer":"^8.2.0","js-yaml":"^4.1.0","lodash":"^4.17.21","memorystream":"^0.3.1","node-stream-zip":"^1.15.0","rxjs":"^7.5.2","semver":"^7.3.5","shx":"^0.3.4","symbol-sdk":"^2.0.4","symbol-statistics-service-typescript-fetch-client":"^1.1.5","tslib":"^2.3.1","utf8":"^3.0.0","winston":"^3.5.1"},"devDependencies":{"@oclif/dev-cli":"^1.26.10","@oclif/test":"^1.2.8","@types/archiver":"^5.3.1","@types/chai":"^4.3.0","@types/figlet":"^1.5.4","@types/handlebars":"^4.1.0","@types/inquirer":"^8.2.0","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.178","@types/memorystream":"^0.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.14","@types/semver":"^7.3.9","@types/sinon":"^10.0.9","@types/winston":"^2.4.4","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","chai":"^4.3.6","coveralls":"^3.1.1","create-ts-index":"^1.14.0","dir-compare":"^4.0.0","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","globby":"^10.0.2","marked":">=4.0.12","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","mock-stdin":"^1.0.0","nock":"^13.2.2","nyc":"^15.1.0","prettier":"^2.5.1","prettier-plugin-organize-imports":"^2.3.4","sinon":"^13.0.1","ts-node":"^10.4.0","typedoc":"^0.22.11","typescript":"^4.5.5"},"engines":{"node":">=14.0.0"},"homepage":"https://github.com/fboucquez/symbol-bootstrap","keywords":["oclif"],"license":"Apache-2.0","main":"lib/index.js","oclif":{"commands":"./lib/commands","bin":"symbol-bootstrap","plugins":["@oclif/plugin-autocomplete","@oclif/plugin-help"]},"repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"},"scripts":{"doc":"typedoc --out \"ts-docs\" src && touch ./ts-docs/.nojekyll","lint":"eslint --cache src/ test/ --ext .ts","clean":"npx shx rm -rf ./lib","lint:fix":"eslint src/ test/ --ext .ts --fix","prettier":"prettier --write ./src ./test","style:fix":"npm run create-index-files && npm run prettier && npm run lint:fix && npm run oclif-doc","create-index-files":"cti create ./src -b -n -e commands","postpack":"npx shx rm -f oclif.manifest.json","posttest":"eslint src/ test/ --ext .ts","oclif-doc":"oclif-dev manifest && oclif-dev readme --multi","oclif-debug":"env DEBUG=* oclif-dev manifest","watch":"tsc -b -w","compile":"tsc -b","build":"npm run clean && npm run compile","prepack":"npm run build && npm run oclif-doc","test":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.test.ts\"","e2e":"nyc --reporter=lcov --extension .ts mocha -r ts-node/register --timeout 900000 --forbid-only \"test/**/*.e2e.ts\"","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","install-cli":"npm pack && npm i -g","clean-network":"symbol-bootstrap clean -t target/bootstrap-test","start-network":"symbol-bootstrap start -t target/bootstrap-test -u 'current'"},"types":"lib/index.d.ts","readme":"# symbol-bootstrap\n\nSymbol CLI tool that allows you creating, configuring and running [Symbol](https://docs.symbolplatform.com/) blockchain complete networks or nodes to be sync with existing networks.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![Downloads/week](https://img.shields.io/npm/dw/symbol-bootstrap.svg)](https://npmjs.org/package/symbol-bootstrap)\n[![License](https://img.shields.io/npm/l/symbol-bootstrap.svg)](https://github.com/fboucquez/symbol-bootstrap/blob/master/package.json)\n[![Build](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml/badge.svg)](https://github.com/fboucquez/symbol-bootstrap/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fboucquez/symbol-bootstrap/badge.svg?branch=dev)](https://coveralls.io/github/fboucquez/symbol-bootstrap?branch=dev)\n[![Api Doc](https://img.shields.io/badge/api-doc-blue.svg)](https://fboucquez.github.io/symbol-bootstrap/)\n\n<!-- toc -->\n* [symbol-bootstrap](#symbol-bootstrap)\n* [Key features:](#key-features)\n* [Concepts](#concepts)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Wizard](#wizard)\n* [Development](#development)\n* [Support](#support)\n* [Command Topics](#command-topics)\n<!-- tocstop -->\n\n# Key features:\n\n-   It's an installable cli tool. It's not a repo you need to clone and compile.\n-   It provides a one liner command for testnet/mainnet node creation and upgrades.\n-   It provides a one liner command for local test network creation and upgrades.\n-   It includes a wizard for easy node and accounts creation.\n-   It includes a comprehensive list of commands for node administration.\n-   The configuration is parametrized via CLI commands and presets instead of by changing properties files.\n-   The tools code is unique for any type of network, new networks or nodes in a network. It doesn't need to be copied and pasted in different projects or assemblies.\n-   The config command runs on the host machine, not via docker making it easier to debug or tune\n-   It uses the TS SDK for key generation, vrf transactions, voting files, and address generation instead of using catapult-tools (nemgen is still used to generate the nemesis block).\n-   Easier to maintain, the properties files are reused for all nodes, assemblies and network types.\n-   Network setup (how many database, nodes, rest gateways to run) is defined in presets, users can provide their own ones.\n-   Docker-compose yaml files are generated based on the network setup/preset instead of being manually created/upgraded.\n-   The created network (config, nemesis and docker-compose) can be zipped and distributed for other host machines to run it.\n-   The used docker images versions can be changed via configuration/preset.\n-   It uses the [oclif](https://oclif.io) framework. New commands are easy to add and document.\n-   It can be used for [e2e testing](docs/e2eTesting.md).\n-   It works on Linux, Mac and Windows x86-64 arch.\n\n# Concepts\n\n## Preset:\n\nYaml files that define the configuration and layout of the network and nodes. It defines how many nodes, database, rest gateways, the modes, keys, etc.\n\nPresets are defined at 4 levels from general to specific:\n\n-   Shared: Default configurations for all the networks.\n-   Network: It defines the configuration of a given network.\n-   Assembly: It defines a modification of a network selecting the services that the node will run.\n-   Custom: A user provided yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nProperties in each file override the previous values (by object deep merge).\n\n### Network Presets:\n\n-   [`mainnet`](presets/mainnet/network.yml): Used to create nodes connected to Symbol's Mainnet network. The [nemesis block](presets/mainnet/seed/00000) is copied over.\n-   [`testnet`](presets/testnet/network.yml): Used to create nodes connected to Symbol's Testnet network. The [nemesis block](presets/testnet/seed/00000) is copied over.\n-   [`bootstrap`](presets/bootstrap/network.yml): Used to create new private networks with dual currency configuration, network and harvest currencies. Nemesis block is generated.\n\n### Assemblies:\n\n-   [`peer`](presets/assemblies/assembly-peer.yml): A standard peer-only node that contains 1 peer node.\n-   [`api`](presets/assemblies/assembly-api.yml): A standard API node that contains 1 Mongo database, 1 API node, 1 REST gateway, and 1 broker.\n-   [`dual`](presets/assemblies/assembly-dual.yml): A standard dual node that contains 1 Mongo database, 1 API node, 1 REST gateway, 1 broker, and 1 peer node.\n-   [`demo`](presets/assemblies/assembly-demo.yml): A dual node with an additional explorer and faucet for test and demonstration purposes.\n-   [`multinode`](presets/assemblies/assembly-multinode.yml): A special assembly that contains 1 API node and 2 peer-only nodes. This assembly is for testing, it showcases how a private network with 3 nodes runs.\n-   [`services`](presets/assemblies/assembly-services.yml): A special docker compose that includes the Explorer, Faucet and HTTPS proxy. This is an easy and quick way of running Symbol services when creating a new network. Note that the services are not HA, it's not for production environments. \n\n### Custom preset:\n\nIt's the way you can tune the network without modifying the code. It's a yml file (`--customPreset` param) that could override some or all properties in the out-of-the-box presets.\n\nCustom presets give Symbol Bootstrap its versatility. Check out the custom preset [guides](docs/presetGuides.md)!\n\n## Target:\n\nThe folder where the generated config, docker files and data are stored.\n\nThe folder structure is:\n\n-   `./preset.yml`: The final generated preset.yml that it's used to configure bootstrap, the nodes, docker, etc.\n-   `./addresses.yml`: Randomly generated data that wasn't provided in the preset. e.g.: SSL keys, nodes' keys, nemesis accounts, generation hash seed, etc.\n-   `./nodes`: It holds the configuration, data and logs for all the defined node instances.\n-   `./gateways`: It holds the configuration and logs for all the defined node rest gateways.\n-   `./nemesis`: The folder used to hold the nemesis block. Block 1 data is generated via `nemgen` tool for new networks. For existing network, it is copied over.\n-   `./databases`: The location where the mongo data is stored for the different database instances.\n-   `./docker`: The generated docker-compose.yml, mongo init scripts and server basic bash scripts.\n-   `./explorers`: The generated explorer configuration.\n-   `./reports`: The location of the generated reports.\n\nNote: **The target folder should not be manually modified**. This tool may override any file in the target folder when doing upgrades. Any custom configuration should be provided via a custom preset. Check out the custom preset [guides](docs/presetGuides.md)!\n\n# Requirements\n\n-   Node 12.0.0+\n-   Docker 18.3.0+\n-   Docker Compose 1.25.0+\n\nCheck your user can run docker without sudo:\n\n```shell\ndocker run hello-world\n```\n\nIf you see an error like:\n\n```\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock\n```\n\nPlease follow this [guide](https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket).\n\n# Installation\n\nIt's recommended to run the commands from en empty working dir.\n\nThe network configuration, data and docker files will be created inside the target folder ('./target') by default.\n\n```shell\nmkdir my-networks\ncd my-networks\n```\n\nOnce in the working dir:\n\n<!-- usage -->\n```sh-session\n$ npm install -g symbol-bootstrap\n$ symbol-bootstrap COMMAND\nrunning command...\n$ symbol-bootstrap (-v|--version|version)\nsymbol-bootstrap/1.1.10 linux-x64 node-v14.21.3\n$ symbol-bootstrap --help [COMMAND]\nUSAGE\n  $ symbol-bootstrap COMMAND\n...\n```\n<!-- usagestop -->\n\nValidate your environment by running:\n\n```shell\nsymbol-bootstrap verify\n```\n\nThe general usage would be:\n\n```shell\nsymbol-bootstrap config -p testnet -a dual\nsymbol-bootstrap compose\nsymbol-bootstrap run\n```\n\nYou can aggregate all these commands with this one liner:\n\n```shell\nsymbol-bootstrap start -p testnet -a dual\n```\n\nIf you need to start fresh, you many need to sudo remove the target folder (docker volumes dirs may be created using sudo). Example:\n\n```shell\nsudo rm -rf ./target\n```\n\n## Examples\n\nNetwork presets and assemblies can be combined to generate different types of nodes. Some examples:\n\n-   `$ symbol-bootstrap start -p mainnet -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a peer -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a multinode -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a demo -c customPreset.yml`\n-   `$ symbol-bootstrap start -p bootstrap -a dual -c customPreset.yml`\n-   `$ symbol-bootstrap start -p testnet -a services -c customServicesPreset.yml`\n\nAlthough some combinations can be done, they may not be really useful. Examples that are NOT useful:\n\n-   `$ symbol-bootstrap start -p mainnet -a multinode`\n-   `$ symbol-bootstrap start -p testnet -a multinode`\n\nA custom network preset file can also be provided. This is useful when you have your own custom Symbol network, and you want other nodes to join.\nFor this case, you provide your own `networkPreset.yml` and nemesis feed folder. The node admin can then run:\n\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a dual -c customNodePreset.yml`\n- `$ symbol-bootstrap start -p customNetworkPreset.yml -a services -c customServicesPreset.yml`\n\nThe `demo` assemblies starts a local Explorer http://localhost:90 and Faucet http://localhost:100.\n\n# Wizard\n\nIf this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:\n\n```shell\nsymbol-bootstrap wizard\n```\n\n# Development\n\nIf you want to contribute to this tool, clone this repo and run:\n\n```shell\nnpm install -g\n```\n\nThen, `symbol-bootstrap` runs from the source code. You can now try your features after changing the code.\n\nPull Requests are appreciated! Please follow the contributing [guidelines](CONTRIBUTING.md).\n\nNote: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.\nGeneral users should install this tool like any other node module.\n\n## Code style\n\nTo format the source code, verify/fix lint issues, and generate the commands docs, run:\n\n```shell\nnpm run style:fix\n```\n\n# Support\n\nSymbol Bootstrap is a personal project maintained on my free time.\n\nIf you like it, please consider supporting it by delegating your Symbol account to my [node](http://symbol-node-dual-1.tawa.solutions:3000/node/info):\n\n```\nname: symbol-node-dual-1.tawa.solutions\npublicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB\n```\n\nIf you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!\n\n<!-- commands -->\n# Command Topics\n\n* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions\n* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data\n* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.\n* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network\n* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.\n* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.\n* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap\n* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.\n* [`symbol-bootstrap modifyMultisig`](docs/modifyMultisig.md) - Create or modify a multisig account\n* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.\n* [`symbol-bootstrap renewCertificates`](docs/renewCertificates.md) - It renews the SSL certificates of the node regenerating the node.csr.pem files but reusing the current private keys.\n* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.\n* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.\n* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.\n* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!\n* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.\n* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.\n* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.\n* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!\n\n<!-- commandsstop -->\n","readmeFilename":"README.md","gitHead":"506ac79fb38d14a8c6d24e96fd359336fd0880f1","_id":"symbol-bootstrap@1.1.10-alpha-506ac79","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-uF/ftUQpReWSrOUbPwY/aPliHU/jKTvcEzg+ioZdqImdnu42BOjVRwKRqpSGbC6FK+qKaZtuSbtZpSx8XtDXjg==","shasum":"7195b2cf2e984f3126fe703155b4c560fa25f77e","tarball":"https://registry.npmjs.org/symbol-bootstrap/-/symbol-bootstrap-1.1.10-alpha-506ac79.tgz","fileCount":197,"unpackedSize":7081557,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7HC2sQoNfWGN87AQEmi0+WrJULfzq1Ym0+LjZl6CkGAiEA0+RtoXEmMdznPa5Da4vgQoveXE+7GuVCq6AoxbBormI="}]},"_npmUser":{"name":"fboucquez","email":"fboucquez@gmail.com"},"directories":{},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-bootstrap_1.1.10-alpha-506ac79_1684791715000_0.5746939134771565"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-13T13:17:16.092Z","0.0.0-alpha-202008131017":"2020-08-13T13:17:16.262Z","modified":"2023-05-22T21:41:55.522Z","0.0.0-alpha-202008131017-alpha-202008131027":"2020-08-13T13:27:19.728Z","0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029":"2020-08-13T13:29:21.137Z","0.0.0-alpha-202008131017-alpha-202008131027-alpha-202008131029-alpha-202008131035":"2020-08-13T13:35:08.073Z","0.0.0-alpha-202008131036":"2020-08-13T13:36:52.090Z","0.0.0-alpha-202008131543":"2020-08-13T15:43:18.066Z","0.0.0-alpha-202008131558":"2020-08-13T15:58:33.331Z","0.0.0-alpha-202008131259":"2020-08-13T15:59:47.623Z","0.0.0-alpha-202008132037":"2020-08-13T20:37:16.829Z","0.0.0-alpha-202008132116":"2020-08-13T21:16:39.453Z","0.0.0-alpha-202008140237":"2020-08-14T02:37:43.688Z","0.0.0-alpha-202008140238":"2020-08-14T02:39:08.342Z","0.0.0-alpha-202008140245":"2020-08-14T02:45:27.484Z","0.0.0-alpha-202008140307":"2020-08-14T03:07:47.932Z","0.0.0-alpha-202008140323":"2020-08-14T03:23:27.251Z","0.0.0-alpha-202008141133":"2020-08-14T11:33:28.950Z","0.0.0-alpha-202008141534":"2020-08-14T15:34:49.204Z","0.0.0-alpha-202008151207":"2020-08-15T12:07:34.578Z","0.0.0-alpha-202008151326":"2020-08-15T13:26:50.183Z","0.0.0-alpha-202008171219":"2020-08-17T12:19:49.587Z","0.0.0-alpha-202008171232":"2020-08-17T12:32:18.969Z","0.0.0-alpha-202008171321":"2020-08-17T13:21:39.017Z","0.0.0-alpha-202008171324":"2020-08-17T13:24:41.830Z","0.0.0-alpha-202008171336":"2020-08-17T13:36:16.604Z","0.0.0-alpha-202008171341":"2020-08-17T13:41:37.247Z","0.0.0-alpha-202008171411":"2020-08-17T14:11:23.167Z","0.0.0-alpha-202008181632":"2020-08-18T16:32:48.978Z","0.0.0-alpha-202008181637":"2020-08-18T16:37:22.523Z","0.0.0-alpha-202008181704":"2020-08-18T17:05:06.418Z","0.0.0-alpha-202008181810":"2020-08-18T18:10:28.158Z","0.0.0-alpha-202008181821":"2020-08-18T18:21:56.826Z","0.0.0-alpha-202008181936":"2020-08-18T19:36:56.143Z","0.0.0-alpha-202008182200":"2020-08-18T22:00:28.757Z","0.0.0-alpha-202008210123":"2020-08-21T04:23:49.770Z","0.0.0-alpha-202008211211":"2020-08-21T12:11:56.123Z","0.0.0-alpha-202008211054":"2020-08-21T13:54:39.982Z","0.0.0-alpha-202008211310":"2020-08-21T16:10:52.663Z","0.0.0-alpha-202008211310-alpha-202008211617":"2020-08-21T16:17:24.240Z","0.0.0-alpha-202008232334":"2020-08-23T23:34:58.771Z","0.0.0-alpha-202008240134":"2020-08-24T01:35:06.376Z","0.0.0-alpha-202008261328":"2020-08-26T13:28:27.976Z","0.0.0-alpha-202009021335":"2020-09-02T13:35:19.727Z","0.0.0-alpha-202009031500":"2020-09-03T15:01:06.510Z","0.0.0-alpha-202009041308":"2020-09-04T13:08:39.171Z","0.0.0-alpha-202009050410":"2020-09-05T04:10:58.989Z","0.0.0-alpha-202009151319":"2020-09-15T13:19:24.379Z","0.0.0-alpha-202009151323":"2020-09-15T13:23:35.078Z","0.0.0-alpha-202009151413":"2020-09-15T14:13:51.252Z","0.0.0":"2020-09-15T14:20:26.102Z","0.0.1-alpha-202009151500":"2020-09-15T15:00:53.115Z","0.0.1-alpha-202009181300":"2020-09-18T13:00:22.450Z","0.0.1-alpha-202009212030":"2020-09-21T20:31:05.222Z","0.0.1-alpha-202009221339":"2020-09-22T13:39:20.714Z","0.0.1-alpha-202009231743":"2020-09-23T17:43:32.585Z","0.1.0-alpha-202009261201":"2020-09-26T12:02:07.722Z","0.1.1-alpha-202009261425":"2020-09-26T14:26:02.132Z","0.1.0":"2020-09-26T14:28:57.020Z","0.1.1-alpha-202009291948":"2020-09-29T19:49:07.863Z","0.1.1-alpha-202010011447":"2020-10-01T14:47:56.073Z","0.1.1-alpha-202010021638":"2020-10-02T16:38:30.866Z","0.1.1-alpha-202010030939":"2020-10-03T09:39:23.956Z","0.1.1":"2020-10-03T09:43:15.726Z","0.1.2-alpha-202010030946":"2020-10-03T09:46:51.830Z","0.1.2-alpha-202010071355":"2020-10-07T13:56:04.795Z","0.1.2-alpha-202010121605":"2020-10-12T16:05:47.649Z","0.1.2-alpha-202010121756":"2020-10-12T17:56:26.711Z","0.1.2-alpha-202010210210":"2020-10-21T02:10:41.438Z","0.1.2-alpha-202010210221":"2020-10-21T02:21:16.205Z","0.1.2":"2020-10-21T02:29:33.284Z","0.1.3-alpha-202010210235":"2020-10-21T02:35:28.969Z","0.2.0-alpha-202010211158":"2020-10-21T11:58:39.506Z","0.2.0":"2020-10-21T12:06:38.067Z","0.2.1-alpha-202010211212":"2020-10-21T12:12:19.483Z","0.2.1-alpha-202010221020":"2020-10-22T10:20:18.397Z","0.2.1-alpha-202010281951":"2020-10-28T19:51:54.976Z","0.2.1-alpha-202010301106":"2020-10-30T11:06:34.323Z","0.2.1":"2020-10-30T11:54:11.449Z","0.2.2-alpha-202010311031":"2020-10-31T10:31:38.630Z","0.2.2-alpha-202011111002":"2020-11-11T10:03:12.958Z","0.2.2-alpha-202011112255":"2020-11-11T22:55:43.284Z","0.2.2-alpha-202011191238":"2020-11-19T12:38:51.498Z","0.2.2-alpha-202011191320":"2020-11-19T16:21:07.207Z","0.3.0-alpha-202011191321":"2020-11-19T16:22:00.732Z","0.3.0-alpha-202011220136":"2020-11-22T04:36:20.664Z","0.3.0-alpha-202011271334":"2020-11-27T13:34:26.554Z","0.3.0-alpha-202011301515":"2020-11-30T15:15:37.788Z","0.3.0-alpha-202012011317":"2020-12-01T13:18:00.639Z","0.3.0-alpha-202012031159":"2020-12-03T11:59:24.563Z","0.3.0-alpha-202012041002":"2020-12-04T10:02:34.244Z","0.3.0-alpha-202012071518":"2020-12-07T15:18:53.189Z","0.3.0-alpha-202012080011":"2020-12-08T00:12:12.686Z","0.3.0-alpha-202012081631":"2020-12-08T16:31:26.784Z","0.2.2-alpha-202012100849":"2020-12-10T11:49:40.771Z","0.2.2-alpha-202012100902":"2020-12-10T12:02:24.656Z","0.3.0-alpha-202012121041":"2020-12-12T10:42:12.755Z","0.3.0-alpha-202012150002":"2020-12-15T00:02:46.452Z","0.3.0":"2020-12-15T00:12:43.324Z","0.3.1-alpha-202012161313":"2020-12-16T13:13:34.563Z","0.3.1-alpha-202012161609":"2020-12-16T16:09:58.175Z","0.3.1-alpha-202012161729":"2020-12-16T17:30:06.986Z","0.3.1":"2020-12-17T11:38:38.191Z","0.3.2-alpha-202012291946":"2020-12-29T19:47:00.601Z","0.3.2-alpha-202012300211":"2020-12-30T02:11:27.961Z","0.3.2-alpha-202101052048":"2021-01-05T20:48:52.498Z","0.3.2-alpha-202101062332":"2021-01-06T23:32:54.922Z","0.3.2-alpha-202101111534":"2021-01-11T18:34:46.816Z","0.3.2-alpha-202101111534-alpha-202101111918":"2021-01-11T22:18:37.339Z","0.3.2-alpha-202101111534-alpha-202101111918-alpha-202101111929":"2021-01-11T22:29:25.648Z","0.3.2-alpha-202101131116":"2021-01-13T11:16:57.008Z","0.3.2-alpha-202101141810":"2021-01-14T18:10:53.424Z","0.3.2-alpha-202101142226":"2021-01-14T22:26:40.080Z","0.3.2-alpha-202101142258":"2021-01-14T22:58:21.163Z","0.4.0":"2021-01-15T00:13:22.201Z","0.4.1-alpha-202101151722":"2021-01-15T17:22:22.315Z","0.4.1-alpha-202101181657":"2021-01-18T16:58:08.672Z","0.4.1-alpha-202101181823":"2021-01-18T18:24:09.607Z","0.4.1-alpha-202101191800":"2021-01-19T18:01:10.509Z","0.4.1-alpha-202101191829":"2021-01-19T18:30:06.519Z","0.4.1":"2021-01-19T18:37:35.328Z","0.4.1-alpha-202101271058":"2021-01-27T10:58:53.524Z","0.4.2-alpha-202101271107":"2021-01-27T11:08:13.551Z","0.4.2-alpha-202102012126":"2021-02-01T21:27:13.859Z","0.4.2-alpha-202102021752":"2021-02-02T17:52:44.796Z","0.4.2-alpha-202102022221":"2021-02-02T22:21:20.679Z","0.4.2":"2021-02-02T22:32:32.152Z","0.4.3-alpha-202102031204":"2021-02-03T12:04:40.363Z","0.4.3-alpha-202102041912":"2021-02-04T19:12:37.296Z","0.4.3-alpha-202102091345":"2021-02-09T13:45:18.929Z","0.4.3-alpha-202102101009":"2021-02-10T10:09:46.871Z","0.4.3-alpha-202102101040":"2021-02-10T10:40:32.073Z","0.4.3-alpha-202102151844":"2021-02-15T18:44:28.276Z","0.4.3-alpha-202102151900":"2021-02-15T19:01:05.734Z","0.4.3":"2021-02-15T22:19:09.414Z","0.4.4-alpha-202102152233":"2021-02-15T22:33:38.398Z","0.4.4-alpha-202102172017":"2021-02-17T20:17:44.618Z","0.4.4-alpha-202102201802":"2021-02-20T18:02:45.356Z","0.4.4-alpha-202102221748":"2021-02-22T17:48:17.975Z","0.4.4-alpha-202102231606":"2021-02-23T16:06:24.378Z","0.4.4":"2021-02-24T16:39:43.379Z","0.4.5-alpha-202102251414":"2021-02-25T14:14:39.085Z","0.4.5-alpha-202102251531":"2021-02-25T15:31:38.855Z","0.4.5-alpha-202103011623":"2021-03-01T16:24:08.169Z","0.4.5-alpha-202103022034":"2021-03-02T20:34:37.768Z","0.4.5-alpha-202103042220":"2021-03-04T22:20:36.019Z","0.4.5-alpha-202103050905":"2021-03-05T12:05:54.667Z","0.4.5-alpha-202103051910":"2021-03-05T19:10:44.341Z","0.4.5":"2021-03-05T19:26:41.203Z","0.4.6-alpha-202103051946":"2021-03-05T19:47:04.141Z","0.4.6-alpha-202103071201":"2021-03-07T15:01:21.264Z","0.4.6-alpha-202103100016":"2021-03-10T03:17:09.667Z","0.4.6-alpha-202103121159":"2021-03-12T14:59:49.126Z","0.4.6-alpha-202103130943":"2021-03-13T09:43:25.774Z","0.4.6-alpha-202103131047":"2021-03-13T13:47:48.775Z","0.4.6-alpha-202103132103":"2021-03-13T21:04:12.776Z","0.4.6-alpha-202103131900":"2021-03-13T22:00:28.805Z","0.4.6-alpha-202103131907":"2021-03-13T22:07:52.939Z","0.4.6-alpha-202103140740":"2021-03-14T10:40:15.849Z","0.4.6-alpha-202103140853":"2021-03-14T11:53:40.639Z","0.4.6-alpha-202103141843":"2021-03-14T21:43:27.552Z","0.4.6-alpha-202103141942":"2021-03-14T22:43:03.048Z","0.4.6-alpha-202103151535":"2021-03-15T18:35:16.063Z","0.4.6-alpha-202103152154":"2021-03-15T21:55:11.079Z","0.4.6-alpha-202103151907":"2021-03-15T22:07:57.795Z","0.4.6-alpha-202103152307":"2021-03-15T23:07:33.143Z","0.4.6-alpha-202103152058":"2021-03-15T23:58:37.122Z","0.4.6-alpha-202103160913":"2021-03-16T09:13:20.875Z","0.4.6-alpha-202103160910":"2021-03-16T12:10:25.966Z","0.4.6-alpha-202103160915":"2021-03-16T12:15:58.902Z","0.4.6-alpha-202103161208":"2021-03-16T15:09:02.627Z","0.4.6-alpha-202103161556":"2021-03-16T18:56:47.904Z","0.4.6-alpha-202103162257":"2021-03-17T01:57:22.775Z","1.0.0":"2021-03-17T03:33:24.417Z","1.0.1-alpha-202103170347":"2021-03-17T03:48:00.939Z","1.0.1-alpha-202103170349":"2021-03-17T03:50:13.148Z","1.0.1-alpha-202103181822":"2021-03-18T18:23:13.922Z","1.0.1-alpha-202103181847":"2021-03-18T18:47:19.686Z","1.0.1-alpha-202103191250":"2021-03-19T12:50:22.899Z","1.0.1-alpha-202103191559":"2021-03-19T15:59:18.384Z","1.0.1-alpha-202103221930":"2021-03-22T19:31:15.926Z","1.0.1":"2021-03-22T20:20:11.147Z","1.0.2-alpha-202103231229":"2021-03-23T12:29:46.892Z","1.0.2-alpha-202103231652":"2021-03-23T16:52:27.234Z","1.0.2-alpha-202103231654":"2021-03-23T16:55:03.699Z","1.0.2-alpha-202103241031":"2021-03-24T10:31:29.530Z","1.0.2-alpha-202103241513":"2021-03-24T15:13:43.446Z","1.0.2":"2021-03-24T17:22:48.369Z","1.0.3-alpha-202103251158":"2021-03-25T11:58:35.664Z","1.0.3-alpha-202103250907":"2021-03-25T12:07:20.176Z","1.0.3-alpha-202103250912":"2021-03-25T12:13:10.470Z","1.0.3-alpha-202103250914":"2021-03-25T12:14:29.142Z","1.0.3-alpha-202103251555":"2021-03-25T18:56:03.148Z","1.0.3-alpha-202103301247":"2021-03-30T12:48:04.134Z","1.0.3-alpha-202103302021":"2021-03-30T23:22:14.199Z","1.0.3-alpha-202103302026":"2021-03-30T23:26:35.701Z","1.0.3-alpha-202103302308":"2021-03-31T02:08:28.747Z","1.0.3-alpha-202103311610":"2021-03-31T16:10:22.142Z","1.0.3":"2021-03-31T16:25:10.480Z","1.0.4-alpha-202103311647":"2021-03-31T16:47:30.711Z","1.0.4-alpha-202103311656":"2021-03-31T16:56:22.411Z","1.0.4-alpha-202104011050":"2021-04-01T10:50:35.990Z","1.0.4-alpha-202104011142":"2021-04-01T11:42:41.890Z","1.0.4-alpha-202104012235":"2021-04-01T22:35:33.673Z","1.0.4-alpha-202104051224":"2021-04-05T12:24:22.395Z","1.0.4-alpha-202104091216":"2021-04-09T12:16:49.771Z","1.0.4-alpha-202104091259":"2021-04-09T12:59:18.195Z","1.0.4":"2021-04-13T14:16:26.723Z","1.0.5-alpha-202104151744":"2021-04-15T17:44:22.781Z","1.0.5-alpha-202104211441":"2021-04-21T14:41:40.516Z","1.0.5-alpha-202104281210":"2021-04-28T12:10:34.244Z","1.0.5-alpha-202104281402":"2021-04-28T14:03:08.432Z","1.0.5":"2021-05-03T10:58:40.816Z","1.0.6-alpha-202105031127":"2021-05-03T11:27:45.131Z","1.0.6-alpha-202105071101":"2021-05-07T11:01:19.459Z","1.0.6-alpha-202105101510":"2021-05-10T18:10:28.017Z","1.0.6-alpha-202105111025":"2021-05-11T10:26:14.477Z","1.0.6-alpha-202105110740":"2021-05-11T10:40:57.473Z","1.0.6-alpha-202105111006":"2021-05-11T13:07:07.113Z","1.0.6-alpha-202105111111":"2021-05-11T14:12:19.981Z","1.0.6-alpha-202105122247":"2021-05-13T01:48:00.103Z","1.0.6-alpha-202105142121":"2021-05-15T00:21:36.054Z","1.0.6-alpha-202105191807":"2021-05-19T21:07:50.959Z","1.0.6-alpha-202105192112":"2021-05-19T21:12:47.392Z","1.0.6-alpha-202105211202":"2021-05-21T12:03:11.502Z","1.0.6-alpha-202105241020":"2021-05-24T10:21:03.978Z","1.0.6-alpha-202105261920":"2021-05-26T19:21:13.764Z","1.0.6-alpha-202105262144":"2021-05-26T21:44:24.771Z","1.0.6-alpha-202105270150":"2021-05-27T01:50:22.025Z","1.0.6-alpha-202105262326":"2021-05-27T02:26:37.300Z","1.0.6-alpha-202105271952":"2021-05-27T19:52:57.775Z","1.0.6-alpha-202105280712":"2021-05-28T10:13:03.174Z","1.0.6":"2021-06-08T14:06:13.514Z","1.0.7-alpha-202106081422":"2021-06-08T14:23:01.895Z","1.0.7-alpha-202106081450":"2021-06-08T14:50:52.141Z","1.0.7-alpha-202106081515":"2021-06-08T18:15:40.168Z","1.0.7-alpha-202106161736":"2021-06-16T17:37:08.456Z","1.0.7":"2021-06-22T16:32:20.776Z","1.0.8-alpha-202106222133":"2021-06-22T21:34:08.446Z","1.1.0-alpha.0":"2021-07-08T15:28:24.329Z","1.0.8-alpha-202107131135":"2021-07-13T14:35:31.081Z","1.1.0-multimodule.176":"2021-07-14T14:02:00.602Z","1.1.0-alpha-202107141152.176":"2021-07-14T14:52:53.426Z","1.0.8-alpha-202107211346":"2021-07-21T13:46:47.811Z","1.0.8-alpha-202107212001":"2021-07-21T20:01:20.496Z","1.0.8-alpha-202107291804":"2021-07-29T18:04:24.844Z","1.0.8-alpha-202108132130":"2021-08-13T21:31:10.837Z","1.0.8-alpha-202108171450":"2021-08-17T14:51:09.422Z","1.0.8-alpha-202109141312":"2021-09-14T13:13:15.189Z","1.0.8-alpha-202109150057":"2021-09-15T00:57:57.062Z","1.0.8":"2021-09-15T02:09:00.393Z","1.0.8-alpha-202109151315":"2021-09-15T13:15:49.788Z","1.0.9":"2021-09-15T13:51:08.791Z","1.1.0-alpha-202109171011":"2021-09-17T10:11:42.086Z","1.1.0-alpha-202110051739":"2021-10-05T17:39:18.902Z","1.1.0-network-202110181134":"2021-10-18T14:34:50.783Z","1.1.0-network-202110181908":"2021-10-18T22:08:59.434Z","1.1.0-alpha-202110211346":"2021-10-21T13:47:08.012Z","1.1.0-alpha-202110300727":"2021-10-30T10:28:07.798Z","1.1.0-alpha-202110301232":"2021-10-30T12:33:10.009Z","1.1.0-alpha-202110311545":"2021-10-31T15:46:15.654Z","1.1.0-alpha-202110312143":"2021-10-31T21:43:22.320Z","1.1.0-alpha-202110312317":"2021-10-31T23:18:05.590Z","1.1.0-alpha-202111011351":"2021-11-01T13:52:05.243Z","1.1.0-alpha-202111050633":"2021-11-05T06:33:28.392Z","1.1.0":"2021-11-05T06:44:24.310Z","1.1.1-alpha-202111101421":"2021-11-10T14:22:14.653Z","1.1.1-alpha-202111110842":"2021-11-11T08:42:50.741Z","1.1.1-alpha-202111121542":"2021-11-12T15:43:10.037Z","1.1.1-alpha-202111121942":"2021-11-12T19:43:16.240Z","1.1.1-alpha-202111161540":"2021-11-16T15:41:14.614Z","1.1.1-alpha-202111161850":"2021-11-16T18:51:02.768Z","1.1.1-alpha-202111161938":"2021-11-16T19:39:10.748Z","1.1.1":"2021-11-16T21:55:27.375Z","1.1.2-alpha-202111162211":"2021-11-16T22:12:01.506Z","1.1.2-alpha-202111212116":"2021-11-21T21:16:58.731Z","1.1.2-alpha-202111221954":"2021-11-22T19:54:19.074Z","1.1.2-alpha-202111242117":"2021-11-24T21:18:04.699Z","1.1.2-alpha-202111242234":"2021-11-24T22:34:47.228Z","1.1.2-network-202111261011":"2021-11-26T13:11:18.610Z","1.1.2-network-202111261018":"2021-11-26T13:18:39.951Z","1.1.2-alpha-202111261414":"2021-11-26T14:14:58.086Z","1.1.2-alpha-202111261853":"2021-11-26T18:54:05.981Z","1.1.2-alpha-202111261904":"2021-11-26T19:04:43.697Z","1.1.2-alpha-202111301314":"2021-11-30T13:14:41.833Z","1.1.2-alpha-202111301834":"2021-11-30T18:35:12.442Z","1.1.2-alpha-202112032036":"2021-12-03T20:36:25.301Z","1.1.2-alpha-202112061047":"2021-12-06T10:47:19.499Z","1.1.2-alpha-202112061437":"2021-12-06T14:37:44.706Z","1.1.2-alpha-202112082043":"2021-12-08T20:43:40.053Z","1.1.2-alpha-202112090220":"2021-12-09T02:20:52.488Z","1.1.2-alpha-202112141553":"2021-12-14T15:53:55.715Z","1.1.2-alpha-202112141602":"2021-12-14T16:03:15.639Z","1.1.2-alpha-202112141709":"2021-12-14T17:09:29.683Z","1.1.2-alpha-202112141716":"2021-12-14T17:17:01.202Z","1.1.2-alpha-202112152235":"2021-12-15T22:35:46.990Z","1.1.2-alpha-202201120216":"2022-01-12T02:16:35.095Z","1.1.2-alpha-202201120217":"2022-01-12T02:17:27.188Z","1.1.2-alpha-202201120218":"2022-01-12T02:18:19.721Z","1.1.2-alpha-202201120306":"2022-01-12T03:06:54.788Z","1.1.2-alpha-202201120320":"2022-01-12T03:20:17.654Z","1.1.2-alpha-0e9495":"2022-01-12T21:15:26.699Z","1.1.2-test-202201131511":"2022-01-13T18:12:21.062Z","1.1.2-alpha-d7f6186":"2022-01-14T14:55:17.405Z","1.1.2-alpha-347034c":"2022-01-14T15:02:55.528Z","1.1.2-alpha-030d497":"2022-01-14T19:45:22.956Z","1.1.2-alpha-7146979":"2022-01-16T22:08:17.130Z","1.1.2-alpha-4dba4b1":"2022-01-17T02:39:05.667Z","1.1.2-alpha-5d35f94":"2022-01-17T14:58:05.927Z","1.1.2-alpha-2a61663":"2022-01-17T15:22:23.105Z","1.1.2":"2022-01-17T15:27:28.292Z","1.1.3-alpha-9b12ae5":"2022-01-17T15:34:18.761Z","1.1.3-alpha-a1a6e1b":"2022-01-17T15:44:29.877Z","1.1.3-alpha-75c32ac":"2022-01-17T21:48:24.833Z","1.1.3-alpha-cb17510":"2022-01-17T21:57:17.986Z","1.1.3-alpha-fc05826":"2022-01-17T22:42:08.838Z","1.1.3-alpha-0f83ff8":"2022-01-19T02:23:46.350Z","1.1.3-alpha-202201201146":"2022-01-20T14:47:03.840Z","1.1.3-alpha-fc57720":"2022-01-20T15:38:39.348Z","1.1.3":"2022-01-21T13:35:31.102Z","1.1.4-alpha-828fbf0":"2022-01-21T13:47:38.279Z","1.1.4-alpha-3f3b67b":"2022-01-21T13:53:01.444Z","1.1.4-alpha-e63d2e2":"2022-01-26T19:12:39.847Z","1.1.4-alpha-75cd67e":"2022-02-02T01:25:21.104Z","1.1.4-alpha-7dcd80b":"2022-02-02T01:38:36.957Z","1.1.4-alpha-be3a0ef":"2022-02-04T15:36:17.521Z","1.1.4":"2022-02-04T15:41:37.503Z","1.1.5-alpha-684915b":"2022-02-04T15:57:58.733Z","1.1.5-alpha-0d3a668":"2022-02-26T12:18:53.281Z","1.1.5-alpha-b89ed3a":"2022-02-26T12:19:29.816Z","1.1.5-alpha-3a69389":"2022-03-01T18:49:56.820Z","1.1.5":"2022-03-01T18:59:45.455Z","1.1.6-alpha-a60fb9f":"2022-03-01T19:07:29.654Z","1.1.6-alpha-f96e7f2":"2022-03-16T08:26:13.807Z","1.1.6":"2022-03-16T08:32:27.136Z","1.1.7-alpha-2b984eb":"2022-03-16T08:41:55.003Z","1.1.7-alpha-8a56d9b":"2022-03-28T14:35:42.122Z","1.1.8":"2022-10-25T15:38:59.270Z","1.1.9":"2022-11-09T18:08:06.300Z","1.1.9-alpha-a5a281c":"2023-01-07T11:20:53.970Z","1.1.9-alpha-c8e7855":"2023-01-07T11:20:59.241Z","1.1.9-alpha-3b71e38":"2023-01-07T11:21:10.313Z","1.1.9-alpha-032da01":"2023-04-12T14:51:53.963Z","1.1.10-alpha-128f9be":"2023-04-14T13:41:37.571Z","1.1.10":"2023-04-14T14:13:18.754Z","1.1.10-alpha-b1d907f":"2023-05-22T20:45:04.850Z","1.1.10-alpha-506ac79":"2023-05-22T21:41:55.372Z"},"maintainers":[{"name":"fboucquez","email":"fboucquez@gmail.com"},{"name":"nemgrouplimited","email":"system+npm@nem.software"}],"description":"Symbol tool that allows you creating, configuring and running Symbol's networks","keywords":["oclif"],"author":{"name":"Fernando Boucquez","email":"fboucquez@gmail.com"},"bugs":{"url":"https://github.com/fboucquez/symbol-bootstrap/issues"},"license":"Apache-2.0","readme":"","readmeFilename":"","homepage":"https://github.com/fboucquez/symbol-bootstrap","repository":{"type":"git","url":"git+https://github.com/fboucquez/symbol-bootstrap.git"}}