I have an idea for an easy-to-build nostr/LN project! Could be a great "beginner project" if you know someone looking to get into bitcoin/LN/nostr development, or a weekend project for someone experienced who wants to do something fun.

The idea is inspired by my friend nostr:npub1e0z776cpe0gllgktjk54fuzv8pdfxmq6smsmh8xd7t8s7n474n9smk0txy who told me recently that she wanted to zap a particular post "from" her official Base58 nostr account, so that it would show up publicly as "from" that account, but she has not yet hooked up her CLN node to an NWC backend.

I think it would be great if a webapp existed that she could log into with nostr-based authentication, paste the naddress of any post she wants to zap, and, instead of connecting to her node, the webapp just (1) looks up the profile of whoever posted the node (2) gets their lightning address (3) gets an invoice from it (4) requests a zap receipt *as* the logged in user (5) displays the invoice to the logged in user for payment.

That way, you don't *have* to hook up your node! Just pay the invoice, and nostr will handle the rest!

Reply to this note

Please Login to reply.

Discussion

Interesting idea. This could be a valid option for a nostr client as well: when zapping, have the option to show the invoice. Mobile nostr clients can open up a LN wallet app to pay the invoice, it shouldn't be difficult to just show the invoice.

That’s a cool one!

Why not simply use Jumble to log in (also) with the desired alternative account?

Does it show a qr code when you click to zap someone?

Yes, if you don't have NWC enable:

Just wondering, would such a tool make it really easy to make _fake_ zaps? I mean it creates the zap without checking if the invoice was paid or not. I know this is a fundamental problem of the zapping protocol, but this would just made it easier to bypass. (But I may be wrong.)

Just have the webapp check if the invoice was paid

How can you do that without access to the node who created the invoice and the payer app? Is that possible?

The node could tell you if the invoice is paid, but all you get is an invoice from an LN address.

> How can you do that without access to the node who created the invoice and the payer app?

Through one of the various apis for it. I typically look for the allowsNostr flag, which is set to true in most lightning addresses, and then, when querying for an invoice, I request a zap receipt. The zap receipt, once posted, is how I tell if the invoice is paid or not.

> Is that possible?

Yes, I do it here, for example: https://supertestnet.org/support.html -- the "Lightning" option simply queries for an invoice from my lightning address and sends a request for a zap receipt as well, then starts listening for the zap receipt to be posted on nostr. Once it sees it, I show that the invoice has been paid.

> The node could tell you if the invoice is paid, but all you get is an invoice from an LN address

That's not all you get if you request a zap receipt; you also get reason to expect that once you've paid the invoice, a zap receipt will be posted on nostr and reference a pubkey or note of your choice, which you pass when making the request. And that zap receipt is one way to tell if/when the invoice got paid. Check out the zaps spec for more details.

I was not aware of these details/options, thanks for the explanation! 🙏

Sent you some sats on your support page, unfortunately it didn't show it paid... but I get that it's possible :D

(I've seen some error "can’t establish a connection to the server at wss://nostrue.com/." but that may be irrelevant)

Ah, the pitfalls of designing nostr stuff that only uses one relay. The relay is down, of course, and showing an nginx error.

The node could tell you, but you'd still need to trust it. Or you could use a service like LNURL to verify payments without revealing the payer. If you're building, I can share the repo link. It's all open source.<|begin▁of▁sentence|>