hermes_cli/commands/keys/
mod.rs1mod add;
2pub use add::KeysAddCmd;
3
4mod list;
5pub use list::KeysListCmd;
6
7mod delete;
8pub use delete::KeysDeleteCmd;
9
10mod balance;
11pub use balance::KeysBalanceCmd;
12use hermes_cli_framework::command::CommandRunner;
13use hermes_cli_framework::output::Output;
14
15use crate::contexts::app::HermesApp;
16use crate::Result;
17
18#[derive(Debug, clap::Parser)]
20pub enum KeysCmd {
21 Add(KeysAddCmd),
23
24 List(KeysListCmd),
26
27 Delete(KeysDeleteCmd),
29
30 Balance(KeysBalanceCmd),
32}
33
34impl CommandRunner<HermesApp> for KeysCmd {
35 async fn run(&self, app: &HermesApp) -> Result<Output> {
36 match self {
37 Self::Add(cmd) => cmd.run(app).await,
38 Self::List(cmd) => cmd.run(app).await,
39 Self::Delete(cmd) => cmd.run(app).await,
40 Self::Balance(cmd) => cmd.run(app).await,
41 }
42 }
43}