Struct ChannelId
- Namespace
- NLightning.Common.Types
- Assembly
- NLightning.Common.dll
Represents a channel id.
public readonly struct ChannelId
- Inherited Members
Remarks
The channel id is a unique identifier for a channel.
Constructors
ChannelId(byte[])
public ChannelId(byte[] value)
Parameters
value
byte[]
Fields
LENGTH
public const int LENGTH = 32
Field Value
Properties
Zero
public static ChannelId Zero { get; }
Property Value
Methods
DeserializeAsync(Stream)
public static Task<ChannelId> DeserializeAsync(Stream stream)
Parameters
stream
Stream
Returns
Equals(ChannelId)
public bool Equals(ChannelId other)
Parameters
other
ChannelId
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.
SerializeAsync(Stream)
public ValueTask SerializeAsync(Stream stream)
Parameters
stream
Stream
Returns
Operators
operator ==(ChannelId, ChannelId)
public static bool operator ==(ChannelId left, ChannelId right)
Parameters
Returns
implicit operator byte[](ChannelId)
public static implicit operator byte[](ChannelId c)
Parameters
Returns
- byte[]
implicit operator ChannelId(byte[])
public static implicit operator ChannelId(byte[] value)
Parameters
value
byte[]
Returns
operator !=(ChannelId, ChannelId)
public static bool operator !=(ChannelId left, ChannelId right)