Class StfuPayload
- Namespace
- NLightning.Bolts.BOLT2.Payloads
- Assembly
- NLightning.Bolts.dll
Represents the payload for the stfu message.
public class StfuPayload : IMessagePayload
- Inheritance
-
StfuPayload
- Implements
- Inherited Members
Remarks
Initializes a new instance of the StfuPayload class.
Constructors
StfuPayload(ChannelId, bool)
Represents the payload for the stfu message.
public StfuPayload(ChannelId channelId, bool initiator)
Parameters
Remarks
Initializes a new instance of the StfuPayload class.
Properties
ChannelId
The channel_id this message refers to
public ChannelId ChannelId { get; set; }
Property Value
Initiator
1 if we're sending this message, 0 if we're responding
public bool Initiator { get; set; }
Property Value
Methods
DeserializeAsync(Stream)
Deserializes the payload from a stream.
public static Task<StfuPayload> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe stream to deserialize from.
Returns
- Task<StfuPayload>
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.