Class TxAddInputPayload
- Namespace
- NLightning.Bolts.BOLT2.Payloads
- Assembly
- NLightning.Bolts.dll
Represents a tx_add_input payload.
public class TxAddInputPayload : IMessagePayload
- Inheritance
-
TxAddInputPayload
- Implements
- Inherited Members
Remarks
The tx_add_input payload is used to add an input to the transaction.
Constructors
TxAddInputPayload(ChannelId, ulong, byte[], uint, uint)
Initializes a new instance of the TxAddInputPayload class.
public TxAddInputPayload(ChannelId channelId, ulong serialId, byte[] prevTx, uint prevTxVout, uint sequence)
Parameters
channelId
ChannelIdThe channel id.
serialId
ulongThe serial id.
prevTx
byte[]The previous transaction id.
prevTxVout
uintThe previous transaction vout.
sequence
uintThe sequence.
Exceptions
- ArgumentException
Sequence is out of bounds.
Properties
ChannelId
The channel id.
public ChannelId ChannelId { get; }
Property Value
PrevTx
The previous transaction id.
public byte[] PrevTx { get; }
Property Value
- byte[]
PrevTxVout
The previous transaction vout.
public uint PrevTxVout { get; }
Property Value
Sequence
The sequence.
public uint Sequence { get; }
Property Value
SerialId
The serial id.
public ulong SerialId { get; }
Property Value
Methods
DeserializeAsync(Stream)
Deserialize a TxAddInputPayload from a stream.
public static Task<TxAddInputPayload> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe stream to deserialize from.
Returns
- Task<TxAddInputPayload>
The deserialized TxAddInputPayload.
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.