chain-spec-generator 13.0.1-beta.196

Generates a chainspec artifact for use in genesis block creation of a Xand network.
Documentation
pub(crate) mod commands;
mod options;
mod output;

use commands::{run_generate_command, GenerateError};

pub use self::options::CliOptions;
pub use self::output::CliOutput;

#[derive(Debug, thiserror::Error)]
pub enum CliError {
    #[error("{}", .0)]
    Generate(#[from] GenerateError),
}

pub fn lib_main(command: CliOptions) -> Result<CliOutput, CliError> {
    match command {
        CliOptions::Generate { args } => run_generate_command(args)
            .map(Into::into)
            .map_err(Into::into),
    }
}