OptionSpec<Short> portFlag = parser.accepts("port").withRequiredArg().ofType(Short.class).defaultsTo(DEFAULT_LOCALHOST_PORT);
OptionSpec<String> keystoreFlag = parser.accepts("keystore").withRequiredArg();
parser.accepts("local-node");
OptionSet options = parser.parse(args);
NetworkParameters params;
switch (netFlag.value(options)) {
case "main": params = MainNetParams.get(); break;
case "test": params = TestNet3Params.get(); break;
case "regtest": params = RegTestParams.get(); break;
default: