Table of Contents

Class OpenChannel1MessageHandler

Namespace
NLightning.Application.Channels.Handlers
Assembly
NLightning.Application.dll
public class OpenChannel1MessageHandler : IChannelMessageHandler<OpenChannel1Message>
Inheritance
OpenChannel1MessageHandler
Implements
Inherited Members

Constructors

OpenChannel1MessageHandler(IChannelFactory, IChannelMemoryRepository, ILogger<OpenChannel1MessageHandler>, IMessageFactory)

public OpenChannel1MessageHandler(IChannelFactory channelFactory, IChannelMemoryRepository channelMemoryRepository, ILogger<OpenChannel1MessageHandler> logger, IMessageFactory messageFactory)

Parameters

channelFactory IChannelFactory
channelMemoryRepository IChannelMemoryRepository
logger ILogger<OpenChannel1MessageHandler>
messageFactory IMessageFactory

Methods

HandleAsync(OpenChannel1Message, ChannelState, FeatureOptions, CompactPubKey)

Handles a channel message and returns a response message if needed

public Task<IChannelMessage?> HandleAsync(OpenChannel1Message message, ChannelState currentState, FeatureOptions negotiatedFeatures, CompactPubKey peerPubKey)

Parameters

message OpenChannel1Message

The message to handle

currentState ChannelState

The current state of the channel

negotiatedFeatures FeatureOptions

Features negotiated with the peer

peerPubKey CompactPubKey

The public key of the peer

Returns

Task<IChannelMessage>

A response message if needed, or null if no response is needed