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
bitcoinWalletServiceIBitcoinWalletServicechannelIdFactoryIChannelIdFactorychannelMemoryRepositoryIChannelMemoryRepositorychannelOpenValidatorIChannelOpenValidatorcommitmentTransactionBuilderICommitmentTransactionBuildercommitmentTransactionModelFactoryICommitmentTransactionModelFactoryfundingTransactionBuilderIFundingTransactionBuilderfundingTransactionModelFactoryIFundingTransactionModelFactorylightningSignerILightningSignerloggerILogger<OpenChannel1MessageHandler>messageFactoryIMessageFactorysha256ISha256unitOfWorkIUnitOfWorkutxoMemoryRepositoryIUtxoMemoryRepository
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
messageAcceptChannel1MessageThe 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