use anyhow::Result;
pub trait BlockChainOps {
fn generate_keypair() -> (String, String)
where
Self: Sized;
fn create_address(&mut self) -> Result<String>;
fn address(&self) -> Result<String>;
fn public_key(&self) -> Result<[u8; 32]>;
fn private_key(&self) -> Result<Vec<u8>>;
fn sign(&self, text: &str) -> Result<String>;
fn verify(&self, text: &str, sig_b64: &str) -> Result<bool>;
fn send_payment(&self, to: &str, payment_amount: f64) -> Result<()>;
fn account_balance(&self) -> Result<Option<f64>>;
fn account_balance_at(&self, account: &str) -> Result<f64>;
fn wait_for_confirmation(&self, tx_id: &str, timeout: u64) -> Result<()>;
}
pub trait AssetOps {
fn send_asset(&self, asset_id: u64, amount: u64, to: &str) -> Result<()>;
fn asset_holding(&self, account: &str, asset_id: u64) -> Result<u64>;
}