Table of Contents

Class TxAddOutputPayload

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

Represents a tx_add_output payload.

public class TxAddOutputPayload : IMessagePayload
Inheritance
TxAddOutputPayload
Implements
Inherited Members

Remarks

The tx_add_output payload is used to add an output to the transaction.

Constructors

TxAddOutputPayload(ChannelId, ulong, ulong, byte[])

Initializes a new instance of the TxAddOutputPayload class.

public TxAddOutputPayload(ChannelId channelId, ulong serialId, ulong sats, byte[] script)

Parameters

channelId ChannelId

The channel id.

serialId ulong

The serial id.

sats ulong

The sats amount.

script byte[]

The spending script.

Exceptions

ArgumentException

Script length is out of bounds.

Properties

ChannelId

The channel id.

public ChannelId ChannelId { get; }

Property Value

ChannelId

Sats

The sats amount.

public ulong Sats { get; }

Property Value

ulong

Script

The spending script.

public byte[] Script { get; }

Property Value

byte[]

SerialId

The serial id.

public ulong SerialId { get; }

Property Value

ulong

Methods

DeserializeAsync(Stream)

Deserialize a TxAddOutputPayload from a stream.

public static Task<TxAddOutputPayload> DeserializeAsync(Stream stream)

Parameters

stream Stream

The stream to deserialize from.

Returns

Task<TxAddOutputPayload>

The deserialized TxAddOutputPayload.

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