Skip to content

Commit

Permalink
Add contact event example
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfranca committed Sep 21, 2023
1 parent 8ae2b5d commit e3439bc
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions 61.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NIP-61
Unbounded List
--------------

`draft` `optional` `author:arthurfranca`
`draft` `optional` `author:arthurfranca` `author:vitorpamplona`

An unbounded list is a group of events with the same pubkey and `n` (name) tag.
An event can have many `n` tags, thus being member of many unbounded lists.
Expand Down Expand Up @@ -46,11 +46,13 @@ Tags other than `d` and `n` may be encrypted with [NIP-44](#44.md) similar to NI

An event with kind `33118` is defined as a parameterized replaceable unbounded list event for people.
The `n` tag(s) holds the list name(s) the event is currently part of.
The `p` tags included in these lists MUST follow the format of kind 3 events as defined in [NIP-02 - Contact List and Petnames](02.md).
The single `p` tag included in these lists MUST follow the format of kind 3 events as defined in [NIP-02 - Contact List and Petnames](02.md).

## Event Examples

```js
// Unbounded subscriber list event also part of the unbounded
// "private:5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36" list
{
"kind": 33118,
"tags": [
Expand All @@ -72,6 +74,8 @@ The `p` tags included in these lists MUST follow the format of kind 3 events as
```
```js
// A NIP-51 list being part of the unbounded
// "private:5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36" list
{
"kind": 30000,
"tags": [
Expand All @@ -85,3 +89,25 @@ The `p` tags included in these lists MUST follow the format of kind 3 events as
...other fields
}
```
```js
// Unbounded contact list can be made of
// thousands of events like the one below
{
"kind": 33118,
"tags": [
["d", "random5189992173907396"]
["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
}
```

0 comments on commit e3439bc

Please sign in to comment.