I’ve written two basic example rust projects that I’ll try open source this week.
1. BTCPay server webhook that can update a database on invoice payment.
2. Nostr 402 Payment Required paywall server that uses NIP-98 HTTP Auth after payment to authorise access. It likely can generate lightning invoices before payment too.
The basic idea is that if you ZAP or pay an invoice, the same URL can return the desired content if you sign a Nostr message that proves your private key which can be used to check prior payment.
Ideally we can support some kind of Nostr client app UX, where content can refresh post-payment.
#[0] what would be really cool is a way to optionally auto-refresh an event’s embedded media after a zap has been paid - maybe with a minimum sat.
Would be nice to use the same URL, that returns 402s without payment, and likely a blurhash, but 200s after zap. Maybe the post-payment requests includes a NIP 98 header for auth.
Main risk is privacy around sending your pubkey for all media requests because you don’t know if you’ve already paid (before first http request) - and that’s a privacy/tracking vector.
Ideally private zaps could unlock content too.
For maximum censorship resistance, you want to be a fish in a school of fish - very hard to isolate and eat.
Adding fine-grained (often ‘controversial’) metadata to single you out, makes you, and those who interact a target.
Be wary of formal fine-grained content 'classification' proposals for Nostr that claim to help individual communities or specific groups (sexuality, children, religion); as they are effectively future backdoor censorship for all content - even if well intentioned today.
If your community or group needs to opt-into a 'self-isolation bubble' for whatever reason, that's a perfect use case for community run private relays. You can even moderate, and censor your community with your own rules, and even have special punishments - it just doesn't belong in a protocol designed to prevent censorship and arbitrary moderators making decisions on behalf of others.