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_scid_privacy()Checks if this feature is required.booleanrequires_static_remote_key()Checks if this feature is required.booleanrequires_unknown_bits()Returns true if this `Features` object contains unknown feature flags which are set as \"required\".booleanrequires_zero_conf()Checks if this feature is required.voidset_scid_privacy_optional()Set this feature as optional.voidset_scid_privacy_required()Set this feature as required.voidset_static_remote_key_optional()Set this feature as optional.voidset_static_remote_key_required()Set this feature as required.voidset_zero_conf_optional()Set this feature as optional.voidset_zero_conf_required()Set this feature as required.booleansupports_scid_privacy()Checks if this feature is supported.booleansupports_static_remote_key()Checks if this feature is supported.booleansupports_zero_conf()Checks if this feature is supported.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
-
set_static_remote_key_optional
public void set_static_remote_key_optional()
Set this feature as optional.
-
set_static_remote_key_required
public void set_static_remote_key_required()
Set this feature as required.
-
supports_static_remote_key
public boolean supports_static_remote_key()
Checks if this feature is supported.
-
requires_static_remote_key
public boolean requires_static_remote_key()
Checks if this feature is required.
-
set_scid_privacy_optional
public void set_scid_privacy_optional()
Set this feature as optional.
-
set_scid_privacy_required
public void set_scid_privacy_required()
Set this feature as required.
-
supports_scid_privacy
public boolean supports_scid_privacy()
Checks if this feature is supported.
-
requires_scid_privacy
public boolean requires_scid_privacy()
Checks if this feature is required.
-
set_zero_conf_optional
public void set_zero_conf_optional()
Set this feature as optional.
-
set_zero_conf_required
public void set_zero_conf_required()
Set this feature as required.
-
supports_zero_conf
public boolean supports_zero_conf()
Checks if this feature is supported.
-
requires_zero_conf
public boolean requires_zero_conf()
Checks if this feature is required.
-
-