From 5d155b4ac854730a796a786ad19cbdcdb8e161a6 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 8 Dec 2024 10:01:28 -0300 Subject: [PATCH] REPLACE verb. --- 76.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 76.md diff --git a/76.md b/76.md new file mode 100644 index 0000000..33ce466 --- /dev/null +++ b/76.md @@ -0,0 +1,19 @@ +NIP-76 +====== + +`REPLACE` command for updating replaceables +------------------------------------------- + +`draft` `optional` + +This NIP defines a new message, `REPLACE`, that clients can use to publish _replaceable_ and _addressable_ events to relays. + +It works like `EVENT`, but together with the event JSON, the client also sends the id of the event they are replacing. + +```jsonc +["REPLACE", "", ""] +``` + +Upon receiving this message, relays should check if the `` corresponds to the latest event id they have stored locally that corresponds to the new replaceable event being received. + +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.