Package org.ldk.structs
Class ChannelAnnouncement
- java.lang.Object
-
- org.ldk.structs.ChannelAnnouncement
-
public class ChannelAnnouncement extends Object
A [`channel_announcement`] message to be sent to or received from a peer. [`channel_announcement`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelAnnouncement
clone()
Creates a copy of the ChannelAnnouncementboolean
eq(ChannelAnnouncement b)
Checks if two ChannelAnnouncements contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
byte[]
get_bitcoin_signature_1()
Proof of funding UTXO ownership by the first public nodebyte[]
get_bitcoin_signature_2()
Proof of funding UTXO ownership by the second public nodeUnsignedChannelAnnouncement
get_contents()
The actual announcementbyte[]
get_node_signature_1()
Authentication of the announcement by the first public nodebyte[]
get_node_signature_2()
Authentication of the announcement by the second public nodestatic ChannelAnnouncement
of(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, UnsignedChannelAnnouncement contents_arg)
Constructs a new ChannelAnnouncement given each fieldstatic Result_ChannelAnnouncementDecodeErrorZ
read(byte[] ser)
Read a ChannelAnnouncement from a byte array, created by ChannelAnnouncement_writevoid
set_bitcoin_signature_1(byte[] val)
Proof of funding UTXO ownership by the first public nodevoid
set_bitcoin_signature_2(byte[] val)
Proof of funding UTXO ownership by the second public nodevoid
set_contents(UnsignedChannelAnnouncement val)
The actual announcementvoid
set_node_signature_1(byte[] val)
Authentication of the announcement by the first public nodevoid
set_node_signature_2(byte[] val)
Authentication of the announcement by the second public nodebyte[]
write()
Serialize the ChannelAnnouncement object into a byte array which can be read by ChannelAnnouncement_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_node_signature_1
public byte[] get_node_signature_1()
Authentication of the announcement by the first public node
-
set_node_signature_1
public void set_node_signature_1(byte[] val)
Authentication of the announcement by the first public node
-
get_node_signature_2
public byte[] get_node_signature_2()
Authentication of the announcement by the second public node
-
set_node_signature_2
public void set_node_signature_2(byte[] val)
Authentication of the announcement by the second public node
-
get_bitcoin_signature_1
public byte[] get_bitcoin_signature_1()
Proof of funding UTXO ownership by the first public node
-
set_bitcoin_signature_1
public void set_bitcoin_signature_1(byte[] val)
Proof of funding UTXO ownership by the first public node
-
get_bitcoin_signature_2
public byte[] get_bitcoin_signature_2()
Proof of funding UTXO ownership by the second public node
-
set_bitcoin_signature_2
public void set_bitcoin_signature_2(byte[] val)
Proof of funding UTXO ownership by the second public node
-
get_contents
public UnsignedChannelAnnouncement get_contents()
The actual announcement
-
set_contents
public void set_contents(UnsignedChannelAnnouncement val)
The actual announcement
-
of
public static ChannelAnnouncement of(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, UnsignedChannelAnnouncement contents_arg)
Constructs a new ChannelAnnouncement given each field
-
clone
public ChannelAnnouncement clone()
Creates a copy of the ChannelAnnouncement
-
eq
public boolean eq(ChannelAnnouncement b)
Checks if two ChannelAnnouncements 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 ChannelAnnouncement object into a byte array which can be read by ChannelAnnouncement_read
-
read
public static Result_ChannelAnnouncementDecodeErrorZ read(byte[] ser)
Read a ChannelAnnouncement from a byte array, created by ChannelAnnouncement_write
-
-