Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfranca committed Sep 21, 2023
1 parent e3439bc commit 51dd18f
Showing 1 changed file with 34 additions and 28 deletions.
62 changes: 34 additions & 28 deletions 61.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,65 +46,71 @@ 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 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).
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
## Examples

### Private ACL

```js
// Unbounded subscriber list event also part of the unbounded
// A NIP-51 list being part of the unbounded
// "private:5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36" list
{
"kind": 33118,
"kind": 30000,
"tags": [
["d", "random6467362966154779"]
// this is enough to mark it as a "subscribers" unbounded list
["n", "subscribers"],
// This also adds this event to other unbounded list (e.g.: meant
// to hold all pubkeys who can access the
// 5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36 event)
// made of the "subscribers" unbounded list events
// and other events such as NIP-51 Categorized People lists
["d", "close_friends"]
// This event is of an ubounded list meant to hold all pubkeys who can access the
// 5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36 event
["n", "private:5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"],
],
"content": "<NIP-44 encrypted Stringified TAG-List([
["p", "91cf9..4e5ca", "wss://alicerelay.com/"]
["p", "14aeb..8dad4", "wss://bobrelay.com/nostr"],
["p", "612ae..e610f", "ws://carolrelay.com/ws"]
])>",
...other fields
}
```
### People List
```js
// A NIP-51 list being part of the unbounded
// Unbounded subscriber list event also part of the unbounded
// "private:5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36" list
{
"kind": 30000,
"kind": 33118,
"tags": [
["d", "close_friends"]
["d", "random6467362966154779"]
// this is enough to mark it as a "subscribers" unbounded list
["n", "subscribers"],
// This also adds this event to other unbounded list (e.g.: meant
// to hold all pubkeys who can access the
// 5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36 event)
// made of the "subscribers" unbounded list events
// and other events such as the above "close_friends" NIP-51 Categorized People list event
["n", "private:5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"],
],
"content": "<NIP-44 encrypted Stringified TAG-List([
["p", "14aeb..8dad4", "wss://bobrelay.com/nostr"],
["p", "612ae..e610f", "ws://carolrelay.com/ws"]
["p", "91cf9..4e5ca", "wss://alicerelay.com/"]
])>",
...other fields
}
```
### Relationship Status
```js
// Unbounded contact list can be made of
// thousands of events like the one below
// Unbounded contact lists can be made of
// thousands of events like this NIP-81 one below
{
"kind": 33118,
"kind": 30382, // contact kind
"tags": [
["d", "random5189992173907396"]
["n", "contacts"]
["d", "91cf9..4e5ca"] // contact's pubkey
// can fetch all Scammer List but no one else but the author knows
["n", "<NIP-44 encrypted('scammer')>"],
["relay", "<recommended relay>"],
],
"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>`],
["nickname", "Big Joe"],
["summary", "<summary of the relationship>"],
["email", "[email protected]"]
])>",
Expand Down

0 comments on commit 51dd18f

Please sign in to comment.