Package org.ldk.structs
Class ChannelTypeFeatures
- java.lang.Object
-
- org.ldk.structs.ChannelTypeFeatures
-
public class ChannelTypeFeatures extends Object
Features used within the channel_type field in an OpenChannel message. A channel is always of some known \"type\", describing the transaction formats used and the exact semantics of our interaction with our peer. Note that because a channel is a specific type which is proposed by the opener and accepted by the counterparty, only required features are allowed here. This is serialized differently from other feature types - it is not prefixed by a length, and thus must only appear inside a TLV where its length is known in advance.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelTypeFeaturesclone()Creates a copy of the ChannelTypeFeaturesstatic ChannelTypeFeaturesempty()Create a blank Features with no features setbooleaneq(ChannelTypeFeatures b)Checks if two ChannelTypeFeaturess contain equal inner contents.booleanequals(Object o)protected voidfinalize()static ChannelTypeFeaturesknown()Creates a Features with the bits set which are known by the implementationstatic Result_ChannelTypeFeaturesDecodeErrorZread(byte[] ser)Read a ChannelTypeFeatures from a byte array, created by ChannelTypeFeatures_writebooleanrequires_unknown_bits()Returns true if this `Features` object contains unknown feature flags which are set as \"required\".byte[]write()Serialize the ChannelTypeFeatures object into a byte array which can be read by ChannelTypeFeatures_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
eq
public boolean eq(ChannelTypeFeatures b)
Checks if two ChannelTypeFeaturess 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.
-
clone
public ChannelTypeFeatures clone()
Creates a copy of the ChannelTypeFeatures
-
empty
public static ChannelTypeFeatures empty()
Create a blank Features with no features set
-
known
public static ChannelTypeFeatures known()
Creates a Features with the bits set which are known by the implementation
-
requires_unknown_bits
public boolean requires_unknown_bits()
Returns true if this `Features` object contains unknown feature flags which are set as \"required\".
-
write
public byte[] write()
Serialize the ChannelTypeFeatures object into a byte array which can be read by ChannelTypeFeatures_read
-
read
public static Result_ChannelTypeFeaturesDecodeErrorZ read(byte[] ser)
Read a ChannelTypeFeatures from a byte array, created by ChannelTypeFeatures_write
-
-