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.md28
1 files changed, 16 insertions, 12 deletions
diff --git a/02.md b/02.md
index 2f19908..4029b22 100644
--- a/02.md
+++ b/02.md
@@ -1,14 +1,16 @@
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>]`.
12
13The `.content` is not used.
12 14
13For example: 15For example:
14 16
@@ -25,27 +27,29 @@ For example:
25} 27}
26``` 28```
27 29
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. 30Every 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.
31
32Whenever 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 33
30## Uses 34## Uses
31 35
32### Contact list backup 36### Follow list backup
33 37
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. 38If 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 39
36### Profile discovery and context augmentation 40### Profile discovery and context augmentation
37 41
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. 42A 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 43
40### Relay sharing 44### Relay sharing
41 45
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. 46A 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 47
44### Petname scheme 48### Petname scheme
45 49
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: 50The 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 51
48A user has an internal contact list that says 52A user has an internal follow list that says
49 53
50```json 54```json
51[ 55[
@@ -53,7 +57,7 @@ A user has an internal contact list that says
53] 57]
54``` 58```
55 59
56And receives two contact lists, one from `21df6d143fb96c2ec9d63726bf9edc71` that says 60And receives two follow lists, one from `21df6d143fb96c2ec9d63726bf9edc71` that says
57 61
58```json 62```json
59[ 63[