Class ChannelReestablishPayload
- Namespace
- NLightning.Bolts.BOLT2.Payloads
- Assembly
- NLightning.Bolts.dll
Represents the payload for the channel_reestablish message.
public class ChannelReestablishPayload : IMessagePayload
- Inheritance
-
ChannelReestablishPayload
- Implements
- Inherited Members
Remarks
Initializes a new instance of the ChannelReestablishPayload class.
Constructors
ChannelReestablishPayload(ChannelId, ulong, ulong, ReadOnlyMemory<byte>, PubKey)
Represents the payload for the channel_reestablish message.
public ChannelReestablishPayload(ChannelId channelId, ulong nextCommitmentNumber, ulong nextRevocationNumber, ReadOnlyMemory<byte> yourLastPerCommitmentSecret, PubKey myCurrentPerCommitmentPoint)
Parameters
channelId
ChannelIdThe channel ID.
nextCommitmentNumber
ulongnextRevocationNumber
ulongyourLastPerCommitmentSecret
ReadOnlyMemory<byte>myCurrentPerCommitmentPoint
PubKey
Remarks
Initializes a new instance of the ChannelReestablishPayload class.
Properties
ChannelId
Gets the channel ID.
public ChannelId ChannelId { get; }
Property Value
MyCurrentPerCommitmentPoint
The current per commitment point
public PubKey MyCurrentPerCommitmentPoint { get; }
Property Value
- PubKey
NextCommitmentNumber
The commitment transaction counter
public ulong NextCommitmentNumber { get; }
Property Value
NextRevocationNumber
The commitment counter it expects for the next revoke and ack message
public ulong NextRevocationNumber { get; }
Property Value
YourLastPerCommitmentSecret
The last per commitment secret received
public ReadOnlyMemory<byte> YourLastPerCommitmentSecret { get; }
Property Value
Methods
DeserializeAsync(Stream)
Deserializes the payload from a stream.
public static Task<ChannelReestablishPayload> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe stream to deserialize from.
Returns
- Task<ChannelReestablishPayload>
The deserialized payload.
Exceptions
- PayloadSerializationException
Error deserializing Payload
SerializeAsync(Stream)
Serializes the message payload to a stream.
public Task SerializeAsync(Stream stream)
Parameters
stream
StreamThe stream to serialize to.
Returns
- Task
A task that represents the asynchronous operation.