Table of Contents

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 ChannelId
id ulong
sha256OfOnion 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

ChannelId

FailureCode

The failure code

public ushort FailureCode { get; }

Property Value

ushort

Id

The htlc id

public ulong Id { get; }

Property Value

ulong

Sha256OfOnion

The sha256 of onion if an onion was received

public ReadOnlyMemory<byte> Sha256OfOnion { get; }

Property Value

ReadOnlyMemory<byte>

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 Stream

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

The stream to serialize to.

Returns

Task

A task that represents the asynchronous operation.