Package org.ldk.structs
Class BlindedHopFeatures
- java.lang.Object
-
- org.ldk.structs.BlindedHopFeatures
-
public class BlindedHopFeatures extends Object
Features used within BOLT 4 encrypted_data_tlv and BOLT 12 blinded_payinfo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlindedHopFeaturesclone()Creates a copy of the BlindedHopFeaturesstatic BlindedHopFeaturesempty()Create a blank Features with no features setbooleaneq(BlindedHopFeatures b)Checks if two BlindedHopFeaturess contain equal inner contents.booleanequals(Object o)protected voidfinalize()static Result_BlindedHopFeaturesDecodeErrorZread(byte[] ser)Read a BlindedHopFeatures from a byte array, created by BlindedHopFeatures_writebooleanrequires_unknown_bits()Returns true if this `Features` object contains unknown feature flags which are set as \"required\".booleanrequires_unknown_bits_from(BlindedHopFeatures other)Returns true if this `Features` object contains required features unknown by `other`.Result_NoneNoneZset_optional_custom_bit(long bit)Sets an optional custom feature bit.Result_NoneNoneZset_optional_feature_bit(long bit)Sets an optional feature bit.Result_NoneNoneZset_required_custom_bit(long bit)Sets a required custom feature bit.Result_NoneNoneZset_required_feature_bit(long bit)Sets a required feature bit.byte[]write()Serialize the BlindedHopFeatures object into a byte array which can be read by BlindedHopFeatures_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
eq
public boolean eq(BlindedHopFeatures b)
Checks if two BlindedHopFeaturess 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 BlindedHopFeatures clone()
Creates a copy of the BlindedHopFeatures
-
empty
public static BlindedHopFeatures empty()
Create a blank Features with no features set
-
requires_unknown_bits_from
public boolean requires_unknown_bits_from(BlindedHopFeatures other)
Returns true if this `Features` object contains required features unknown by `other`.
-
requires_unknown_bits
public boolean requires_unknown_bits()
Returns true if this `Features` object contains unknown feature flags which are set as \"required\".
-
set_required_feature_bit
public Result_NoneNoneZ set_required_feature_bit(long bit)
Sets a required feature bit. Errors if `bit` is outside the feature range as defined by [BOLT 9]. Note: Required bits are even. If an odd bit is given, then the corresponding even bit will be set instead (i.e., `bit - 1`). [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
-
set_optional_feature_bit
public Result_NoneNoneZ set_optional_feature_bit(long bit)
Sets an optional feature bit. Errors if `bit` is outside the feature range as defined by [BOLT 9]. Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be set instead (i.e., `bit + 1`). [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
-
set_required_custom_bit
public Result_NoneNoneZ set_required_custom_bit(long bit)
Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined by [bLIP 2] or if it is a known `T` feature. Note: Required bits are even. If an odd bit is given, then the corresponding even bit will be set instead (i.e., `bit - 1`). [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
-
set_optional_custom_bit
public Result_NoneNoneZ set_optional_custom_bit(long bit)
Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined by [bLIP 2] or if it is a known `T` feature. Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be set instead (i.e., `bit + 1`). [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
-
write
public byte[] write()
Serialize the BlindedHopFeatures object into a byte array which can be read by BlindedHopFeatures_read
-
read
public static Result_BlindedHopFeaturesDecodeErrorZ read(byte[] ser)
Read a BlindedHopFeatures from a byte array, created by BlindedHopFeatures_write
-
-