Enum diem_operational_tool::command::Command
source · pub enum Command {
Show 27 variants
AccountResource(AccountResource),
AddValidator(AddValidator),
CheckEndpoint(CheckEndpoint),
CheckValidatorSetEndpoints(CheckValidatorSetEndpoints),
CreateValidator(CreateValidator),
CreateValidatorOperator(CreateValidatorOperator),
ExtractPeerFromFile(ExtractPeerFromFile),
ExtractPeerFromStorage(ExtractPeerFromStorage),
ExtractPeersFromKeys(ExtractPeersFromKeys),
ExtractPrivateKey(ExtractPrivateKey),
ExtractPublicKey(ExtractPublicKey),
GenerateKey(GenerateKey),
InsertWaypoint(InsertWaypoint),
PrintAccount(PrintAccount),
PrintKey(PrintKey),
PrintXKey(PrintXKey),
PrintWaypoint(PrintWaypoint),
RemoveValidator(RemoveValidator),
RotateConsensusKey(RotateConsensusKey),
RotateFullNodeNetworkKey(RotateFullNodeNetworkKey),
RotateOperatorKey(RotateOperatorKey),
RotateValidatorNetworkKey(RotateValidatorNetworkKey),
SetValidatorConfig(SetValidatorConfig),
SetValidatorOperator(SetValidatorOperator),
ValidateTransaction(ValidateTransaction),
ValidatorConfig(ValidatorConfig),
ValidatorSet(ValidatorSet),
}
Variants§
AccountResource(AccountResource)
AddValidator(AddValidator)
CheckEndpoint(CheckEndpoint)
CheckValidatorSetEndpoints(CheckValidatorSetEndpoints)
CreateValidator(CreateValidator)
CreateValidatorOperator(CreateValidatorOperator)
ExtractPeerFromFile(ExtractPeerFromFile)
ExtractPeerFromStorage(ExtractPeerFromStorage)
ExtractPeersFromKeys(ExtractPeersFromKeys)
ExtractPrivateKey(ExtractPrivateKey)
ExtractPublicKey(ExtractPublicKey)
GenerateKey(GenerateKey)
InsertWaypoint(InsertWaypoint)
PrintAccount(PrintAccount)
PrintKey(PrintKey)
PrintXKey(PrintXKey)
PrintWaypoint(PrintWaypoint)
RemoveValidator(RemoveValidator)
RotateConsensusKey(RotateConsensusKey)
RotateFullNodeNetworkKey(RotateFullNodeNetworkKey)
RotateOperatorKey(RotateOperatorKey)
RotateValidatorNetworkKey(RotateValidatorNetworkKey)
SetValidatorConfig(SetValidatorConfig)
SetValidatorOperator(SetValidatorOperator)
ValidateTransaction(ValidateTransaction)
ValidatorConfig(ValidatorConfig)
ValidatorSet(ValidatorSet)
Implementations§
source§impl Command
impl Command
pub fn execute(self) -> Result<String, Error>
sourcepub fn print_transaction_context(
result: Result<TransactionContext, Error>
) -> Result<String, Error>
pub fn print_transaction_context( result: Result<TransactionContext, Error> ) -> Result<String, Error>
Show the transaction context and validation result in a friendly way
pub fn account_resource(self) -> Result<SimplifiedAccountResource, Error>
pub fn add_validator(self) -> Result<TransactionContext, Error>
pub fn check_endpoint(self) -> Result<String, Error>
pub fn check_validator_set_endpoints(self) -> Result<String, Error>
pub fn create_validator( self ) -> Result<(TransactionContext, AccountAddress), Error>
pub fn create_validator_operator( self ) -> Result<(TransactionContext, AccountAddress), Error>
pub fn extract_private_key(self) -> Result<(), Error>
pub fn extract_public_key(self) -> Result<(), Error>
pub fn extract_peer_from_storage(self) -> Result<HashMap<PeerId, Peer>, Error>
pub fn extract_peer_from_file(self) -> Result<HashMap<PeerId, Peer>, Error>
pub fn extract_peers_from_keys(self) -> Result<HashMap<PeerId, Peer>, Error>
pub fn generate_key(self) -> Result<(), Error>
pub fn insert_waypoint(self) -> Result<(), Error>
pub fn print_account(self) -> Result<AccountAddress, Error>
pub fn print_key(self) -> Result<Ed25519PublicKey, Error>
pub fn print_x_key(self) -> Result<PublicKey, Error>
pub fn print_waypoint(self) -> Result<Waypoint, Error>
pub fn remove_validator(self) -> Result<TransactionContext, Error>
pub fn rotate_consensus_key( self ) -> Result<(TransactionContext, Ed25519PublicKey), Error>
pub fn rotate_operator_key( self ) -> Result<(TransactionContext, Ed25519PublicKey), Error>
pub fn rotate_fullnode_network_key( self ) -> Result<(TransactionContext, PublicKey), Error>
pub fn rotate_validator_network_key( self ) -> Result<(TransactionContext, PublicKey), Error>
pub fn set_validator_config(self) -> Result<TransactionContext, Error>
pub fn set_validator_operator(self) -> Result<TransactionContext, Error>
pub fn validate_transaction(self) -> Result<TransactionContext, Error>
pub fn validator_config(self) -> Result<DecryptedValidatorConfig, Error>
pub fn validator_set(self) -> Result<Vec<DecryptedValidatorInfo>, Error>
Trait Implementations§
source§impl From<&Command> for CommandName
impl From<&Command> for CommandName
source§impl StructOpt for Command
impl StructOpt for Command
source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by [StructOpt::clap
] called on
the same type, otherwise it must panic.§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Unlike [StructOpt::from_args
], returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.§fn from_iter<I>(iter: I) -> Selfwhere
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter<I>(iter: I) -> Selfwhere Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Gets the struct from any iterator such as a
Vec
of your making.
Print the error message and quit the program in case of failure. Read more§fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Gets the struct from any iterator such as a
Vec
of your making. Read more