upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <31560900+0xtlt@users.noreply.github.com>2022-12-04 16:14:31 +0100
committerThomas <31560900+0xtlt@users.noreply.github.com>2022-12-04 16:14:31 +0100
commit91bb09d1d374afbb6d5cffa25f5e71b6c7ad2a10 (patch)
treed25ba8355561c23bcfd225d71063b9282d076804
parent5d292e0cbe04fb60250c74e131c2f21d0d435718 (diff)
Create 40.md
-rw-r--r--40.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/40.md b/40.md
new file mode 100644
index 0000000..bede758
--- /dev/null
+++ b/40.md
@@ -0,0 +1,47 @@
1NIP suggestion for nostr:
2NIP-40
3======
4
5Expiration Timestamp
6-----------------------------------
7
8`draft` `optional` `author:0xtlt`
9
10The `expiration` tag enables users to specify a timestamp at which the message should be considered expired and deleted by relays. This helps ensure that messages are not retained by the network after they are no longer relevant, which helps maintain the privacy of the messages. This is especially useful in cases where a replacement event is not available or feasible.
11
12#### Spec
13
14```
15tag: expiration
16options:
17 - [timestamp]: required
18```
19
20#### Example
21
22```json
23{
24 "pubkey": "<pub-key>",
25 "created_at": 1000000000,
26 "kind": 1,
27 "tags": [
28 ["expiration", 1600000000]
29 ],
30 "content": "This message will expire at the specified timestamp and be deleted by relays.\n",
31 "id": "<event-id>"
32}
33```
34
35Note: The timestamp should be in the same format as the created_at timestamp and should be interpreted as the time at which the message should be deleted by relays.
36
37Client Behavior
38---------------
39
40Clients SHOULD use the `supported_nips` field to learn if a relay supports this NIP. Clients SHOULD NOT send expiration events to relays that do not support this NIP.
41
42Suggested Use Cases
43-------------------
44
45* Temporary announcements - This tag can be used to make temporary announcements that are automatically deleted from the network after a certain amount of time. For example, an event organizer could use this tag to post announcements about an upcoming event, and the announcements will be automatically deleted once the event is over.
46* Limited-time offers - This tag can be used by businesses to make limited-time offers that expire after a certain amount of time. For example, a business could use this tag to make a special offer that is only available for a limited time, and the offer will be automatically deleted from the network once the time has passed.
47* Ephemeral messages - This tag can be used by individuals to send ephemeral messages that are automatically deleted from the network after a certain amount of time. For example, someone could use this tag to send a message that is only visible to the recipient for a short time, and the message will be automatically deleted once the time has passed. This can be useful for sending sensitive information that should not be retained on the network indefinitely.