From 67d4b261e6d6a6476313b68829ef607d7fec4be9 Mon Sep 17 00:00:00 2001 From: Christian Krueger Date: Mon, 23 Oct 2023 07:27:23 -0600 Subject: [PATCH] Changed g tag to e tag --- 108.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/108.md b/108.md index f073f2f8..02d0bc99 100644 --- a/108.md +++ b/108.md @@ -9,8 +9,8 @@ Lightning Gated Notes This NIP defines three events for gating Notes behind lightning paywalls: - Lightning-Gated Note ( `kind:55` ): This note allows you wrap any type of note behind a lightning gated paywall by encrypting the payload with a purchasable decrypt key. -- Key Note ( `kind:56` ): This note encrypts the key for a given note, per user, using [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md) between the corresponding gate creator's public key and the purchasers. It is linked to the gated note with the `g` tag. -- Announcement Note ( `kind:54` ): This note acts as the announcement of the gated note, giving a short preview of the content. It is linked to the gated note with the `g` tag. +- Key Note ( `kind:56` ): This note encrypts the key for a given note, per user, using [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md) between the corresponding gate creator's public key and the purchasers. It is linked to the gated note with the `e` tag. +- Announcement Note ( `kind:54` ): This note acts as the announcement of the gated note, giving a short preview of the content. It is linked to the gated note with the `e` tag. A complete open-source implantation of [NIP-108 is available](https://github.com/project-excalibur/Nostr-Playground/tree/main/apps/nip108). @@ -22,11 +22,11 @@ An example client can be found at [Nostr Playground](https://nip-108.nostrplaygr 2. Poster `JSON.stringify`s the whole note. 3. Poster encrypts the note string with a new nsec `secret`, and `iv` using `aes-256-cbc`. 4. Poster creates the gated note `kind:55` with the encrypted note json string in the `content` field, while putting `iv`, `cost` (mSats), and `endpoint` as tags. The `endpoint` tag is the server endpoint you use to hold your `secret`'s and issue lightning invoices from your `lud16`. -5. Poster then creates an announcement note `kind:54` with the `g` tag (gated note's id) to preview the gated content. +5. Poster then creates an announcement note `kind:54` with the `e` tag (gated note's id) to preview the gated content. ### Consuming Gated Notes 1. Client finds gated content they want to purchase by browsing `kind:54` announcement notes. -2. Client loads the associated gated note of `kind:55` found in the `g` tag +2. Client loads the associated gated note of `kind:55` found in the `e` tag 3. Client then GETs the `[endpoint]/[id]` 4. Gate server will respond with a 402 PR requesting a payment for the `cost` tag's amount in mSats 5. Client pays the amount @@ -107,7 +107,7 @@ APP.get("/:noteId/:paymentHash") `.tag` MUST include the following: -- `g`, the id of the gated event. +- `e`, the id of the gated event. ### Key Note ( Kind:56 ) @@ -117,7 +117,7 @@ APP.get("/:noteId/:paymentHash") `.tag` MUST include the following: -- `g`, the id of the gated event. +- `e`, the id of the gated event. ### Encryption/Decryption