Enum bdk::blockchain::any::AnyBlockchain
source · [−]pub enum AnyBlockchain {
Electrum(Box<ElectrumBlockchain>),
Esplora(Box<EsploraBlockchain>),
CompactFilters(Box<CompactFiltersBlockchain>),
}
Expand description
Type that can contain any of the Blockchain
types defined by the library
It allows switching backend at runtime
See this module’s documentation for a usage example.
Variants
Electrum(Box<ElectrumBlockchain>)
This is supported on crate feature
electrum
only.Electrum client
Esplora(Box<EsploraBlockchain>)
This is supported on crate feature
esplora
only.Esplora client
CompactFilters(Box<CompactFiltersBlockchain>)
This is supported on crate feature
compact_filters
only.Compact filters client
Trait Implementations
Return the set of Capability
supported by this backend
type Config = AnyBlockchainConfig
type Config = AnyBlockchainConfig
Type that contains the configuration
Create a new instance given a configuration
Performs the conversion.
Performs the conversion.
Performs the conversion.
fetch block hash given its height
Return the current height
fn wallet_sync<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_sync<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
If not overridden, it defaults to calling Self::wallet_setup
internally. Read more
fn wallet_setup<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_setup<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
Setup the backend and populate the internal database for the first time Read more