mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-12 18:36:24 +00:00
Merge 5d155b4ac8
into a1ca7a194b
This commit is contained in:
commit
82a31d69de
19
76.md
Normal file
19
76.md
Normal file
@ -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", "<id-of-event-being-replaced>", "<new-event>"]
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
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.
|
Loading…
Reference in New Issue
Block a user