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
channelFactoryIChannelFactorychannelMemoryRepositoryIChannelMemoryRepositoryloggerILogger<OpenChannel1MessageHandler>messageFactoryIMessageFactory
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
messageOpenChannel1MessageThe message to handle
currentStateChannelStateThe current state of the channel
negotiatedFeaturesFeatureOptionsFeatures negotiated with the peer
peerPubKeyCompactPubKeyThe public key of the peer
Returns
- Task<IChannelMessage>
A response message if needed, or null if no response is needed