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
ChannelIdThe channel ID.
id
ulongamountMsat
ulongpaymentHash
ReadOnlyMemory<byte>cltvExpiry
uintonionRoutingPacket
ReadOnlyMemory<byte>?
Remarks
Initializes a new instance of the TxAckRbfPayload class.
Properties
AmountMsats
Amount offered for this Htlc
public ulong AmountMsats { get; }
Property Value
ChannelId
Gets the channel ID.
public ChannelId ChannelId { get; }
Property Value
CltvExpiry
The Cltv Expiration
public uint CltvExpiry { get; }
Property Value
Id
Offer Id
public ulong Id { get; }
Property Value
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
PaymentHash
The payment hash
public ReadOnlyMemory<byte> PaymentHash { get; }
Property Value
Methods
DeserializeAsync(Stream)
Deserializes the payload from a stream.
public static Task<UpdateAddHtlcPayload> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe 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
StreamThe stream to serialize to.
Returns
- Task
A task that represents the asynchronous operation.