Table of Contents

Class UpdateAddHtlcPayload

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

Represents the payload for the update_add_htlc message.

public class UpdateAddHtlcPayload : IMessagePayload
Inheritance
UpdateAddHtlcPayload
Implements
Inherited Members

Remarks

Initializes a new instance of the TxAckRbfPayload class.

Constructors

UpdateAddHtlcPayload(ChannelId, ulong, ulong, ReadOnlyMemory<byte>, uint, ReadOnlyMemory<byte>?)

Represents the payload for the update_add_htlc message.

public UpdateAddHtlcPayload(ChannelId channelId, ulong id, ulong amountMsat, ReadOnlyMemory<byte> paymentHash, uint cltvExpiry, ReadOnlyMemory<byte>? onionRoutingPacket = null)

Parameters

channelId ChannelId

The channel ID.

id ulong
amountMsat ulong
paymentHash ReadOnlyMemory<byte>
cltvExpiry uint
onionRoutingPacket ReadOnlyMemory<byte>?

Remarks

Initializes a new instance of the TxAckRbfPayload class.

Properties

AmountMsats

Amount offered for this Htlc

public ulong AmountMsats { get; }

Property Value

ulong

ChannelId

Gets the channel ID.

public ChannelId ChannelId { get; }

Property Value

ChannelId

CltvExpiry

The Cltv Expiration

public uint CltvExpiry { get; }

Property Value

uint

Id

Offer Id

public ulong Id { get; }

Property Value

ulong

Remarks

This should be 0 for the first offer for the channel and must be incremented by 1 for each successive offer

OnionRoutingPacket

public ReadOnlyMemory<byte>? OnionRoutingPacket { get; }

Property Value

ReadOnlyMemory<byte>?

PaymentHash

The payment hash

public ReadOnlyMemory<byte> PaymentHash { get; }

Property Value

ReadOnlyMemory<byte>

Methods

DeserializeAsync(Stream)

Deserializes the payload from a stream.

public static Task<UpdateAddHtlcPayload> DeserializeAsync(Stream stream)

Parameters

stream Stream

The stream to deserialize from.

Returns

Task<UpdateAddHtlcPayload>

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.