Struct bdk::blockchain::EsploraBlockchain
source · [−]pub struct EsploraBlockchain { /* private fields */ }
Expand description
Structure that implements the logic to sync with Esplora
Example
See the blockchain::esplora
module for a usage example.
Implementations
sourceimpl EsploraBlockchain
impl EsploraBlockchain
sourcepub fn new(base_url: &str, stop_gap: usize) -> Self
Available on crate feature esplora
only.
pub fn new(base_url: &str, stop_gap: usize) -> Self
esplora
only.Create a new instance of the client from a base URL and the stop_gap
.
sourcepub fn with_agent(self, agent: Agent) -> Self
Available on crate feature esplora
only.
pub fn with_agent(self, agent: Agent) -> Self
esplora
only.Set the inner ureq
agent.
sourcepub fn with_concurrency(self, concurrency: u8) -> Self
Available on crate feature esplora
only.
pub fn with_concurrency(self, concurrency: u8) -> Self
esplora
only.Set the number of parallel requests the client can make.
Trait Implementations
sourceimpl Blockchain for EsploraBlockchain
Available on crate feature esplora
only.
impl Blockchain for EsploraBlockchain
Available on crate feature
esplora
only.sourcefn get_capabilities(&self) -> HashSet<Capability>
fn get_capabilities(&self) -> HashSet<Capability>
Return the set of Capability
supported by this backend
sourceimpl ConfigurableBlockchain for EsploraBlockchain
Available on crate feature esplora
only.
impl ConfigurableBlockchain for EsploraBlockchain
Available on crate feature
esplora
only.type Config = EsploraBlockchainConfig
type Config = EsploraBlockchainConfig
Type that contains the configuration
sourcefn from_config(config: &Self::Config) -> Result<Self, Error>
fn from_config(config: &Self::Config) -> Result<Self, Error>
Create a new instance given a configuration
sourceimpl Debug for EsploraBlockchain
Available on crate feature esplora
only.
impl Debug for EsploraBlockchain
Available on crate feature
esplora
only.sourceimpl From<EsploraBlockchain> for AnyBlockchain
impl From<EsploraBlockchain> for AnyBlockchain
sourcefn from(inner: EsploraBlockchain) -> Self
fn from(inner: EsploraBlockchain) -> Self
Converts to this type from the input type.
sourceimpl GetHeight for EsploraBlockchain
Available on crate feature esplora
only.
impl GetHeight for EsploraBlockchain
Available on crate feature
esplora
only.sourcefn get_height(&self) -> Result<u32, Error>
fn get_height(&self) -> Result<u32, Error>
Return the current height
sourceimpl GetTx for EsploraBlockchain
Available on crate feature esplora
only.
impl GetTx for EsploraBlockchain
Available on crate feature
esplora
only.sourceimpl WalletSync for EsploraBlockchain
Available on crate feature esplora
only.
impl WalletSync for EsploraBlockchain
Available on crate feature
esplora
only.sourcefn 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
sourcefn 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
impl StatelessBlockchain for EsploraBlockchain
Available on crate feature
esplora
only.Auto Trait Implementations
impl !RefUnwindSafe for EsploraBlockchain
impl Send for EsploraBlockchain
impl Sync for EsploraBlockchain
impl Unpin for EsploraBlockchain
impl !UnwindSafe for EsploraBlockchain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more