Class RevokeAndAckPayload
- Namespace
- NLightning.Bolts.BOLT2.Payloads
- Assembly
- NLightning.Bolts.dll
Represents the payload for the revoke_and_ack message.
public class RevokeAndAckPayload : IMessagePayload
- Inheritance
-
RevokeAndAckPayload
- Implements
- Inherited Members
Remarks
Initializes a new instance of the RevokeAndAckPayload class.
Constructors
RevokeAndAckPayload(ChannelId, ReadOnlyMemory<byte>, PubKey)
Represents the payload for the revoke_and_ack message.
public RevokeAndAckPayload(ChannelId channelId, ReadOnlyMemory<byte> perCommitmentSecret, PubKey nextPerCommitmentPoint)
Parameters
channelId
ChannelIdperCommitmentSecret
ReadOnlyMemory<byte>nextPerCommitmentPoint
PubKey
Remarks
Initializes a new instance of the RevokeAndAckPayload class.
Properties
ChannelId
The channel_id this message refers to
public ChannelId ChannelId { get; }
Property Value
NextPerCommitmentPoint
The next per commitment point
public PubKey NextPerCommitmentPoint { get; }
Property Value
- PubKey
PerCommitmentSecret
len is the per commitment secret
public ReadOnlyMemory<byte> PerCommitmentSecret { get; }
Property Value
Methods
DeserializeAsync(Stream)
Deserializes the payload from a stream.
public static Task<RevokeAndAckPayload> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe stream to deserialize from.
Returns
- Task<RevokeAndAckPayload>
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.