Table of Contents

Class ChannelReadyMessageHandler

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

Constructors

ChannelReadyMessageHandler(IChannelMemoryRepository, ILogger<ChannelReadyMessageHandler>, IUnitOfWork)

public ChannelReadyMessageHandler(IChannelMemoryRepository channelMemoryRepository, ILogger<ChannelReadyMessageHandler> logger, IUnitOfWork unitOfWork)

Parameters

channelMemoryRepository IChannelMemoryRepository
logger ILogger<ChannelReadyMessageHandler>
unitOfWork IUnitOfWork

Methods

HandleAsync(ChannelReadyMessage, ChannelState, FeatureOptions, CompactPubKey)

Handles a channel message and returns a response message if needed

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

Parameters

message ChannelReadyMessage

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