Table of Contents

Class AcceptChannel1MessageHandler

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

Constructors

AcceptChannel1MessageHandler(IBitcoinWalletService, IChannelIdFactory, IChannelMemoryRepository, IChannelOpenValidator, ICommitmentTransactionBuilder, ICommitmentTransactionModelFactory, IFundingTransactionBuilder, IFundingTransactionModelFactory, ILightningSigner, ILogger<OpenChannel1MessageHandler>, IMessageFactory, ISha256, IUnitOfWork, IUtxoMemoryRepository)

public AcceptChannel1MessageHandler(IBitcoinWalletService bitcoinWalletService, IChannelIdFactory channelIdFactory, IChannelMemoryRepository channelMemoryRepository, IChannelOpenValidator channelOpenValidator, ICommitmentTransactionBuilder commitmentTransactionBuilder, ICommitmentTransactionModelFactory commitmentTransactionModelFactory, IFundingTransactionBuilder fundingTransactionBuilder, IFundingTransactionModelFactory fundingTransactionModelFactory, ILightningSigner lightningSigner, ILogger<OpenChannel1MessageHandler> logger, IMessageFactory messageFactory, ISha256 sha256, IUnitOfWork unitOfWork, IUtxoMemoryRepository utxoMemoryRepository)

Parameters

bitcoinWalletService IBitcoinWalletService
channelIdFactory IChannelIdFactory
channelMemoryRepository IChannelMemoryRepository
channelOpenValidator IChannelOpenValidator
commitmentTransactionBuilder ICommitmentTransactionBuilder
commitmentTransactionModelFactory ICommitmentTransactionModelFactory
fundingTransactionBuilder IFundingTransactionBuilder
fundingTransactionModelFactory IFundingTransactionModelFactory
lightningSigner ILightningSigner
logger ILogger<OpenChannel1MessageHandler>
messageFactory IMessageFactory
sha256 ISha256
unitOfWork IUnitOfWork
utxoMemoryRepository IUtxoMemoryRepository

Methods

HandleAsync(AcceptChannel1Message, ChannelState, FeatureOptions, CompactPubKey)

Handles a channel message and returns a response message if needed

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

Parameters

message AcceptChannel1Message

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