2020-09-01 14:09:20 +00:00
|
|
|
package io.rudefox.burrow;
|
|
|
|
|
|
|
|
import com.bjdweck.bitcoin.params.INetworkParameters;
|
|
|
|
import com.bjdweck.bitcoin.params.NetworkParameters;
|
2020-09-02 10:09:14 +00:00
|
|
|
import picocli.AutoComplete;
|
2020-09-01 14:09:20 +00:00
|
|
|
import picocli.CommandLine;
|
|
|
|
|
|
|
|
@CommandLine.Command(
|
|
|
|
name = "burrow",
|
|
|
|
synopsisSubcommandLabel = "COMMAND",
|
|
|
|
description = "Offline wallet tool",
|
2020-09-02 10:09:14 +00:00
|
|
|
subcommands = {MnemonicCommand.class, WalletCommand.class, AutoComplete.GenerateCompletion.class}
|
2020-09-01 14:09:20 +00:00
|
|
|
)
|
|
|
|
public class RudefoxBurrow implements Runnable {
|
|
|
|
|
|
|
|
@CommandLine.Option(names = "--testnet", description = "run on Bitcoin Testnet (default: Mainnet)")
|
|
|
|
boolean testnet = false;
|
|
|
|
|
|
|
|
public INetworkParameters getNetworkParameters() {
|
|
|
|
return testnet ? NetworkParameters.Testnet() : NetworkParameters.Mainnet();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
new CommandLine(new RudefoxBurrow()).execute(args);
|
|
|
|
}
|
|
|
|
|
|
|
|
@CommandLine.Spec
|
|
|
|
CommandLine.Model.CommandSpec commandSpec;
|
|
|
|
|
|
|
|
public void run() {
|
|
|
|
throw new CommandLine.ParameterException(commandSpec.commandLine(), "Missing required subcommand");
|
|
|
|
}
|
2020-09-01 12:18:32 +00:00
|
|
|
}
|