Interface EsploraClientInterface

  • All Implemented Interfaces:

    public interface EsploraClientInterface
    
                        

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

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit broadcast(Transaction transaction) Broadcast a `Transaction` to Esplora.
      abstract Update fullScan(FullScanRequest request, ULong stopGap, ULong parallelRequests) Scan keychain scripts for transactions against Esplora, returning an update that can be applied to the receiving structures.
      abstract String getBlockHash(UInt blockHeight) Get the `BlockHash` of a specific block height
      abstract Map<UShort, Double> getFeeEstimates() Get a map where the key is the confirmation target (in number of blocks) and the value is the estimated feerate (in sat/vB).
      abstract UInt getHeight() Get the height of the current blockchain tip.
      abstract Transaction getTx(String txid) Get a `Transaction` option given its `Txid`.
      abstract Tx getTxInfo(String txid) Get transaction info given it's `Txid`.
      abstract TxStatus getTxStatus(String txid) Get the status of a `Transaction` given its `Txid`.
      abstract Update sync(SyncRequest request, ULong parallelRequests) Sync a set of scripts, txids, and/or outpoints against Esplora.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • fullScan

         abstract Update fullScan(FullScanRequest request, ULong stopGap, ULong parallelRequests)

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

        request provides the data required to perform a script-pubkey-based full scan (see `FullScanRequest`). The full scan for each keychain (K) stops after a gap of stop_gap script pubkeys with no associated transactions. parallel_requests specifies the maximum number of HTTP requests to make in parallel.

      • getFeeEstimates

         abstract Map<UShort, Double> getFeeEstimates()

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

      • getHeight

         abstract UInt getHeight()

        Get the height of the current blockchain tip.

      • getTxInfo

         abstract Tx getTxInfo(String txid)

        Get transaction info given it's `Txid`.

      • sync

         abstract Update sync(SyncRequest request, ULong parallelRequests)

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

        request provides the data required to perform a script-pubkey-based sync (see `SyncRequest`). parallel_requests specifies the maximum number of HTTP requests to make in parallel.