Struct ShortChannelId
- Namespace
- NLightning.Common.Types
- Assembly
- NLightning.Common.dll
Represents a short channel id.
public readonly struct ShortChannelId
- Inherited Members
Remarks
The short channel id is a unique description of the funding transaction.
Constructors
ShortChannelId(byte[])
public ShortChannelId(byte[] value)
Parameters
value
byte[]
ShortChannelId(uint, uint, ushort)
public ShortChannelId(uint blockHeight, uint transactionIndex, ushort outputIndex)
Parameters
Fields
BLOCK_HEIGHT
public readonly uint BLOCK_HEIGHT
Field Value
LENGTH
public const int LENGTH = 8
Field Value
OUTPUT_INDEX
public readonly ushort OUTPUT_INDEX
Field Value
TRANSACTION_INDEX
public readonly uint TRANSACTION_INDEX
Field Value
Methods
DeserializeAsync(Stream)
public static Task<ShortChannelId> DeserializeAsync(Stream stream)
Parameters
stream
Stream
Returns
Equals(ShortChannelId)
public bool Equals(ShortChannelId other)
Parameters
other
ShortChannelId
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Parse(string)
public static ShortChannelId Parse(string shortChannelId)
Parameters
shortChannelId
string
Returns
SerializeAsync(Stream)
public ValueTask SerializeAsync(Stream stream)
Parameters
stream
Stream
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(ShortChannelId, ShortChannelId)
public static bool operator ==(ShortChannelId left, ShortChannelId right)
Parameters
left
ShortChannelIdright
ShortChannelId
Returns
implicit operator byte[](ShortChannelId)
public static implicit operator byte[](ShortChannelId s)
Parameters
Returns
- byte[]
implicit operator ReadOnlySpan<byte>(ShortChannelId)
public static implicit operator ReadOnlySpan<byte>(ShortChannelId s)
Parameters
Returns
implicit operator ShortChannelId(byte[])
public static implicit operator ShortChannelId(byte[] value)
Parameters
value
byte[]
Returns
implicit operator ShortChannelId(Span<byte>)
public static implicit operator ShortChannelId(Span<byte> value)
Parameters
Returns
operator !=(ShortChannelId, ShortChannelId)
public static bool operator !=(ShortChannelId left, ShortChannelId right)
Parameters
left
ShortChannelIdright
ShortChannelId