use bitcoin::Address;
use async_trait::async_trait;
#[async_trait]
pub trait ChainBackend: Send + Sync {
async fn is_address_used(&self, address: &Address) -> Result<bool, Box<dyn std::error::Error + Send + Sync>>;
async fn get_address_history(&self, address: &Address) -> Result<Vec<String>, Box<dyn std::error::Error + Send + Sync>>;
}
#[derive(Debug, Clone)]
pub struct AddressUsedEvent {
pub hrn: String,
pub address: Address,
pub tx_id: String,
}
pub struct ChainMonitor {
_placeholder: (),
}
impl ChainMonitor {
pub fn new() -> Self {
Self { _placeholder: () }
}
pub async fn check_address_usage(&self, _address: &Address) -> Result<bool, Box<dyn std::error::Error + Send + Sync>> {
Ok(false)
}
}