Struct ShortChannelId
- Namespace
- NLightning.Domain.Channels.ValueObjects
- Assembly
- NLightning.Domain.dll
Represents a short channel id.
public readonly struct ShortChannelId : IEquatable<ShortChannelId>, IValueObject
- Implements
- Inherited Members
Remarks
The short channel id is a unique description of the funding transaction.
Constructors
ShortChannelId(byte[])
public ShortChannelId(byte[] value)
Parameters
valuebyte[]
ShortChannelId(uint, uint, ushort)
public ShortChannelId(uint blockHeight, uint transactionIndex, ushort outputIndex)
Parameters
ShortChannelId(ulong)
public ShortChannelId(ulong channelId)
Parameters
channelIdulong
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
otherShortChannelIdAn 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
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
shortChannelIdstring
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
leftShortChannelIdrightShortChannelId
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
valuebyte[]
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
valueulong
Returns
operator !=(ShortChannelId, ShortChannelId)
public static bool operator !=(ShortChannelId left, ShortChannelId right)
Parameters
leftShortChannelIdrightShortChannelId