pub struct MempoolHttpClient { /* private fields */ }Expand description
A MempoolLookup backed by the mempool.space REST API over reqwest.
Cheap to clone (holds an Arc-internal reqwest::Client and the base
URL). Construct with MempoolHttpClient::from_env to honour
JSS_PAY_MEMPOOL_URL, or MempoolHttpClient::new for an explicit base.
Implementations§
Source§impl MempoolHttpClient
impl MempoolHttpClient
Trait Implementations§
Source§impl Clone for MempoolHttpClient
impl Clone for MempoolHttpClient
Source§fn clone(&self) -> MempoolHttpClient
fn clone(&self) -> MempoolHttpClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MempoolHttpClient
impl Debug for MempoolHttpClient
Source§impl MempoolBroadcast for MempoolHttpClient
impl MempoolBroadcast for MempoolHttpClient
Source§fn broadcast_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
raw_hex: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, PaymentError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn broadcast_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
raw_hex: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, PaymentError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
POST
raw_hex to the mempool’s broadcast endpoint; return the txid.Source§impl MempoolLookup for MempoolHttpClient
impl MempoolLookup for MempoolHttpClient
Source§fn address_utxos<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Utxo>, PaymentError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn address_utxos<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Utxo>, PaymentError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return every UTXO currently at
address (confirmed or in-mempool). Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MempoolHttpClient
impl !UnwindSafe for MempoolHttpClient
impl Freeze for MempoolHttpClient
impl Send for MempoolHttpClient
impl Sync for MempoolHttpClient
impl Unpin for MempoolHttpClient
impl UnsafeUnpin for MempoolHttpClient
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