using BTCPayServer.Data; using BTCPayServer.Payments; using BTCPayServer.PayoutProcessors.Lightning; using BTCPayServer.PayoutProcessors.OnChain; using Microsoft.Extensions.DependencyInjection; namespace BTCPayServer.PayoutProcessors; public static class PayoutProcessorsExtensions { public static void AddPayoutProcesors(this IServiceCollection serviceCollection) { serviceCollection.AddSingleton(); serviceCollection.AddSingleton(provider => provider.GetRequiredService()); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(provider => provider.GetRequiredService()); serviceCollection.AddSingleton(); serviceCollection.AddHostedService(s => s.GetRequiredService()); } public static PaymentMethodId GetPaymentMethodId(this PayoutProcessorData data) { return PaymentMethodId.Parse(data.PaymentMethod); } }