feat: zap2boost
This commit is contained in:
38
PayForReactions/Program.cs
Normal file
38
PayForReactions/Program.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using NostrRelay;
|
||||
using NostrServices.Client;
|
||||
using PayForReactions;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
var config = builder.Configuration.GetSection("Config").Get<Config>()!;
|
||||
builder.Services.AddSingleton(config);
|
||||
|
||||
builder.Services.AddHttpClient();
|
||||
builder.Services.AddTransient<Lnurl>();
|
||||
builder.Services.AddTransient<AlbyApi>();
|
||||
builder.Services.AddTransient<ZapperRelay>();
|
||||
builder.Services.AddTransient<NostrServicesClient>();
|
||||
builder.Services.AddSingleton<NostrStore>(svc =>
|
||||
{
|
||||
var logger = svc.GetRequiredService<ILogger<NostrStore>>();
|
||||
return new NostrStore("./data", logger);
|
||||
});
|
||||
|
||||
var host = builder.Build();
|
||||
|
||||
host.UseWebSockets();
|
||||
host.MapRelay<ZapperRelay>("/", new RelayDocument()
|
||||
{
|
||||
Name = "wss://reactions.v0l.io",
|
||||
Description = "Zapping server for Kieran's paid reactions",
|
||||
SupportedNips = [1],
|
||||
Software = "PayForReactions (https://git.v0l.io/Kieran/NostrServices)",
|
||||
Limitation = new()
|
||||
{
|
||||
RestrictedWrites = true,
|
||||
AuthRequired = false,
|
||||
PaymentRequired = false
|
||||
}
|
||||
});
|
||||
|
||||
host.Run();
|
Reference in New Issue
Block a user