Package org.ldk.structs
Class NodeAnnouncement
- java.lang.Object
-
- org.ldk.structs.NodeAnnouncement
-
public class NodeAnnouncement extends Object
A [`node_announcement`] message to be sent to or received from a peer. [`node_announcement`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-node_announcement-message
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeAnnouncement
clone()
Creates a copy of the NodeAnnouncementboolean
eq(NodeAnnouncement b)
Checks if two NodeAnnouncements contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
UnsignedNodeAnnouncement
get_contents()
The actual content of the announcementbyte[]
get_signature()
The signature by the node keystatic NodeAnnouncement
of(byte[] signature_arg, UnsignedNodeAnnouncement contents_arg)
Constructs a new NodeAnnouncement given each fieldstatic Result_NodeAnnouncementDecodeErrorZ
read(byte[] ser)
Read a NodeAnnouncement from a byte array, created by NodeAnnouncement_writevoid
set_contents(UnsignedNodeAnnouncement val)
The actual content of the announcementvoid
set_signature(byte[] val)
The signature by the node keybyte[]
write()
Serialize the NodeAnnouncement object into a byte array which can be read by NodeAnnouncement_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_signature
public byte[] get_signature()
The signature by the node key
-
set_signature
public void set_signature(byte[] val)
The signature by the node key
-
get_contents
public UnsignedNodeAnnouncement get_contents()
The actual content of the announcement
-
set_contents
public void set_contents(UnsignedNodeAnnouncement val)
The actual content of the announcement
-
of
public static NodeAnnouncement of(byte[] signature_arg, UnsignedNodeAnnouncement contents_arg)
Constructs a new NodeAnnouncement given each field
-
clone
public NodeAnnouncement clone()
Creates a copy of the NodeAnnouncement
-
eq
public boolean eq(NodeAnnouncement b)
Checks if two NodeAnnouncements 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 NodeAnnouncement object into a byte array which can be read by NodeAnnouncement_read
-
read
public static Result_NodeAnnouncementDecodeErrorZ read(byte[] ser)
Read a NodeAnnouncement from a byte array, created by NodeAnnouncement_write
-
-