EsploraClientInterface

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

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun broadcast(transaction: Transaction)

Broadcast a `Transaction` to Esplora.

Link copied to clipboard
abstract 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
abstract fun getBlockHash(blockHeight: UInt): String

Get the `BlockHash` of a specific block height.

Link copied to clipboard
abstract 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
abstract fun getHeight(): UInt

Get the height of the current blockchain tip.

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

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

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

Get transaction info given its `Txid`.

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

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

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

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