public static void main(String[] args) throws Exception {
// allow client to choose another network for testing by passing through an argument.
OptionParser parser = new OptionParser();
parser.accepts("network").withRequiredArg().withValuesConvertedBy(regex("(mainnet)|(testnet)|(regtest)")).defaultsTo("mainnet");
parser.accepts("help").forHelp();
parser.formatHelpWith(new BuiltinHelpFormatter(120, 10));
OptionSet options;
try {
options = parser.parse(args);
} catch (OptionException e) {