use clap::{ArgMatches, Command};
use crate::blockchain::proto::block::Block;
use crate::common::Result;
pub mod balances;
mod common;
pub mod csvdump;
pub mod opreturn;
pub mod simplestats;
pub mod unspentcsvdump;
pub trait Callback {
fn build_subcommand() -> Command
where
Self: Sized;
fn new(matches: &ArgMatches) -> Result<Self>
where
Self: Sized;
fn on_start(&mut self, block_height: u64) -> Result<()>;
fn on_block(&mut self, block: &Block, block_height: u64) -> Result<()>;
fn on_complete(&mut self, block_height: u64) -> Result<()>;
fn show_progress(&self) -> bool {
true
}
}