pub struct EsploraClient { /* private fields */ }
Expand description
Async client for RPC to Esplora block explorer
Implementations§
Source§impl EsploraClient
impl EsploraClient
Sourcepub async fn get<T: for<'a> Deserialize<'a>>(
&self,
path: &str,
) -> Result<T, Error>
pub async fn get<T: for<'a> Deserialize<'a>>( &self, path: &str, ) -> Result<T, Error>
Perform a GET request to the esplora server, decoding the result as JSON
Sourcepub async fn get_raw(&self, path: &str) -> Result<String, Error>
pub async fn get_raw(&self, path: &str) -> Result<String, Error>
Perform a GET request to the esplora server, decoding the result as a string
Trait Implementations§
Source§impl Clone for EsploraClient
impl Clone for EsploraClient
Source§fn clone(&self) -> EsploraClient
fn clone(&self) -> EsploraClient
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EsploraClient
impl Debug for EsploraClient
Source§impl Explorer for EsploraClient
impl Explorer for EsploraClient
Source§fn get_utxo_confirmations<'life0, 'life1, 'async_trait>(
&'life0 self,
txout: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_utxo_confirmations<'life0, 'life1, 'async_trait>(
&'life0 self,
txout: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get number of confirmations when an outpoint is confirmed and unspent
Returns None if the outpoint is not confirmed or is spent
Source§fn broadcast_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 Transaction,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn broadcast_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 Transaction,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Broadcast transaction
Source§fn get_utxo_spending_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
txout: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_utxo_spending_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
txout: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the transaction that spends the given outpoint, if exists in chain
Auto Trait Implementations§
impl Freeze for EsploraClient
impl !RefUnwindSafe for EsploraClient
impl Send for EsploraClient
impl Sync for EsploraClient
impl Unpin for EsploraClient
impl !UnwindSafe for EsploraClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more