mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
NIP-0A - Contact List v2
This commit is contained in:
parent
a92d2e2edd
commit
b5a35af15b
29
0A.md
Normal file
29
0A.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
NIP-0A
|
||||||
|
======
|
||||||
|
|
||||||
|
Contact List v2
|
||||||
|
---------------
|
||||||
|
|
||||||
|
This is an early draft, I'll flesh out details after discussion.
|
||||||
|
|
||||||
|
Event tags would look like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
["contact", "<pubkey1>", "in", "<timestamp1>"]
|
||||||
|
["contact", "<pubkey2>", "out", "<timestamp2>"]
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that they are not 'p' tags, they don't need delivery to the person's INBOX.
|
||||||
|
But maybe they should be searchable to people can count their "followers".
|
||||||
|
|
||||||
|
When you add a person, you find their entry and change the last two fields to "in" and the current timestamp.
|
||||||
|
|
||||||
|
When you remove a person, you find their entry and change the last two fields to "out" and the current timestamp.
|
||||||
|
|
||||||
|
When merging two events, you accept the entry with the largest timestamp.
|
||||||
|
|
||||||
|
Note that we have to keep the "out" entries in case we later get an "in" entry dated earlier, we can
|
||||||
|
ignore such an add.
|
||||||
|
|
||||||
|
This is functionally implements a Last-Write-Wins Element Set, which is a conflict-free replicated data set
|
||||||
|
with eventual consistency.
|
Loading…
Reference in New Issue
Block a user