Class Client

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

    public class Client
     implements Disposable, AutoCloseable, ClientInterface
                        

    A `Client` handles wallet updates from a `LightNode`.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Client(Pointer pointer)
      Client(NoPointer noPointer) This constructor can be used to instantiate a fake object.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • Client

        Client(Pointer pointer)
      • Client

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

      • addRevealedScripts

         Unit addRevealedScripts(Wallet wallet)

        Add scripts for the node to watch for as they are revealed. Typically used after creating a transaction or revealing a receive address.

        Note that only future blocks will be checked for these scripts, not past blocks.

      • broadcast

         Unit broadcast(Transaction transaction)

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

      • isRunning

         Boolean isRunning()

        Check if the node is still running in the background.

      • minBroadcastFeerate

         FeeRate minBroadcastFeerate()

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

      • nextLog

         Log nextLog()

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

      • nextWarning

         Warning nextWarning()

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

      • shutdown

         Unit shutdown()

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

      • update

         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.