nips icon indicating copy to clipboard operation
nips copied to clipboard

NIP-60 Zap Gates - Interoperable distributed zap / pay walls

Open Egge21M opened this issue 2 years ago • 10 comments

We propose this flow for protecting resources (visuals, audio, text, html/iframes etc.) on web servers and unlocking them using NIP-57 zaps. This nip also proposes a new kind for sharing pointers and metadata for these resources throughout nostr.

Notes: We are aware that there is currently an ongoing discussion about using url vs u for tagging URI/URL. ZapGates started out with url like in NIP-94, but we changed it to u after feedback from @melvincarvalho. This PR is marked as a draft until at least NIP-98 is merged, because it heavily relies on it. Its probably fair to assume that this will by then.

Additional resources:

Egge21M avatar May 19 '23 20:05 Egge21M

Looks good from a quick glance, but I hope we get more feedback from other people that may be interested in this.

fiatjaf avatar May 20 '23 11:05 fiatjaf

Looks good from a quick glance, but I hope we get more feedback from other people that may be interested in this.

Yeah, would be great to get some feedback from @verbiricha or @pablof7z or anyone else building a content focused client.

Egge21M avatar May 21 '23 10:05 Egge21M

Pablo will have more insight than me here since zapstr implements a similar thing to this. cc @v0l

verbiricha avatar May 23 '23 06:05 verbiricha

Is the note limited to a single resource (i.e. only one u tag) or multiple resources? IMHO it would be good to be able to post multiple images as a set, or images in combination with a video. It would be more convenient for the zapper to unlock those resources as a package with a single zap.

https://lightning.video/ for example even has multiple unprotected preview images.

flox1an avatar Jun 02 '23 14:06 flox1an

Is the note limited to a single resource (i.e. only one u tag) or multiple resources? IMHO it would be good to be able to post multiple images as a set, or images in combination with a video. It would be more convenient for the zapper to unlock those resources as a package with a single zap.

https://lightning.video/ for example even has multiple unprotected preview images.

Yeah that's a great point. I guess it wouldn't be difficult to make it work. Multiple files would then be tied to the same zapgate event and a zap would be unlocking access to all the listed resources.

Egge21M avatar Jun 02 '23 15:06 Egge21M

@Egge7 I've added zap gates integration to #547 NIP-96 File Storage PR. But i used the NIP-94 1063 event instead of the 1211 one you use here. A 1063 with an amount tag should be considered a zap gated file (similar to how simply a aes-256-gcm tag indicates an encrypted file). Used url from 1063 instead of u tag. The preview tag is a little different (has a third argument with MIME type).

Could you update your PR?

arthurfranca avatar Jul 04 '23 13:07 arthurfranca

@Egge7 I've added zap gates integration to #547 NIP-96 File Storage PR. But i used the NIP-94 1063 event instead of the 1211 one you use here. A 1063 with an amount tag should be considered a zap gated file (similar to how simply a aes-256-gcm tag indicates an encrypted file).

Used url from 1063 instead of u tag. The preview tag is a little different (has a third argument with MIME type).

Could you update your PR?

Awesome! I'll look at it asap and update the PR accordingly.

Egge21M avatar Jul 04 '23 13:07 Egge21M

I like the idea. Another use case of it can be to create crowdwalls like it's done for The Biz podcast. The content gets unlocked for everyone once it's accumulated enough sats. I need to think how we might integrate it with NIP-75 Zap Goals.

But I am also worried about creating more and more non nostr services that interact with the nostr protocol in very specialized ways (not as clients with key pairs, or relays).

basantagoswami avatar Dec 14 '23 14:12 basantagoswami

@Egge21M are you still working in this idea? If not can we close the PR?

vitorpamplona avatar Oct 31 '25 18:10 vitorpamplona

Have not looked at this for ages tbh. I am fine with closing it.

Egge21M avatar Oct 31 '25 18:10 Egge21M