Package org.ldk.structs
Class ChannelInfo
- java.lang.Object
-
- org.ldk.structs.ChannelInfo
-
public class ChannelInfo extends Object
Details about a channel (both directions). Received within a channel announcement.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelInfo
clone()
Creates a copy of the ChannelInfoprotected void
finalize()
ChannelAnnouncement
get_announcement_message()
An initial announcement of the channel Mostly redundant with the data we store in fields explicitly.Option_u64Z
get_capacity_sats()
The channel capacity as seen on-chain, if chain lookup is available.ChannelFeatures
get_features()
Protocol features of a channel communicated during its announcementbyte[]
get_node_one()
Source node of the first direction of a channelbyte[]
get_node_two()
Source node of the second direction of a channelDirectionalChannelInfo
get_one_to_two()
Details about the first direction of a channel Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent NoneDirectionalChannelInfo
get_two_to_one()
Details about the second direction of a channel Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent Nonestatic ChannelInfo
of(ChannelFeatures features_arg, byte[] node_one_arg, DirectionalChannelInfo one_to_two_arg, byte[] node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg)
Constructs a new ChannelInfo given each fieldstatic Result_ChannelInfoDecodeErrorZ
read(byte[] ser)
Read a ChannelInfo from a byte array, created by ChannelInfo_writevoid
set_announcement_message(ChannelAnnouncement val)
An initial announcement of the channel Mostly redundant with the data we store in fields explicitly.void
set_capacity_sats(Option_u64Z val)
The channel capacity as seen on-chain, if chain lookup is available.void
set_features(ChannelFeatures val)
Protocol features of a channel communicated during its announcementvoid
set_node_one(byte[] val)
Source node of the first direction of a channelvoid
set_node_two(byte[] val)
Source node of the second direction of a channelvoid
set_one_to_two(DirectionalChannelInfo val)
Details about the first direction of a channel Note that val (or a relevant inner pointer) may be NULL or all-0s to represent Nonevoid
set_two_to_one(DirectionalChannelInfo val)
Details about the second direction of a channel Note that val (or a relevant inner pointer) may be NULL or all-0s to represent Nonebyte[]
write()
Serialize the ChannelInfo object into a byte array which can be read by ChannelInfo_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_features
public ChannelFeatures get_features()
Protocol features of a channel communicated during its announcement
-
set_features
public void set_features(ChannelFeatures val)
Protocol features of a channel communicated during its announcement
-
get_node_one
public byte[] get_node_one()
Source node of the first direction of a channel
-
set_node_one
public void set_node_one(byte[] val)
Source node of the first direction of a channel
-
get_one_to_two
@Nullable public DirectionalChannelInfo get_one_to_two()
Details about the first direction of a channel Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_one_to_two
public void set_one_to_two(@Nullable DirectionalChannelInfo val)
Details about the first direction of a channel Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
get_node_two
public byte[] get_node_two()
Source node of the second direction of a channel
-
set_node_two
public void set_node_two(byte[] val)
Source node of the second direction of a channel
-
get_two_to_one
@Nullable public DirectionalChannelInfo get_two_to_one()
Details about the second direction of a channel Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_two_to_one
public void set_two_to_one(@Nullable DirectionalChannelInfo val)
Details about the second direction of a channel Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
get_capacity_sats
public Option_u64Z get_capacity_sats()
The channel capacity as seen on-chain, if chain lookup is available.
-
set_capacity_sats
public void set_capacity_sats(Option_u64Z val)
The channel capacity as seen on-chain, if chain lookup is available.
-
get_announcement_message
@Nullable public ChannelAnnouncement get_announcement_message()
An initial announcement of the channel 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 ChannelAnnouncement val)
An initial announcement of the channel 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 ChannelInfo of(ChannelFeatures features_arg, byte[] node_one_arg, DirectionalChannelInfo one_to_two_arg, byte[] node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg)
Constructs a new ChannelInfo given each field
-
clone
public ChannelInfo clone()
Creates a copy of the ChannelInfo
-
write
public byte[] write()
Serialize the ChannelInfo object into a byte array which can be read by ChannelInfo_read
-
read
public static Result_ChannelInfoDecodeErrorZ read(byte[] ser)
Read a ChannelInfo from a byte array, created by ChannelInfo_write
-
-