Table of Contents

Class UpdateFailHtlcPayload

Namespace
NLightning.Bolts.BOLT2.Payloads
Assembly
NLightning.Bolts.dll

Represents the payload for the update_fail_htlc message.

public class UpdateFailHtlcPayload : IMessagePayload
Inheritance
UpdateFailHtlcPayload
Implements
Inherited Members

Remarks

Initializes a new instance of the UpdateFailHtlcPayload class.

Constructors

UpdateFailHtlcPayload(ChannelId, ulong, ReadOnlyMemory<byte>)

Represents the payload for the update_fail_htlc message.

public UpdateFailHtlcPayload(ChannelId channelId, ulong id, ReadOnlyMemory<byte> reason)

Parameters

channelId ChannelId
id ulong
reason ReadOnlyMemory<byte>

Remarks

Initializes a new instance of the UpdateFailHtlcPayload class.

Properties

ChannelId

The channel_id this message refers to

public ChannelId ChannelId { get; }

Property Value

ChannelId

Id

The htlc id

public ulong Id { get; }

Property Value

ulong

Len

The length of the reason

public ushort Len { get; }

Property Value

ushort

Reason

The reason for failure

public ReadOnlyMemory<byte> Reason { get; }

Property Value

ReadOnlyMemory<byte>

Methods

DeserializeAsync(Stream)

Deserializes the payload from a stream.

public static Task<UpdateFailHtlcPayload> DeserializeAsync(Stream stream)

Parameters

stream Stream

The stream to deserialize from.

Returns

Task<UpdateFailHtlcPayload>

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.