Struct diem_operational_tool::test_helper::OperationalTool [−][src]
pub struct OperationalTool { /* fields omitted */ }Expand description
A helper to test the operational tool in tests
Implementations
pub fn account_resource(
&self,
account_address: AccountAddress
) -> Result<SimplifiedAccountResource, Error>
pub fn check_endpoint(
&self,
network_id: &NetworkId,
network_address: NetworkAddress
) -> Result<String, Error>
pub fn check_endpoint_with_key(
&self,
network_id: &NetworkId,
network_address: NetworkAddress,
private_key: &PrivateKey
) -> Result<String, Error>
pub fn create_account(
&self,
name: &str,
path_to_key: &str,
backend: &SecureBackend,
disable_validate: bool,
command_name: CommandName,
execute: fn(_: Command) -> Result<(TransactionContext, AccountAddress), Error>
) -> Result<(TransactionContext, AccountAddress), Error>
pub fn create_validator(
&self,
name: &str,
path_to_key: &str,
backend: &SecureBackend,
disable_validate: bool
) -> Result<(TransactionContext, AccountAddress), Error>
pub fn create_validator_operator(
&self,
name: &str,
path_to_key: &str,
backend: &SecureBackend,
disable_validate: bool
) -> Result<(TransactionContext, AccountAddress), Error>
pub fn extract_public_key(
&self,
key_name: &str,
key_file: &str,
key_type: KeyType,
encoding: EncodingType,
backend: &SecureBackend
) -> Result<(), Error>
pub fn extract_private_key(
&self,
key_name: &str,
key_file: &str,
key_type: KeyType,
encoding: EncodingType,
backend: &SecureBackend
) -> Result<(), Error>
pub fn extract_peer_from_file(
&self,
key_file: &Path,
encoding: EncodingType
) -> Result<HashMap<PeerId, Peer>, Error>
pub fn extract_peer_from_storage(
&self,
key_name: &str,
backend: &SecureBackend
) -> Result<HashMap<PeerId, Peer>, Error>
pub fn extract_peers_from_keys(
&self,
keys: HashSet<PublicKey>,
output_file: &Path
) -> Result<HashMap<PeerId, Peer>, Error>
pub fn generate_key(
&self,
key_type: KeyType,
key_file: &Path,
encoding: EncodingType
) -> Result<PrivateKey, Error>
pub fn insert_waypoint(
&self,
waypoint: Waypoint,
backend: &SecureBackend,
set_genesis: bool
) -> Result<(), Error>
pub fn print_account(
&self,
account_name: &str,
backend: &SecureBackend
) -> Result<AccountAddress, Error>
pub fn print_key(
&self,
key_name: &str,
backend: &SecureBackend
) -> Result<Ed25519PublicKey, Error>
pub fn print_waypoint(
&self,
waypoint_name: &str,
backend: &SecureBackend
) -> Result<Waypoint, Error>
pub fn set_validator_config(
&self,
validator_address: Option<NetworkAddress>,
fullnode_address: Option<NetworkAddress>,
backend: &SecureBackend,
disable_validate: bool,
disable_address_validation: bool
) -> Result<TransactionContext, Error>
pub fn rotate_consensus_key(
&self,
backend: &SecureBackend,
disable_validate: bool
) -> Result<(TransactionContext, Ed25519PublicKey), Error>
pub fn rotate_operator_key(
&self,
backend: &SecureBackend,
disable_validate: bool
) -> Result<(TransactionContext, Ed25519PublicKey), Error>
pub fn rotate_operator_key_with_custom_validation(
&self,
backend: &SecureBackend,
disable_validate: bool,
sleep_interval: Option<u64>,
validate_timeout: Option<u64>
) -> Result<(TransactionContext, Ed25519PublicKey), Error>
pub fn rotate_validator_network_key(
&self,
backend: &SecureBackend,
disable_validate: bool
) -> Result<(TransactionContext, PublicKey), Error>
pub fn rotate_fullnode_network_key(
&self,
backend: &SecureBackend,
disable_validate: bool
) -> Result<(TransactionContext, PublicKey), Error>
pub fn validate_transaction(
&self,
account_address: AccountAddress,
sequence_number: u64
) -> Result<TransactionContext, Error>
pub fn set_validator_operator(
&self,
name: &str,
account_address: AccountAddress,
backend: &SecureBackend,
disable_validate: bool
) -> Result<TransactionContext, Error>
pub fn validator_config(
&self,
account_address: AccountAddress,
backend: Option<&SecureBackend>
) -> Result<DecryptedValidatorConfig, Error>
pub fn validator_set(
&self,
account_address: Option<AccountAddress>,
backend: Option<&SecureBackend>
) -> Result<Vec<DecryptedValidatorInfo>, Error>
pub fn add_validator(
&self,
account_address: AccountAddress,
backend: &SecureBackend,
disable_validate: bool
) -> Result<TransactionContext, Error>
pub fn remove_validator(
&self,
account_address: AccountAddress,
backend: &SecureBackend,
disable_validate: bool
) -> Result<TransactionContext, Error>
pub fn verify_validator_state(
&self,
backend: &SecureBackend
) -> Result<VerifyValidatorStateResult, Error>
Auto Trait Implementations
impl RefUnwindSafe for OperationalTool
impl Send for OperationalTool
impl Sync for OperationalTool
impl Unpin for OperationalTool
impl UnwindSafe for OperationalTool
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self