EsploraClient

Wrapper around an esplora_client::BlockingClient which includes an internal in-memory transaction cache to avoid re-fetching already downloaded transactions.

Constructors

Link copied to clipboard
constructor(pointer: Pointer)
constructor(noPointer: NoPointer)

This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.

constructor(url: String, proxy: String? = null)

Creates a new bdk client from an esplora_client::BlockingClient. Optional: Set the proxy of the builder.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun broadcast(transaction: Transaction)

Broadcast a `Transaction` to Esplora.

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun fullScan(request: FullScanRequest, stopGap: ULong, parallelRequests: ULong): Update

Scan keychain scripts for transactions against Esplora, returning an update that can be applied to the receiving structures.

Link copied to clipboard
open override fun getBlockHash(blockHeight: UInt): String

Get the `BlockHash` of a specific block height.

Link copied to clipboard
open override fun getFeeEstimates(): Map<UShort, Double>

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

Link copied to clipboard
open override fun getHeight(): UInt

Get the height of the current blockchain tip.

Link copied to clipboard
open override fun getTx(txid: String): Transaction?

Get a `Transaction` option given its `Txid`.

Link copied to clipboard
open override fun getTxInfo(txid: String): Tx?

Get transaction info given its `Txid`.

Link copied to clipboard
open override fun getTxStatus(txid: String): TxStatus

Get the status of a `Transaction` given its `Txid`.

Link copied to clipboard
open override fun sync(request: SyncRequest, parallelRequests: ULong): Update

Sync a set of scripts, txids, and/or outpoints against Esplora.

Link copied to clipboard
fun uniffiClonePointer(): Pointer