I’m slightly behind on what’s possible with lightning.

Is it possible to setup something like a lightning address, that’s reusable (like bank details) for a service provider?

Then someone can sent you a payment (like a Nostr Zap). They get a unique receipt that only they should know.

Then they can provide that receipt to the service provider and say I have pre-paid this request.

Basically looking for a single request API remote Nostr event POW service, where someone sends partial event, difficultly target and a pre-payment hash that can be verified by the service provider as unspent yet.

Reply to this note

Please Login to reply.

Discussion

You mean pay an invoice and then provide a proof that you were the one to pay it? That's what zaps do, basically.

IIUC with zaps the recipient knows who paid it on receipt of funds, because the invoice request is signed by the payer.

I don't think you can prove you paid an invoice if it's a vanilla LN invoice without the zap part.

Yep effectively.. I’m just not sure how zaps work in the details. Specifically identifying the payee, what proof the payee and payer can match.

I don’t event mind if someone pre-pays like 1000 sats, then POW requests just deduct or error asking for payment.

With zaps there are two nostr notes published, one by the payer (containing the recipient user's pubkey & amount), and one by the recipient lightning node (containing the invoice and preimage). NIP 57 notes that the latter is not really proof for 3rd parties, but the former would be sufficient for the recipient to prove who requested the invoice.

Note that of course these are nostr protocols, not LN, but it should give you an idea of what you can do with LN.

https://github.com/nostr-protocol/nips/blob/master/57.md

I’ve built a POC service API, but it would need payments or be unsustainable.

nostr_pow_service] POW 20 Request - found 23 with 2459568 attempts in 117569 ms

"0000013873755374eb63f781ee765525b84225ad06c8238fb422dd6df43bb305" - 23

curl -X POST 'http://127.0.0.1:3030/request/20' --header 'Content-Type: application/json' --data-raw 'EVENT_JSON'

If any client app wants to offer the option, let me know, happy to chat about the API/UX.

Sounds like BOLT12.

The unique receipt is just the usual Lightning preimage.They could then exchange the preimage for e.g. a JWT or other bearer token

Yep.

Maybe I don’t need the receipt stuff.. I would know the pubkey of the event being asked to be signed.

So I really just need to know who made each payment. Pubkey and amount. Then it’s just record keeping.

Does that need bolt12?

Working on smth similar using current BOLT11.

Basically a way for a service provider to check if a pubkey (account) is entitled to a service or not, based on (pre-paid / already settled) LN payments.