Class Shutdown


  • public class Shutdown
    extends Object
    A [`shutdown`] message to be sent to or received from a peer. [`shutdown`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#closing-initiation-shutdown
    • Method Detail

      • get_channel_id

        public byte[] get_channel_id()
        The channel ID
      • set_channel_id

        public void set_channel_id​(byte[] val)
        The channel ID
      • get_scriptpubkey

        public byte[] get_scriptpubkey()
        The destination of this peer's funds on closing. Must be in one of these forms: P2PKH, P2SH, P2WPKH, P2WSH, P2TR.
      • set_scriptpubkey

        public void set_scriptpubkey​(byte[] val)
        The destination of this peer's funds on closing. Must be in one of these forms: P2PKH, P2SH, P2WPKH, P2WSH, P2TR.
      • of

        public static Shutdown of​(byte[] channel_id_arg,
                                  byte[] scriptpubkey_arg)
        Constructs a new Shutdown given each field
      • clone

        public Shutdown clone()
        Creates a copy of the Shutdown
        Overrides:
        clone in class Object
      • eq

        public boolean eq​(Shutdown b)
        Checks if two Shutdowns contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • write

        public byte[] write()
        Serialize the Shutdown object into a byte array which can be read by Shutdown_read