Oddbean new post about | logout
 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