Class EsploraClient

  • All Implemented Interfaces:
    java.lang.AutoCloseable , org.bitcoindevkit.Disposable , org.bitcoindevkit.EsploraClientInterface

    public class EsploraClient
     implements Disposable, AutoCloseable, EsploraClientInterface
                        

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

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      EsploraClient(Pointer pointer)
      EsploraClient(NoPointer noPointer) This constructor can be used to instantiate a fake object.
      EsploraClient(String url) Creates a new bdk client from a esplora_client::BlockingClient
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • EsploraClient

        EsploraClient(Pointer pointer)
      • EsploraClient

        EsploraClient(NoPointer noPointer)
        This constructor can be used to instantiate a fake object.
      • EsploraClient

        EsploraClient(String url)
        Creates a new bdk client from a esplora_client::BlockingClient
    • Method Detail

      • fullScan

         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

         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

         UInt getHeight()

        Get the height of the current blockchain tip.

      • sync

         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.