Skip to main content

Blockchain

Trait Blockchain 

Source
pub trait Blockchain {
    // Required methods
    fn find_outpoints(
        &self,
        address: &Address,
    ) -> impl Future<Output = Result<Vec<ExplorerUtxo>, Error>> + Send;
    fn find_tx(
        &self,
        txid: &Txid,
    ) -> impl Future<Output = Result<Option<Transaction>, Error>> + Send;
    fn get_tx_status(
        &self,
        txid: &Txid,
    ) -> impl Future<Output = Result<TxStatus, Error>> + Send;
    fn get_output_status(
        &self,
        txid: &Txid,
        vout: u32,
    ) -> impl Future<Output = Result<SpendStatus, Error>> + Send;
    fn broadcast(
        &self,
        tx: &Transaction,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn get_fee_rate(&self) -> impl Future<Output = Result<f64, Error>> + Send;
    fn broadcast_package(
        &self,
        txs: &[&Transaction],
    ) -> impl Future<Output = Result<(), Error>> + Send;
}

Required Methods§

Source

fn find_outpoints( &self, address: &Address, ) -> impl Future<Output = Result<Vec<ExplorerUtxo>, Error>> + Send

Source

fn find_tx( &self, txid: &Txid, ) -> impl Future<Output = Result<Option<Transaction>, Error>> + Send

Source

fn get_tx_status( &self, txid: &Txid, ) -> impl Future<Output = Result<TxStatus, Error>> + Send

Source

fn get_output_status( &self, txid: &Txid, vout: u32, ) -> impl Future<Output = Result<SpendStatus, Error>> + Send

Source

fn broadcast( &self, tx: &Transaction, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn get_fee_rate(&self) -> impl Future<Output = Result<f64, Error>> + Send

Source

fn broadcast_package( &self, txs: &[&Transaction], ) -> impl Future<Output = Result<(), Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§