2024-05-29 16:35:00 +01:00
|
|
|
use clap::Parser;
|
|
|
|
|
use clap::Subcommand;
|
2024-05-29 13:17:16 +01:00
|
|
|
|
|
|
|
|
pub(crate) fn parse_args() -> Args {
|
|
|
|
|
let args = Args::parse();
|
|
|
|
|
|
|
|
|
|
args
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-29 16:47:35 +01:00
|
|
|
/// A P2P smart contract execution node
|
2024-05-29 13:17:16 +01:00
|
|
|
#[derive(Parser)]
|
|
|
|
|
#[command(version, about, long_about = None)]
|
|
|
|
|
pub(crate) struct Args {
|
|
|
|
|
#[command(subcommand)]
|
2024-05-29 16:35:00 +01:00
|
|
|
pub(crate) command: Option<Commands>,
|
2024-05-29 13:17:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Subcommand)]
|
2024-05-29 16:35:00 +01:00
|
|
|
pub(crate) enum Commands {
|
2024-06-20 17:21:41 +01:00
|
|
|
/// Placeholder for future BTC commands
|
|
|
|
|
Btc {},
|
|
|
|
|
|
2024-05-29 13:17:16 +01:00
|
|
|
/// runs the Side Node
|
2024-06-06 18:52:39 +01:00
|
|
|
Run { name: String },
|
2024-05-29 16:47:35 +01:00
|
|
|
|
|
|
|
|
/// initializes the Side Node with a new keypair
|
2024-06-06 16:02:00 +01:00
|
|
|
Init { name: String },
|
2024-05-29 13:17:16 +01:00
|
|
|
}
|