pub struct EsploraProvider {
pub esplora_url: String,
pub network: SimplicityNetwork,
pub timeout: Duration,
}Expand description
A provider implementation that interacts with the Esplora REST API backend.
Fields§
§esplora_url: StringThe base URL of the Esplora REST API.
network: SimplicityNetworkThe currently configured Simplicity network (e.g. Liquid, Testnet, Regtest).
timeout: DurationTimeout duration used in underlying HTTP requests.
Implementations§
Source§impl EsploraProvider
impl EsploraProvider
Sourcepub fn new(url: String, network: SimplicityNetwork) -> EsploraProvider
pub fn new(url: String, network: SimplicityNetwork) -> EsploraProvider
Creates a new EsploraProvider connected to the provided endpoint targeting the specific network.
Trait Implementations§
Source§impl Debug for EsploraProvider
impl Debug for EsploraProvider
Source§impl ProviderTrait for EsploraProvider
impl ProviderTrait for EsploraProvider
Source§fn get_network(&self) -> &SimplicityNetwork
fn get_network(&self) -> &SimplicityNetwork
Retrieves the network configured for this provider.
Source§fn broadcast_transaction(
&self,
tx: &Transaction,
) -> Result<TxReceipt<'_>, ProviderError>
fn broadcast_transaction( &self, tx: &Transaction, ) -> Result<TxReceipt<'_>, ProviderError>
Attempts to broadcast a fully compiled transaction to the configured backend. Read more
Source§fn wait(&self, txid: &Txid) -> Result<(), ProviderError>
fn wait(&self, txid: &Txid) -> Result<(), ProviderError>
Blocks and repeatedly polls the network until the specified transaction receives its first confirmation. Read more
Source§fn fetch_tip_height(&self) -> Result<u32, ProviderError>
fn fetch_tip_height(&self) -> Result<u32, ProviderError>
Retrieves the current block height of the network tip. Read more
Source§fn fetch_tip_timestamp(&self) -> Result<u64, ProviderError>
fn fetch_tip_timestamp(&self) -> Result<u64, ProviderError>
Retrieves the block timestamp representing network consensus clock tip. Read more
Source§fn fetch_transaction(&self, txid: &Txid) -> Result<Transaction, ProviderError>
fn fetch_transaction(&self, txid: &Txid) -> Result<Transaction, ProviderError>
Retrieves the serialized transaction payload given its hex transaction ID. Read more
Source§fn fetch_address_utxos(
&self,
address: &Address,
) -> Result<Vec<UTXO>, ProviderError>
fn fetch_address_utxos( &self, address: &Address, ) -> Result<Vec<UTXO>, ProviderError>
Fetches all active unspent transaction outputs correlated to a particular public
Address. Read moreSource§fn fetch_scripthash_utxos(
&self,
script: &Script,
) -> Result<Vec<UTXO>, ProviderError>
fn fetch_scripthash_utxos( &self, script: &Script, ) -> Result<Vec<UTXO>, ProviderError>
Fetches all active unspent transaction outputs correlated to a given custom
Script mapping. Read moreSource§fn fetch_fee_estimates(&self) -> Result<HashMap<String, f64>, ProviderError>
fn fetch_fee_estimates(&self) -> Result<HashMap<String, f64>, ProviderError>
Fetches network fee estimation models based on varying target confirmation block delays. Read more
Source§fn fetch_fee_rate(&self, target_blocks: u32) -> Result<f32, ProviderError>
fn fetch_fee_rate(&self, target_blocks: u32) -> Result<f32, ProviderError>
Attempts to extract the specific fee rate (in sats/kvb) necessary for the transaction to be confirmed within
target_blocks. Read moreAuto Trait Implementations§
impl Freeze for EsploraProvider
impl RefUnwindSafe for EsploraProvider
impl Send for EsploraProvider
impl Sync for EsploraProvider
impl Unpin for EsploraProvider
impl UnsafeUnpin for EsploraProvider
impl UnwindSafe for EsploraProvider
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more