diff options
Diffstat (limited to '76.md')
| -rw-r--r-- | 76.md | 19 |
1 files changed, 19 insertions, 0 deletions
| @@ -0,0 +1,19 @@ | |||
| 1 | NIP-76 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | `REPLACE` command for updating replaceables | ||
| 5 | ------------------------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` | ||
| 8 | |||
| 9 | This NIP defines a new message, `REPLACE`, that clients can use to publish _replaceable_ and _addressable_ events to relays. | ||
| 10 | |||
| 11 | It works like `EVENT`, but together with the event JSON, the client also sends the id of the event they are replacing. | ||
| 12 | |||
| 13 | ```jsonc | ||
| 14 | ["REPLACE", "<id-of-event-being-replaced>", "<new-event>"] | ||
| 15 | ``` | ||
| 16 | |||
| 17 | Upon receiving this message, relays should check if the `<id-of-event-being-replaced>` corresponds to the latest event id they have stored locally that corresponds to the new replaceable event being received. | ||
| 18 | |||
| 19 | If it does correspond, it responds with an `OK` normally; otherwise it responds with something I'm not sure but that allows the client to fix its stuff. | ||