Table of Contents

Class OpenChannel2Message

Namespace
NLightning.Bolts.BOLT2.Messages
Assembly
NLightning.Bolts.dll

Represents an open_channel2 message.

public sealed class OpenChannel2Message : BaseMessage, IMessage
Inheritance
OpenChannel2Message
Implements
Inherited Members

Remarks

The open_channel2 message is sent to another peer in order to start the channel negotiation. The message type is 64.

Constructors

OpenChannel2Message(OpenChannel2Payload, UpfrontShutdownScriptTlv?, ChannelTypeTlv?, RequireConfirmedInputsTlv?)

public OpenChannel2Message(OpenChannel2Payload payload, UpfrontShutdownScriptTlv? upfrontShutdownScriptTlv = null, ChannelTypeTlv? channelTypeTlv = null, RequireConfirmedInputsTlv? requireConfirmedInputsTlv = null)

Parameters

payload OpenChannel2Payload
upfrontShutdownScriptTlv UpfrontShutdownScriptTlv
channelTypeTlv ChannelTypeTlv
requireConfirmedInputsTlv RequireConfirmedInputsTlv

Properties

ChannelTypeTlv

public ChannelTypeTlv? ChannelTypeTlv { get; }

Property Value

ChannelTypeTlv

Payload

The payload of the message.

public OpenChannel2Payload Payload { get; }

Property Value

OpenChannel2Payload

RequireConfirmedInputsTlv

public RequireConfirmedInputsTlv? RequireConfirmedInputsTlv { get; }

Property Value

RequireConfirmedInputsTlv

UpfrontShutdownScriptTlv

public UpfrontShutdownScriptTlv? UpfrontShutdownScriptTlv { get; }

Property Value

UpfrontShutdownScriptTlv

Methods

DeserializeAsync(Stream)

Deserialize a OpenChannel2Message from a stream.

public static Task<OpenChannel2Message> DeserializeAsync(Stream stream)

Parameters

stream Stream

The stream to deserialize from.

Returns

Task<OpenChannel2Message>

The deserialized OpenChannel2Message.

Exceptions

MessageSerializationException

Error deserializing OpenChannel2Message