DotNetLightning


FeatureBits Type

Feature bits described in BOLT 9 Use HasFeature to see if it has specific feature or not.

Instance members

Instance member Description

this.CompareTo

Full Usage: this.CompareTo

Parameters:
Returns: int
o : FeatureBits
Returns: int

this.Equals

Full Usage: this.Equals

Parameters:
Returns: bool
o : FeatureBits
Returns: bool

this.HasFeature

Full Usage: this.HasFeature

Parameters:
Returns: bool

If second argument is not specified. It will check both mandatory and optional and return true if either bit is set.

f : Feature
?featureType : FeaturesSupport
Returns: bool

this.PrettyPrint

Full Usage: this.PrettyPrint

Returns: string

Returns human-readable string for which feature it has, and it is mandatory or not.

Returns: string

this.SetFeature

Full Usage: this.SetFeature

Parameters:
Returns: FeatureBits
feature : Feature
support : FeaturesSupport
on : bool
Returns: FeatureBits

this.ToByteArray

Full Usage: this.ToByteArray

Returns: byte[]
Returns: byte[]

this.ToHex

Full Usage: this.ToHex

Returns: string
Returns: string

Static members

Static member Description

FeatureBits.CreateUnsafe(ba)

Full Usage: FeatureBits.CreateUnsafe(ba)

Parameters:
Returns: FeatureBits
ba : BitArray
Returns: FeatureBits

FeatureBits.CreateUnsafe(bytes)

Full Usage: FeatureBits.CreateUnsafe(bytes)

Parameters:
    bytes : byte array

Returns: FeatureBits

Throws FormatException TODO: ugliness of this method is caused by binary serialization throws error instead of returning Result We should refactor serialization altogether at some point

bytes : byte array
Returns: FeatureBits

FeatureBits.CreateUnsafe(v)

Full Usage: FeatureBits.CreateUnsafe(v)

Parameters:
    v : int64

Returns: FeatureBits
v : int64
Returns: FeatureBits

FeatureBits.ParseHex(str)

Full Usage: FeatureBits.ParseHex(str)

Parameters:
    str : string

Returns: Result<FeatureBits, FeatureError>
str : string
Returns: Result<FeatureBits, FeatureError>

FeatureBits.ParseHexUnsafe(str)

Full Usage: FeatureBits.ParseHexUnsafe(str)

Parameters:
    str : string

Returns: FeatureBits
str : string
Returns: FeatureBits

FeatureBits.TryCreate(v)

Full Usage: FeatureBits.TryCreate(v)

Parameters:
    v : int64

Returns: Result<FeatureBits, FeatureError>
v : int64
Returns: Result<FeatureBits, FeatureError>

FeatureBits.TryCreate(bytes)

Full Usage: FeatureBits.TryCreate(bytes)

Parameters:
    bytes : byte array

Returns: Result<FeatureBits, FeatureError>
bytes : byte array
Returns: Result<FeatureBits, FeatureError>

FeatureBits.TryCreate(ba)

Full Usage: FeatureBits.TryCreate(ba)

Parameters:
Returns: Result<FeatureBits, FeatureError>
ba : BitArray
Returns: Result<FeatureBits, FeatureError>

FeatureBits.TryParse(str)

Full Usage: FeatureBits.TryParse(str)

Parameters:
    str : string

Returns: Result<FeatureBits, string>

Parse from bit-array string. returns result.

str : string
Returns: Result<FeatureBits, string>

FeatureBits.Zero

Full Usage: FeatureBits.Zero

Returns: FeatureBits
Returns: FeatureBits