upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/76.md
diff options
context:
space:
mode:
Diffstat (limited to '76.md')
-rw-r--r--76.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/76.md b/76.md
new file mode 100644
index 0000000..33ce466
--- /dev/null
+++ b/76.md
@@ -0,0 +1,19 @@
1NIP-76
2======
3
4`REPLACE` command for updating replaceables
5-------------------------------------------
6
7`draft` `optional`
8
9This NIP defines a new message, `REPLACE`, that clients can use to publish _replaceable_ and _addressable_ events to relays.
10
11It 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
17Upon 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
19If 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.