use clap::{App, ArgMatches};
use crate::blockchain::parser::types::CoinType;
use crate::blockchain::proto::block::Block;
use crate::errors::OpResult;
pub mod balances;
mod common;
pub mod csvdump;
pub mod stats;
pub mod unspentcsvdump;
pub trait Callback {
fn build_subcommand<'a, 'b>() -> App<'a, 'b>
where
Self: Sized;
fn new(matches: &ArgMatches) -> OpResult<Self>
where
Self: Sized;
fn on_start(&mut self, coin_type: &CoinType, block_height: u64) -> OpResult<()>;
fn on_block(&mut self, block: &Block, block_height: u64) -> OpResult<()>;
fn on_complete(&mut self, block_height: u64) -> OpResult<()>;
}