From b5a35af15b1f715aa28a9e1d826629137842ef7c Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Sat, 7 Dec 2024 11:44:28 +1300 Subject: [PATCH] NIP-0A - Contact List v2 --- 0A.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 0A.md diff --git a/0A.md b/0A.md new file mode 100644 index 0000000..f41f901 --- /dev/null +++ b/0A.md @@ -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", "", "in", ""] + ["contact", "", "out", ""] +``` + +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.