Interface ClientInterface

  • All Implemented Interfaces:

    public interface ClientInterface
    
                        

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

    • 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 addRevealedScripts(Wallet wallet) Add scripts for the node to watch for as they are revealed.
      abstract Unit broadcast(Transaction transaction) Broadcast a transaction to the network, erroring if the node has stopped running.
      abstract Boolean isRunning() Check if the node is still running in the background.
      abstract FeeRate minBroadcastFeerate() The minimum fee rate required to broadcast a transcation to all connected peers.
      abstract Log nextLog() Return the next available log message from a node.
      abstract Warning nextWarning() Return the next available warning message from a node.
      abstract Unit shutdown() Stop the `LightNode`.
      abstract Update update() Return an `Update`.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • addRevealedScripts

         abstract 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

         abstract Unit broadcast(Transaction transaction)

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

      • isRunning

         abstract Boolean isRunning()

        Check if the node is still running in the background.

      • minBroadcastFeerate

         abstract FeeRate minBroadcastFeerate()

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

      • nextLog

         abstract Log nextLog()

        Return the next available log 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 `LightNode`. 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.