Replying to Avatar Blake

Here is an rust Nostr Paywall example project. It responds with 402 Payment Required, unless your NIP-98 HTTP Auth event’s pubkey has been granted access.

https://github.com/blakejakopovic/nostr_paywall_example

It’s a separate project, however it can work together with the lightning payment webhook server I shared yesterday. Payment webhook events can update the DB, and then the paywall can succeed, and provide access for that pubkey for that content.

https://github.com/blakejakopovic/lightning_rs_webhook

#[1]​ I purposefully left out the 402 payment required response for now. Ideally it returns an invoice to be paid (maybe in the header?). I also left out the invoice metadata for referencing pubkey and content/item - however that can ideally be solution agnostic.

Ideally we can standardise this, so Nostr client apps can get a 402 for content, with a payable invoice link, and then optionally make a payment (like a zap). And some way for the client app to refresh or reload the content.

#[2]​ happy to work with you and hear your thoughts on how this can be work best for Nostr client apps. I’m hoping these projects can be part of the foundation pieces for this (very early) draft NIP for Nostr Paid Services and their management.

Ideally Nostr feeds aren’t just walls of content requiring payment.. however I think we can define a way to filter it. And it can enable services too like translation or paid bots, etc.

https://gist.github.com/blakejakopovic/a0deee4c945c122a59ed2dcf442d2e2a

Reply to this note

Please Login to reply.

Discussion

No replies yet.