#[macro_use]
extern crate log;
extern crate serde_crate as serde;
use std::process::ExitCode;
use bpwallet::cli::LogLevel;
use bpwallet::hot::{DataError, HotArgs};
use clap::Parser;
fn main() -> ExitCode {
if let Err(err) = run() {
eprintln!("Error: {err}");
ExitCode::FAILURE
} else {
ExitCode::SUCCESS
}
}
fn run() -> Result<(), DataError> {
let args = HotArgs::parse();
LogLevel::from_verbosity_flag_count(args.verbose).apply();
trace!("Command-line arguments: {:#?}", &args);
eprintln!("BP: command-line tool for working with seeds and private keys in bitcoin protocol");
eprintln!(" by LNP/BP Standards Association\n");
debug!("Executing command: {}", args.command);
args.exec()
}