Struct ShortChannelId
- Namespace
- NLightning.Domain.ValueObjects
- Assembly
- NLightning.Domain.dll
Represents a short channel id.
public readonly struct ShortChannelId : IValueObject, IEquatable<ShortChannelId>
- Implements
- 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
ShortChannelId(ulong)
public ShortChannelId(ulong channelId)
Parameters
channelId
ulong
Fields
BlockHeight
public readonly uint BlockHeight
Field Value
LENGTH
public const int LENGTH = 8
Field Value
OutputIndex
public readonly ushort OutputIndex
Field Value
TransactionIndex
public readonly uint TransactionIndex
Field Value
Methods
Equals(ShortChannelId)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ShortChannelId other)
Parameters
other
ShortChannelIdAn object to compare with this object.
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
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 ReadOnlyMemory<byte>(ShortChannelId)
public static implicit operator ReadOnlyMemory<byte>(ShortChannelId s)
Parameters
Returns
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
implicit operator ShortChannelId(ulong)
public static implicit operator ShortChannelId(ulong value)
Parameters
value
ulong
Returns
operator !=(ShortChannelId, ShortChannelId)
public static bool operator !=(ShortChannelId left, ShortChannelId right)
Parameters
left
ShortChannelIdright
ShortChannelId