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
IChannelFactorychannelMemoryRepository
IChannelMemoryRepositorylogger
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
OpenChannel1MessageThe message to handle
currentState
ChannelStateThe current state of the channel
negotiatedFeatures
FeatureOptionsFeatures negotiated with the peer
peerPubKey
CompactPubKeyThe public key of the peer
Returns
- Task<IChannelMessage>
A response message if needed, or null if no response is needed