upleb.uk

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

summaryrefslogtreecommitdiff
path: root/02.md
diff options
context:
space:
mode:
Diffstat (limited to '02.md')
-rw-r--r--02.md24
1 files changed, 13 insertions, 11 deletions
diff --git a/02.md b/02.md
index 2f19908..8b0aee1 100644
--- a/02.md
+++ b/02.md
@@ -1,12 +1,12 @@
1NIP-02 1NIP-02
2====== 2======
3 3
4Contact List and Petnames 4Follow List
5------------------------- 5-----------
6 6
7`final` `optional` `author:fiatjaf` `author:arcbtc` 7`final` `optional`
8 8
9A special event with kind `3`, meaning "contact list" is defined as having a list of `p` tags, one for each of the followed/known profiles one is following. 9A special event with kind `3`, meaning "follow list" is defined as having a list of `p` tags, one for each of the followed/known profiles one is following.
10 10
11Each tag entry should contain the key for the profile, a relay URL where events from that key can be found (can be set to an empty string if not needed), and a local name (or "petname") for that profile (can also be set to an empty string or not provided), i.e., `["p", <32-bytes hex key>, <main relay URL>, <petname>]`. The `content` can be anything and should be ignored. 11Each tag entry should contain the key for the profile, a relay URL where events from that key can be found (can be set to an empty string if not needed), and a local name (or "petname") for that profile (can also be set to an empty string or not provided), i.e., `["p", <32-bytes hex key>, <main relay URL>, <petname>]`. The `content` can be anything and should be ignored.
12 12
@@ -25,27 +25,29 @@ For example:
25} 25}
26``` 26```
27 27
28Every new contact list that gets published overwrites the past ones, so it should contain all entries. Relays and clients SHOULD delete past contact lists as soon as they receive a new one. 28Every new following list that gets published overwrites the past ones, so it should contain all entries. Relays and clients SHOULD delete past following lists as soon as they receive a new one.
29
30Whenever new follows are added to an existing list, clients SHOULD append them to the end of the list, so they are stored in chronological order.
29 31
30## Uses 32## Uses
31 33
32### Contact list backup 34### Follow list backup
33 35
34If one believes a relay will store their events for sufficient time, they can use this kind-3 event to backup their following list and recover on a different device. 36If one believes a relay will store their events for sufficient time, they can use this kind-3 event to backup their following list and recover on a different device.
35 37
36### Profile discovery and context augmentation 38### Profile discovery and context augmentation
37 39
38A client may rely on the kind-3 event to display a list of followed people by profiles one is browsing; make lists of suggestions on who to follow based on the contact lists of other people one might be following or browsing; or show the data in other contexts. 40A client may rely on the kind-3 event to display a list of followed people by profiles one is browsing; make lists of suggestions on who to follow based on the follow lists of other people one might be following or browsing; or show the data in other contexts.
39 41
40### Relay sharing 42### Relay sharing
41 43
42A client may publish a full list of contacts with good relays for each of their contacts so other clients may use these to update their internal relay lists if needed, increasing censorship-resistance. 44A client may publish a follow list with good relays for each of their follows so other clients may use these to update their internal relay lists if needed, increasing censorship-resistance.
43 45
44### Petname scheme 46### Petname scheme
45 47
46The data from these contact lists can be used by clients to construct local ["petname"](http://www.skyhunter.com/marcs/petnames/IntroPetNames.html) tables derived from other people's contact lists. This alleviates the need for global human-readable names. For example: 48The data from these follow lists can be used by clients to construct local ["petname"](http://www.skyhunter.com/marcs/petnames/IntroPetNames.html) tables derived from other people's follow lists. This alleviates the need for global human-readable names. For example:
47 49
48A user has an internal contact list that says 50A user has an internal follow list that says
49 51
50```json 52```json
51[ 53[
@@ -53,7 +55,7 @@ A user has an internal contact list that says
53] 55]
54``` 56```
55 57
56And receives two contact lists, one from `21df6d143fb96c2ec9d63726bf9edc71` that says 58And receives two follow lists, one from `21df6d143fb96c2ec9d63726bf9edc71` that says
57 59
58```json 60```json
59[ 61[