pub trait Blockchain: WalletSync + GetHeight + GetTx + GetBlockHash {
    // Required methods
    fn get_capabilities(&self) -> HashSet<Capability>;
    fn broadcast(&self, tx: &Transaction) -> Result<(), Error>;
    fn estimate_fee(&self, target: usize) -> Result<FeeRate, Error>;
}
Expand description

Trait that defines the actions that must be supported by a blockchain backend

Required Methods§

source

fn get_capabilities(&self) -> HashSet<Capability>

Return the set of Capability supported by this backend

source

fn broadcast(&self, tx: &Transaction) -> Result<(), Error>

Broadcast a transaction

source

fn estimate_fee(&self, target: usize) -> Result<FeeRate, Error>

Estimate the fee rate required to confirm a transaction in a given target of blocks

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Blockchain> Blockchain for Arc<T>

Implementors§

source§

impl Blockchain for AnyBlockchain

source§

impl Blockchain for CompactFiltersBlockchain

Available on crate feature compact_filters only.
source§

impl Blockchain for ElectrumBlockchain

Available on crate feature electrum only.
source§

impl Blockchain for EsploraBlockchain

Available on crate feature esplora only.
source§

impl Blockchain for RpcBlockchain

Available on crate feature rpc only.