mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Update account manager CLI
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
use clap::{App, Arg, SubCommand};
|
||||
|
||||
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
App::new("Account Manager")
|
||||
.visible_aliases(&["am", "accounts", "accounts_manager"])
|
||||
.version("0.0.1")
|
||||
.author("Sigma Prime <contact@sigmaprime.io>")
|
||||
App::new("account_manager")
|
||||
.visible_aliases(&["am", "account", "account_manager"])
|
||||
.about("Eth 2.0 Accounts Manager")
|
||||
.arg(
|
||||
Arg::with_name("logfile")
|
||||
@@ -22,33 +20,45 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.takes_value(true),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("generate")
|
||||
.about("Generates a new validator private key")
|
||||
.version("0.0.1")
|
||||
.author("Sigma Prime <contact@sigmaprime.io>"),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("generate_deterministic")
|
||||
.about("Generates a deterministic validator private key FOR TESTING")
|
||||
SubCommand::with_name("validator")
|
||||
.about("Eth2 validator managment commands.")
|
||||
.version("0.0.1")
|
||||
.author("Sigma Prime <contact@sigmaprime.io>")
|
||||
.arg(
|
||||
Arg::with_name("validator index")
|
||||
.long("index")
|
||||
.short("i")
|
||||
.value_name("index")
|
||||
.help("The index of the validator, for which the test key is generated")
|
||||
.takes_value(true)
|
||||
.required(true),
|
||||
.subcommand(
|
||||
SubCommand::with_name("new")
|
||||
.about("Create a new validator.")
|
||||
.subcommand(
|
||||
SubCommand::with_name("insecure")
|
||||
.about("Uses the insecure deterministic keypairs. Do not store value in these.")
|
||||
.arg(
|
||||
Arg::with_name("first")
|
||||
.index(1)
|
||||
.value_name("INDEX")
|
||||
.help("Index of the first validator")
|
||||
.takes_value(true)
|
||||
.required(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("last")
|
||||
.index(2)
|
||||
.value_name("INDEX")
|
||||
.help("Index of the first validator")
|
||||
.takes_value(true)
|
||||
.required(true),
|
||||
),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("random")
|
||||
.about("Uses the Rust rand crate ThreadRandom to generate keys.")
|
||||
.arg(
|
||||
Arg::with_name("validator_count")
|
||||
.index(1)
|
||||
.value_name("INTEGER")
|
||||
.help("The number of new validators to generate.")
|
||||
.takes_value(true)
|
||||
.default_value("1"),
|
||||
),
|
||||
)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("validator count")
|
||||
.long("validator_count")
|
||||
.short("n")
|
||||
.value_name("validator_count")
|
||||
.help("If supplied along with `index`, generates keys `i..i + n`.")
|
||||
.takes_value(true)
|
||||
.default_value("1"),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user