#asknostr
is there LNURL wallet services that allow you to push the payment details to a server?
like, if i have a relay generate an automatic identity, and it publishes (broadcasts) its kind 0 and if you pay to the LNURL of the relay with your npub it can then add you to its allow list, no extra bullshit interface bullshit required
i was rather glad to figure out that i can eliminate the need of an interface to add and remove allowed users from an auth enabled relay, but being able to add and remove users based on lightning payments with npub in the memo seems like a really nice thing, just, the interface, any clues most appreciated
@Alby is there a way to connect a web client to receive payment amounts and memos for this kind of purpose?
i'm already running a Hub so if it can be done easily with an alby account this would be very nice for my relay as a feature to have integration like this
i think i can do it with NWC?
https://github.com/nostr-protocol/nips/blob/master/47.md
is there docs for connecting an alby hub or alby account to an app that can do NWC?
i'm going to be digging into this anyway, being able to monitor a LN payment as a means to add credit to a relay balance just seems like a logical thing, literally just have to have the npub in the memo
Check nwc.dev and our discord.getalby.com, docs are there but maybe not super extensive
@roland might also give a quick answer to that one
Yes, with NWC and Alby Hub you can add metadata when you create an invoice. You could look at the Alby JS SDK as an easy way to get started
unfortunately i need it to be in Go as it's for payment rails for a relay that is written in Go... i will be working on what amounts to a #golang SDK for #NWC for the next few days, i will probably bump to a minor version v1.3.0 when it's working
the key idea is minimising the need for interfaces when usable ones exist already... in this case, the relay will have an identity that when you zap it, by the extension/app noting your NPUB into the zap message and payment memo it can automatically append your subscription expiry and then send you a DM to let you know when its expiring, like nostr.wine does, but making it so this can all be done inside any standard nostr client with zaps enabled
Cool! It would be awesome to create a go NWC SDK (or add a PR for a nip47 package to go-nostr)
haha, my library is better than go-nostr
yeah, reminds me, that's what i am gonna keep working on now