36 lines
813 B
Rust
36 lines
813 B
Rust
//! NAC VISION CLI
|
|
|
|
use clap::{Parser, Subcommand};
|
|
|
|
#[derive(Parser)]
|
|
#[command(name = "vision")]
|
|
#[command(about = "NAC VISION Wallet CLI")]
|
|
struct Cli {
|
|
#[command(subcommand)]
|
|
command: Commands,
|
|
}
|
|
|
|
#[derive(Subcommand)]
|
|
enum Commands {
|
|
Balance { address: Option<String> },
|
|
Send { to: String, amount: u128 },
|
|
History { limit: Option<usize> },
|
|
}
|
|
|
|
fn main() {
|
|
println!("NAC VISION CLI v2.0.0-alpha");
|
|
let cli = Cli::parse();
|
|
|
|
match cli.command {
|
|
Commands::Balance { address } => {
|
|
println!("Balance: 1000 XTZH");
|
|
}
|
|
Commands::Send { to, amount } => {
|
|
println!("Sent {} XTZH to {}", amount, to);
|
|
}
|
|
Commands::History { limit } => {
|
|
println!("Transaction history (limit: {:?})", limit);
|
|
}
|
|
}
|
|
}
|