Struct bdk::blockchain::esplora::EsploraBlockchain
source · [−]pub struct EsploraBlockchain { /* private fields */ }
Available on crate feature
esplora
only.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
pub fn new(base_url: &str, stop_gap: usize) -> Self
Create a new instance of the client from a base URL and the stop_gap
.
sourcepub fn with_agent(self, agent: Agent) -> Self
pub fn with_agent(self, agent: Agent) -> Self
Set the inner ureq
agent.
sourcepub fn with_concurrency(self, concurrency: u8) -> Self
pub fn with_concurrency(self, concurrency: u8) -> Self
Set the number of parallel requests the client can make.
Trait Implementations
sourceimpl Blockchain for EsploraBlockchain
impl Blockchain for EsploraBlockchain
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
impl ConfigurableBlockchain for EsploraBlockchain
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
impl Debug for EsploraBlockchain
sourceimpl Deref for EsploraBlockchain
impl Deref for EsploraBlockchain
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 GetBlockHash for EsploraBlockchain
impl GetBlockHash for EsploraBlockchain
sourceimpl GetHeight for EsploraBlockchain
impl GetHeight for EsploraBlockchain
sourcefn get_height(&self) -> Result<u32, Error>
fn get_height(&self) -> Result<u32, Error>
Return the current height
sourceimpl GetTx for EsploraBlockchain
impl GetTx for EsploraBlockchain
sourceimpl WalletSync for EsploraBlockchain
impl WalletSync for EsploraBlockchain
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
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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