Any idea why status 402 is not addressed in the NIP? I'd love to automatically build the reply when a server requests it in any part of the app.

Reply to this note

Please Login to reply.

Discussion

Why would it be? You might want to implmentent authentication, without any need for HTTP 402.

Specs work best when they are modular and loosely coupled.

So a 402 spec can be built on top of NIP-98, say with NIP-981 etc. Same with 403 for access control.

Sorry, i am mixing my html codes.

That being said, the client-side flow for authentication and payment are similar. Server responds with a auth request or a payment request, the app receives, makes the Nostr event (or pay the ln invoice) and sends it back "automatically" (in case of the invoice, with confirmation from the user).

I just don't want two client flows using separate communication standards for these features.