pub struct AsyncClient<S = DefaultSleeper> { /* private fields */ }Implementations§
Source§impl<S: Sleeper> AsyncClient<S>
impl<S: Sleeper> AsyncClient<S>
Sourcepub fn from_builder(builder: Builder) -> Result<Self, Error>
pub fn from_builder(builder: Builder) -> Result<Self, Error>
Build an async client from a builder
pub fn from_client(url: String, client: Client) -> Self
Sourcepub async fn get_tx(&self, txid: &Txid) -> Result<Option<Transaction>, Error>
pub async fn get_tx(&self, txid: &Txid) -> Result<Option<Transaction>, Error>
Get a Transaction option given its Txid
Sourcepub async fn get_tx_no_opt(&self, txid: &Txid) -> Result<Transaction, Error>
pub async fn get_tx_no_opt(&self, txid: &Txid) -> Result<Transaction, Error>
Get a Transaction given its Txid.
Sourcepub async fn waterfalls(
&self,
descriptor: &str,
) -> Result<WaterfallResponse, Error>
pub async fn waterfalls( &self, descriptor: &str, ) -> Result<WaterfallResponse, Error>
Query the waterfalls endpoint with a descriptor
Sourcepub async fn waterfalls_addresses(
&self,
addresses: &[Address],
) -> Result<WaterfallResponse, Error>
pub async fn waterfalls_addresses( &self, addresses: &[Address], ) -> Result<WaterfallResponse, Error>
Query the waterfalls endpoint with addresses
Sourcepub async fn waterfalls_version(
&self,
descriptor: &str,
version: u8,
page: Option<u32>,
to_index: Option<u32>,
utxo_only: bool,
) -> Result<WaterfallResponse, Error>
pub async fn waterfalls_version( &self, descriptor: &str, version: u8, page: Option<u32>, to_index: Option<u32>, utxo_only: bool, ) -> Result<WaterfallResponse, Error>
Query waterfalls with version-specific parameters
Sourcepub async fn get_header_by_hash(
&self,
block_hash: &BlockHash,
) -> Result<BlockHeader, Error>
pub async fn get_header_by_hash( &self, block_hash: &BlockHash, ) -> Result<BlockHeader, Error>
Get a BlockHeader given a particular block hash.
Sourcepub async fn server_recipient(&self) -> Result<String, Error>
pub async fn server_recipient(&self) -> Result<String, Error>
Get the server’s public key for encryption
Sourcepub async fn server_address(&self) -> Result<String, Error>
pub async fn server_address(&self) -> Result<String, Error>
Get the server’s address for message signing verification
Sourcepub async fn time_since_last_block(&self) -> Result<String, Error>
pub async fn time_since_last_block(&self) -> Result<String, Error>
Get time since last block with freshness indicator
Sourcepub async fn broadcast(&self, transaction: &Transaction) -> Result<(), Error>
pub async fn broadcast(&self, transaction: &Transaction) -> Result<(), Error>
Broadcast a Transaction to Waterfalls
Sourcepub async fn get_tip_hash(&self) -> Result<BlockHash, Error>
pub async fn get_tip_hash(&self) -> Result<BlockHash, Error>
Get the BlockHash of the current blockchain tip.
Sourcepub async fn get_block_hash(
&self,
block_height: u32,
) -> Result<BlockHash, Error>
pub async fn get_block_hash( &self, block_height: u32, ) -> Result<BlockHash, Error>
Get the BlockHash of a specific block height
Trait Implementations§
Source§impl<S: Clone> Clone for AsyncClient<S>
impl<S: Clone> Clone for AsyncClient<S>
Source§fn clone(&self) -> AsyncClient<S>
fn clone(&self) -> AsyncClient<S>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<S> Freeze for AsyncClient<S>
impl<S = DefaultSleeper> !RefUnwindSafe for AsyncClient<S>
impl<S> Send for AsyncClient<S>where
S: Send,
impl<S> Sync for AsyncClient<S>where
S: Sync,
impl<S> Unpin for AsyncClient<S>where
S: Unpin,
impl<S = DefaultSleeper> !UnwindSafe for AsyncClient<S>
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