#[macro_use]
extern crate clap;
#[macro_use]
extern crate amplify;
use std::io;
use amplify::IoError;
use clap::Parser;
use colored::Colorize;
#[derive(Parser)]
#[derive(Clone, Eq, PartialEq, Debug)]
#[clap(
author,
version,
name = "seals",
about = "Command-line tool for working with bitcoin-based single-use-seals"
)]
pub struct Args {
#[clap(subcommand)]
pub command: Command,
}
#[derive(Subcommand)]
#[derive(Clone, Eq, PartialEq, Debug)]
pub enum Command {
#[clap()]
Noop,
}
impl Args {
pub fn exec(&self) -> Result<(), Error> {
match self.command {
Command::Noop => {}
}
Ok(())
}
}
#[derive(Debug, Display, Error, From)]
#[display(inner)]
pub enum Error {
#[from(io::Error)]
Io(IoError),
#[from]
StrictEncoding(strict_encoding::Error),
}
fn main() {
let args = Args::parse();
if let Err(err) = args.exec() {
eprintln!("{}: {}\n", "Error".bright_red(), err);
}
}