NIP-0A - Contact List v2

This commit is contained in:
Mike Dilger 2024-12-07 11:44:28 +13:00
parent a92d2e2edd
commit b5a35af15b
No known key found for this signature in database
GPG Key ID: 47581A78D4329BA4

29
0A.md Normal file
View 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.