DotNetLightning


LNECDSASignature Type

Wrapper around NBitcoin's ECDSASignature type for convenience. It has following difference 1. It is equatable 2. Some Convenience methods for serialization 3. Custom ToString

Union cases

Union case Description

Empty

Full Usage: Empty

LNECDSASignature ECDSASignature

Full Usage: LNECDSASignature ECDSASignature

Parameters:
Item : ECDSASignature

Instance members

Instance member Description

this.AsString

Full Usage: this.AsString

Returns: string
Returns: string

this.CompareTo

Full Usage: this.CompareTo

Parameters:
Returns: int

Logic does not really matter here. This is just for making life easier by enabling automatic implementation of StructuralComparison for wrapper types.

e : LNECDSASignature
Returns: int

this.ToBytesCompact

Full Usage: this.ToBytesCompact

Returns: byte[]

** Description **

Bitcoin Layer 1 forces (by consensus) DER encoding for the signatures. This is not optimal, but remaining as a rule since changing consensus is not easy. However in layer2, there are no such rules. So we use more optimal serialization by This function. Note it does not include the recovery id. so its always 64 bytes

Output

(serialized R value + S value) in byte array.

Returns: byte[]

this.ToDER

Full Usage: this.ToDER

Returns: byte[]
Returns: byte[]

this.Value

Full Usage: this.Value

Returns: ECDSASignature
Returns: ECDSASignature

Static members

Static member Description

LNECDSASignature.FromBytesCompact(bytes, ?withRecId)

Full Usage: LNECDSASignature.FromBytesCompact(bytes, ?withRecId)

Parameters:
    bytes : byte array
    ?withRecId : bool

Returns: LNECDSASignature

Read 64 bytes as r(32 bytes) and s(32 bytes) value If withRecId is true, skip first 1 byte

bytes : byte array
?withRecId : bool
Returns: LNECDSASignature

op_Implicitec

Full Usage: op_Implicitec

Parameters:
Returns: LNECDSASignature
ec : ECDSASignature
Returns: LNECDSASignature