Package 

Interface CbfClientInterface


  • 
    public interface CbfClientInterface
    
                        

    A `CbfClient` handles wallet updates from a `CbfNode`.

    • Method Summary

      Modifier and Type Method Description
      abstract FeeRate averageFeeRate(BlockHash blockhash) Fetch the average fee rate for a block by requesting it from a peer.
      abstract Wtxid broadcast(Transaction transaction) Broadcast a transaction to the network, erroring if the node has stopped running.
      abstract Unit connect(Peer peer) Add another `Peer` to attempt a connection with.
      abstract Boolean isRunning() Check if the node is still running in the background.
      abstract List<IpAddress> lookupHost(String hostname) Query a Bitcoin DNS seeder using the configured resolver.
      abstract FeeRate minBroadcastFeerate() The minimum fee rate required to broadcast a transcation to all connected peers.
      abstract Info nextInfo() Return the next available info message from a node.
      abstract Warning nextWarning() Return the next available warning message from a node.
      abstract Unit shutdown() Stop the `CbfNode`.
      abstract Update update() Return an `Update`.
      • Methods inherited from class java.lang.Object

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

      • averageFeeRate

         abstract FeeRate averageFeeRate(BlockHash blockhash)

        Fetch the average fee rate for a block by requesting it from a peer. Not recommend for resource-limited devices.

      • broadcast

         abstract Wtxid broadcast(Transaction transaction)

        Broadcast a transaction to the network, erroring if the node has stopped running.

      • connect

         abstract Unit connect(Peer peer)

        Add another `Peer` to attempt a connection with.

      • isRunning

         abstract Boolean isRunning()

        Check if the node is still running in the background.

      • lookupHost

         abstract List<IpAddress> lookupHost(String hostname)

        Query a Bitcoin DNS seeder using the configured resolver.

        This is not a generic DNS implementation. Host names are prefixed with a x849 to filter for compact block filter nodes from the seeder. For example dns.myseeder.com will be queried as x849.dns.myseeder.com. This has no guarantee to return any IpAddr.

      • minBroadcastFeerate

         abstract FeeRate minBroadcastFeerate()

        The minimum fee rate required to broadcast a transcation to all connected peers.

      • nextInfo

         abstract Info nextInfo()

        Return the next available info message from a node. If none is returned, the node has stopped.

      • nextWarning

         abstract Warning nextWarning()

        Return the next available warning message from a node. If none is returned, the node has stopped.

      • shutdown

         abstract Unit shutdown()

        Stop the `CbfNode`. Errors if the node is already stopped.

      • update

         abstract Update update()

        Return an `Update`. This is method returns once the node syncs to the rest of the network or a new block has been gossiped.