Table of Contents

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 ChannelId

The channel id.

serialId ulong

The serial id.

prevTx byte[]

The previous transaction id.

prevTxVout uint

The previous transaction vout.

sequence uint

The sequence.

Exceptions

ArgumentException

Sequence is out of bounds.

Properties

ChannelId

The channel id.

public ChannelId ChannelId { get; }

Property Value

ChannelId

PrevTx

The previous transaction id.

public byte[] PrevTx { get; }

Property Value

byte[]

PrevTxVout

The previous transaction vout.

public uint PrevTxVout { get; }

Property Value

uint

Sequence

The sequence.

public uint Sequence { get; }

Property Value

uint

SerialId

The serial id.

public ulong SerialId { get; }

Property Value

ulong

Methods

DeserializeAsync(Stream)

Deserialize a TxAddInputPayload from a stream.

public static Task<TxAddInputPayload> DeserializeAsync(Stream stream)

Parameters

stream Stream

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

The stream to serialize to.

Returns

Task

A task that represents the asynchronous operation.

See Also