Package org.ldk.structs
Class NodeAnnouncementInfo
- java.lang.Object
-
- org.ldk.structs.NodeAnnouncementInfo
-
public class NodeAnnouncementInfo extends Object
Information received in the latest node_announcement from this node.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeAnnouncementInfo
clone()
Creates a copy of the NodeAnnouncementInfoprotected void
finalize()
byte[]
get_alias()
Moniker assigned to the node.NodeAnnouncement
get_announcement_message()
An initial announcement of the node Mostly redundant with the data we store in fields explicitly.NodeFeatures
get_features()
Protocol features the node announced support forint
get_last_update()
When the last known update to the node state was issued.byte[]
get_rgb()
Color assigned to the nodestatic NodeAnnouncementInfo
of(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg)
Constructs a new NodeAnnouncementInfo given each fieldstatic Result_NodeAnnouncementInfoDecodeErrorZ
read(byte[] ser)
Read a NodeAnnouncementInfo from a byte array, created by NodeAnnouncementInfo_writevoid
set_addresses(NetAddress[] val)
Internet-level addresses via which one can connect to the nodevoid
set_alias(byte[] val)
Moniker assigned to the node.void
set_announcement_message(NodeAnnouncement val)
An initial announcement of the node Mostly redundant with the data we store in fields explicitly.void
set_features(NodeFeatures val)
Protocol features the node announced support forvoid
set_last_update(int val)
When the last known update to the node state was issued.void
set_rgb(byte[] val)
Color assigned to the nodebyte[]
write()
Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_features
public NodeFeatures get_features()
Protocol features the node announced support for
-
set_features
public void set_features(NodeFeatures val)
Protocol features the node announced support for
-
get_last_update
public int get_last_update()
When the last known update to the node state was issued. Value is opaque, as set in the announcement.
-
set_last_update
public void set_last_update(int val)
When the last known update to the node state was issued. Value is opaque, as set in the announcement.
-
get_rgb
public byte[] get_rgb()
Color assigned to the node
-
set_rgb
public void set_rgb(byte[] val)
Color assigned to the node
-
get_alias
public byte[] get_alias()
Moniker assigned to the node. May be invalid or malicious (eg control chars), should not be exposed to the user.
-
set_alias
public void set_alias(byte[] val)
Moniker assigned to the node. May be invalid or malicious (eg control chars), should not be exposed to the user.
-
set_addresses
public void set_addresses(NetAddress[] val)
Internet-level addresses via which one can connect to the node
-
get_announcement_message
@Nullable public NodeAnnouncement get_announcement_message()
An initial announcement of the node Mostly redundant with the data we store in fields explicitly. Everything else is useful only for sending out for initial routing sync. Not stored if contains excess data to prevent DoS. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_announcement_message
public void set_announcement_message(@Nullable NodeAnnouncement val)
An initial announcement of the node Mostly redundant with the data we store in fields explicitly. Everything else is useful only for sending out for initial routing sync. Not stored if contains excess data to prevent DoS. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
of
public static NodeAnnouncementInfo of(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg)
Constructs a new NodeAnnouncementInfo given each field
-
clone
public NodeAnnouncementInfo clone()
Creates a copy of the NodeAnnouncementInfo
-
write
public byte[] write()
Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
-
read
public static Result_NodeAnnouncementInfoDecodeErrorZ read(byte[] ser)
Read a NodeAnnouncementInfo from a byte array, created by NodeAnnouncementInfo_write
-
-