logo
pub struct EsploraBlockchain { /* private fields */ }
This is supported 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

Create a new instance of the client from a base URL and the stop_gap.

Build a new instance given a client

Set the number of parallel requests the client can make.

Methods from Deref<Target = BlockingClient>

Get a [Transaction] option given its [Txid]

Get a [Transaction] given its [Txid].

Get a [Txid] of a transaction given its index in a block with a given hash.

Get the status of a [Transaction] given its [Txid].

👎 Deprecated since 0.1.2:

Deprecated to improve alignment with Esplora API. Users should use get_block_hash and get_header_by_hash methods directly.

Get a [BlockHeader] given a particular block height.

Get a [BlockHeader] given a particular block hash.

Get the [BlockStatus] given a particular [BlockHash].

Get a merkle inclusion proof for a [Transaction] with the given [Txid].

Get the spending status of an output given a [Txid] and the output index.

Broadcast a [Transaction] to Esplora

Get the height of the current blockchain tip.

Get the [BlockHash] of the current blockchain tip.

Get the [BlockHash] of a specific block height

Get an map where the key is the confirmation target (in number of blocks) and the value is the estimated feerate (in sat/vB).

Get confirmed transaction history for the specified address/scripthash, sorted with newest first. Returns 25 transactions per page. More can be requested by specifying the last txid seen by the previous query.

Trait Implementations

Return the set of Capability supported by this backend

Broadcast a transaction

Estimate the fee rate required to confirm a transaction in a given target of blocks

Type that contains the configuration

Create a new instance given a configuration

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Performs the conversion.

fetch block hash given its height

Return the current height

Fetch a transaction given its txid

Setup the backend and populate the internal database for the first time Read more

If not overridden, it defaults to calling Self::wallet_setup internally. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.