Table of Contents

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 ChannelId

The channel ID.

nextCommitmentNumber ulong
nextRevocationNumber ulong
yourLastPerCommitmentSecret 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

ChannelId

MyCurrentPerCommitmentPoint

The current per commitment point

public PubKey MyCurrentPerCommitmentPoint { get; }

Property Value

PubKey

NextCommitmentNumber

The commitment transaction counter

public ulong NextCommitmentNumber { get; }

Property Value

ulong

NextRevocationNumber

The commitment counter it expects for the next revoke and ack message

public ulong NextRevocationNumber { get; }

Property Value

ulong

YourLastPerCommitmentSecret

The last per commitment secret received

public ReadOnlyMemory<byte> YourLastPerCommitmentSecret { get; }

Property Value

ReadOnlyMemory<byte>

Methods

DeserializeAsync(Stream)

Deserializes the payload from a stream.

public static Task<ChannelReestablishPayload> DeserializeAsync(Stream stream)

Parameters

stream Stream

The 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 Stream

The stream to serialize to.

Returns

Task

A task that represents the asynchronous operation.