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 ChannelTypeFeatures
clone()
Creates a copy of the ChannelTypeFeaturesstatic ChannelTypeFeatures
empty()
Create a blank Features with no features setboolean
eq(ChannelTypeFeatures b)
Checks if two ChannelTypeFeaturess contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
static Result_ChannelTypeFeaturesDecodeErrorZ
read(byte[] ser)
Read a ChannelTypeFeatures from a byte array, created by ChannelTypeFeatures_writeboolean
requires_anchors_zero_fee_htlc_tx()
Checks if this feature is required.boolean
requires_scid_privacy()
Checks if this feature is required.boolean
requires_static_remote_key()
Checks if this feature is required.boolean
requires_unknown_bits()
Returns true if this `Features` object contains unknown feature flags which are set as \"required\".boolean
requires_zero_conf()
Checks if this feature is required.void
set_anchors_zero_fee_htlc_tx_optional()
Set this feature as optional.void
set_anchors_zero_fee_htlc_tx_required()
Set this feature as required.void
set_scid_privacy_optional()
Set this feature as optional.void
set_scid_privacy_required()
Set this feature as required.void
set_static_remote_key_optional()
Set this feature as optional.void
set_static_remote_key_required()
Set this feature as required.void
set_zero_conf_optional()
Set this feature as optional.void
set_zero_conf_required()
Set this feature as required.boolean
supports_anchors_zero_fee_htlc_tx()
Checks if this feature is supported.boolean
supports_scid_privacy()
Checks if this feature is supported.boolean
supports_static_remote_key()
Checks if this feature is supported.boolean
supports_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
-
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_anchors_zero_fee_htlc_tx_optional
public void set_anchors_zero_fee_htlc_tx_optional()
Set this feature as optional.
-
set_anchors_zero_fee_htlc_tx_required
public void set_anchors_zero_fee_htlc_tx_required()
Set this feature as required.
-
supports_anchors_zero_fee_htlc_tx
public boolean supports_anchors_zero_fee_htlc_tx()
Checks if this feature is supported.
-
requires_anchors_zero_fee_htlc_tx
public boolean requires_anchors_zero_fee_htlc_tx()
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.
-
-