Table of Contents

Class ShutdownPayload

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

Represents the payload for the shutdown message.

public class ShutdownPayload : IMessagePayload
Inheritance
ShutdownPayload
Implements
Inherited Members

Remarks

Initializes a new instance of the ShutdownPayload class.

Constructors

ShutdownPayload(ChannelId, Script)

Represents the payload for the shutdown message.

public ShutdownPayload(ChannelId channelId, Script scriptPubkey)

Parameters

channelId ChannelId
scriptPubkey Script

Remarks

Initializes a new instance of the ShutdownPayload class.

Properties

ChannelId

The channel_id this message refers to

public ChannelId ChannelId { get; }

Property Value

ChannelId

ScriptPubkey

The scriptpubkey to send the closing funds to

public Script ScriptPubkey { get; }

Property Value

Script

ScriptPubkeyLen

len is the scriptpubkey length

public ushort ScriptPubkeyLen { get; }

Property Value

ushort

Methods

DeserializeAsync(Stream)

Deserializes the payload from a stream.

public static Task<ShutdownPayload> DeserializeAsync(Stream stream)

Parameters

stream Stream

The stream to deserialize from.

Returns

Task<ShutdownPayload>

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.