Class UpdateFailMalformedHtlcPayload
- Namespace
- NLightning.Bolts.BOLT2.Payloads
- Assembly
- NLightning.Bolts.dll
Represents the payload for the update_fail_malformed_htlc message.
public class UpdateFailMalformedHtlcPayload : IMessagePayload
- Inheritance
-
UpdateFailMalformedHtlcPayload
- Implements
- Inherited Members
Remarks
Initializes a new instance of the UpdateFailMalformedHtlcPayload class.
Constructors
UpdateFailMalformedHtlcPayload(ChannelId, ulong, ReadOnlyMemory<byte>, ushort)
Represents the payload for the update_fail_malformed_htlc message.
public UpdateFailMalformedHtlcPayload(ChannelId channelId, ulong id, ReadOnlyMemory<byte> sha256OfOnion, ushort failureCode)
Parameters
channelId
ChannelIdid
ulongsha256OfOnion
ReadOnlyMemory<byte>failureCode
ushort
Remarks
Initializes a new instance of the UpdateFailMalformedHtlcPayload class.
Properties
ChannelId
The channel_id this message refers to
public ChannelId ChannelId { get; }
Property Value
FailureCode
The failure code
public ushort FailureCode { get; }
Property Value
Id
The htlc id
public ulong Id { get; }
Property Value
Sha256OfOnion
The sha256 of onion if an onion was received
public ReadOnlyMemory<byte> Sha256OfOnion { get; }
Property Value
Remarks
May use an all zero array
Methods
DeserializeAsync(Stream)
Deserializes the payload from a stream.
public static Task<UpdateFailMalformedHtlcPayload> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe stream to deserialize from.
Returns
- Task<UpdateFailMalformedHtlcPayload>
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.