Package org.ldk.structs
Class Shutdown
- java.lang.Object
-
- org.ldk.structs.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Shutdown
clone()
Creates a copy of the Shutdownboolean
eq(Shutdown b)
Checks if two Shutdowns contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
byte[]
get_channel_id()
The channel IDbyte[]
get_scriptpubkey()
The destination of this peer's funds on closing.static Shutdown
of(byte[] channel_id_arg, byte[] scriptpubkey_arg)
Constructs a new Shutdown given each fieldstatic Result_ShutdownDecodeErrorZ
read(byte[] ser)
Read a Shutdown from a byte array, created by Shutdown_writevoid
set_channel_id(byte[] val)
The channel IDvoid
set_scriptpubkey(byte[] val)
The destination of this peer's funds on closing.byte[]
write()
Serialize the Shutdown object into a byte array which can be read by Shutdown_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
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
-
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
-
read
public static Result_ShutdownDecodeErrorZ read(byte[] ser)
Read a Shutdown from a byte array, created by Shutdown_write
-
-