-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relationship status #761
base: master
Are you sure you want to change the base?
Relationship status #761
Conversation
cc @Semisol |
Will this allow for |
Previous discussion regarding contact list at #349 |
correct typo
@alexgleason I think NIP-32 may be the best way to declare public relationship statuses. |
There are so many jokes here that I don't know if this proposal has any legs 😅 |
Most "Relationship Status" lists will have few items so NIP-51 would be enough. @vitorpamplona Please take a look at this example I just added there: Lines 53 to 87 in 8ae2b5d
|
So, the goal for Relationship Status is that most of us have over 10,000 contacts (not friends, not follows, just contacts). And a list with 10,000 people is quite a heavy list to be updated all the time. That was the reason to start this. Like, an email client, for instance, can have a status group for every person that sent you an e-mail. Instead of updating the list in every new e-mail and blasting all relays with it, the client just adds a Relationship Status event. |
So, with my unbounded list proposal (basically the {
"kind": 33118,
"tags": [
["d", "random6467362966154779"]
["n", "contacts"]
],
"content": "<NIP-44 encrypted Stringified TAG-List([
["p", "91cf9..4e5ca", "wss://alicerelay.com/", "Alice"],
["status", `<Known Face, Contact, Following, Coworker,
Friend, Partner, Family, Extended family, Trusted,
Competitor, Traitor, Used to Know, Scammer, NSFW,
Unkown, etc>`],
["summary", "<summary of the relationship>"],
["email", "[email protected]"]
])>",
...other fields
} The difference is that you can later add the same entry simultaneously to another unbounded list editing it and adding a new Want all contacts, search by the n tag and author. Edit: the event is supposed to hold just one |
@vitorpamplona Added you as author and also the "contacts" example there at #784 |
I am confused. What does it do? Why would I add the entry to another unbounded list? |
I would separate the status example from a people list example. Otherwise, you have to link each So, an unbound list allows a client to search for multiple You could turn the Wouldn't that be the right way to do this? |
A kind 33118 event was meant to have a single
Hmm got it you want to have kind 30382 with a p tag unencrypted (to able to use on filter). I encrypted the {
"kind": 30382, // can fetch all contacts
"tags": [
["d", "91cf9..4e5ca"]
["n", <NIP-44 encrypted("known_face")>], // can fetch all "known_face"s but no one knows the status
["relay", "<recommended relay>"],
],
"content": "<NIP-44 encrypted Stringified TAG-List([
["nickname", "<My buddy>"],
["summary", "<summary of the relationship>"],
["email", "[email protected]"]
])>",
...other fields
} Is this it? |
If the above I encrypted it because someone may get mad if it discovers his friend labeled him as a "scammer" or something worse =o |
ohh interesting.. i didn't know the
Maybe using status for |
Just tested it. It is not deterministic =(
|
If searching by the status at [
["status", "<status 1>", "random string 1"],
["status", "Big Time Scammer", "6064460175057025"]
] Then the |
@arthurfranca I am back to this, changed it to a private status (hash of the key as I will be using this to document a list of Patients a doctor is taking care of. People can count how many patients a doctor has, but the relationship between them should be fully private. |
- Petnames implemented following Vitor's NIP-81 proposal in nostr-protocol/nips#761 - Documented use of 30311 and 30382 kinds in data types page - Added more known supporters to about page - Set volume of some doorbell sounds to half - Added doorbell preview
Co-authored-by: arthurfranca <[email protected]>
Co-authored-by: arthurfranca <[email protected]>
Co-authored-by: arthurfranca <[email protected]>
# Conflicts: # README.md
I'm in favor of this NIP. Corny Chat implemented basic support for NIP-81, kind 30382 on 2024-05-06 for petnames. This is an exceptionally useful feature so that users can actually start giving personal names to pubkeys which helps resolve who's who amongst the Dans, and acts as a defence against impersonation. NIP-44 encryption is used for those whose extensions support it. Otherwise it falls back to plain text. |
@alexgleason did you add 30382 based on this NIP? @vicariousdrama @alexgleason can you check if the NIP text matches your implementations? If not, I can change the text. |
@vitorpamplona You can run I am using custom {
"kind": 30382,
"id": "3a7f95cb6b72a2ebdac6c3f1410e33685efb2644ae18e7be1f5f8933a8f4d59b",
"pubkey": "db0e60d10b9555a39050c258d460c5c461f6d18f467aa9f62de1a728b8a891a4",
"created_at": 1718215730,
"tags": [
["d", "932614571afcbad4d17a191ee281e39eebbb41b93fac8fd87829622aeb112f4d"],
["n", "admin"],
["n", "suggest"],
["n", "suggested"]
],
"content": "",
"sig": "ca77c7313785f39434c1b944865fcce73f1053947e69ef6667e7c76a2ef8af70af6d1d37cd6cc8e530907868ffeec85412d0e6e9c7f973b29a5de6b2cc3be2b7"
}
I am using this in a slightly unconventional way, but it all makes sense. I intend for regular users to also create kind 30382 events for things like private notes about users, and for users to suggest other users in future updates. |
Nice! I am not sure if the |
👍 |
README.md
Outdated
| `30402` | Classified Listing | [99](99.md) | | ||
| `30403` | Draft Classified Listing | [99](99.md) | | ||
| `30617` | Repository announcements | [34](34.md) | | ||
| `30818` | Wiki article | [54](54.md) | | ||
| `31382` | Private Relationship Status| [81](81.md) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
31383
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that's for the event, according to the old version of #784, 31382 is for private relationship between public keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but there is no reference to 31383 in this PR, so then it shouldn't be in the README either unless it is explained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused, 31383 is not in the readme.
Public 30382
Private 31382
I've checked how I've implemented this in Corny Chat, and only use kind 30382. The |
ACK. Looks good to me. |
Is there a reason why the |
It's so that you can only have one 30382 per key. |
Ah. I see. 🤔 That makes sense, since they're replaceable events, but a bit confusing. |
Uses unbound lists to create events that define the relationship between two pubkeys in a public or private manner.
Read here