upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2024-12-08 10:01:28 -0300
committerfiatjaf <fiatjaf@gmail.com>2024-12-08 10:01:28 -0300
commit5d155b4ac854730a796a786ad19cbdcdb8e161a6 (patch)
tree1155f768c578f7997c25544592eaf2bf1af5d8bf
parentd857cfb1b8409ca7f67c7525958a13ca6e780ed7 (diff)
REPLACE verb.replace
-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.