Compare commits

..

24 Commits

Author SHA1 Message Date
fiatjaf
e976d2f32d add kind:10 threaded chat replies. 2024-02-26 14:54:48 -03:00
fiatjaf
188f398c86 remove reference to trimmed signatures until that is more developed. 2024-02-23 20:52:15 -03:00
fiatjaf
e4d7618ace remove naddr stuff, use a different identifier format. 2024-02-23 20:52:15 -03:00
fiatjaf
dc290d51bc update "previous" stuff. 2024-02-23 20:52:15 -03:00
fiatjaf
c9ff5f6312 add kind 10009 for public list of simple groups. 2024-02-23 20:52:15 -03:00
fiatjaf
a528587eaa remove "alt" from event templates for brevity. 2024-02-23 20:52:15 -03:00
fiatjaf
1f92cd0313 admins prefixed by "p". 2024-02-23 20:52:15 -03:00
Pablo Fernandez
5a3097c6e6 add optional list of members 2024-02-23 20:52:15 -03:00
Pablo Fernandez
6698d91382 add nip-10 note 2024-02-23 20:52:15 -03:00
Pablo Fernandez
5e0c0b5fee add kind:12 2024-02-23 20:52:15 -03:00
fiatjaf
363212b375 add kinds to README. 2024-02-23 20:52:12 -03:00
fiatjaf
7e7ddea055 edit-group-status permission. 2024-02-23 20:51:46 -03:00
fiatjaf
50db74f93a public and open tags and join request event. 2024-02-23 20:51:46 -03:00
fiatjaf
3e638eac5f update meta events description. 2024-02-23 20:51:46 -03:00
fiatjaf
94da86a3e7 delete-event as kind 9005. 2024-02-23 20:51:46 -03:00
fiatjaf
5551f1f57a saner approach with multiple kinds for moderation. 2024-02-23 20:51:46 -03:00
fiatjaf
513644d920 flesh out the entire thing. 2024-02-23 20:51:46 -03:00
fiatjaf
a91798ba39 fix delete-message => delete-event. 2024-02-23 20:51:46 -03:00
fiatjaf
3ed14fe70a some new ideas + making this universal and not only applicable to chat. 2024-02-23 20:51:46 -03:00
fiatjaf
c2cecdd668 add missing / to "flavors" in example. 2024-02-23 20:51:46 -03:00
fiatjaf
5084fe2e08 fix kind number for moderation event. 2024-02-23 20:51:46 -03:00
fiatjaf
d1f08d724c add and remove permissions actions. 2024-02-23 20:51:46 -03:00
fiatjaf
16407807de split hostname and subgroup path into two different tag items. 2024-02-23 20:51:46 -03:00
fiatjaf
ae952e36df NIP-29: Simple Group Chat. 2024-02-23 20:51:46 -03:00
6 changed files with 5 additions and 176 deletions

7
18.md
View File

@@ -20,10 +20,9 @@ reposted.
## Quote Reposts
Quote reposts are `kind 1` events with an embedded `q` tag of the note being
quote reposted. The `q` tag ensures quote reposts are not pulled and included
as replies in threads. It also allows you to easily pull and count all of the
quotes for a post.
Quote reposts are `kind 1` events with an embedded `e` tag
(see [NIP-08](08.md) and [NIP-27](27.md)). Because a quote repost includes
an `e` tag, it may show up along replies to the reposted note.
## Generic Reposts

102
34.md
View File

@@ -1,102 +0,0 @@
NIP-34
======
`git` stuff
-----------
`draft` `optional`
This NIP defines all the ways code collaboration using and adjacent to [`git`](https://git-scm.com/) can be done using Nostr.
## Repository announcements
Git repositories are hosted in Git-enabled servers, but their existence can be announced using Nostr events, as well as their willingness to receive patches, bug reports and comments in general.
```jsonc
{
"kind": 30617,
"content": "",
"tags": [
["d", "<repo-id>"],
["name", "<human-readable project name>"],
["description", "brief human-readable project description>"],
["web", "<url for browsing>", ...], // a webpage url, if the git server being used provides such a thing
["clone", "<url for git-cloning>", ...], // a url to be given to `git clone` so anyone can clone it
["relays", "<relay-url>", ...] // relays that this repository will monitor for patches and issues
]
}
```
The tags `web`, `clone`, `relays` can have multiple values.
Except `d`, all tags are optional.
## Patches
Patches can be sent by anyone to any repository. Patches to a specific repository SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. Patch events SHOULD include an `a` tag pointing to that repository's announcement address.
```jsonc
{
"kind": 1617,
"content": "<patch>", // contents of <git format-patch>
"tags": [
["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"],
["p", "<repository-owner>"],
["p", "<other-user>"], // optionally send the patch to another user to bring it to their attention
// for the first patch in a thread or series
["t", "root"],
// optional tags for when it is desirable that the merged patch has a stable commit id
// these fields are necessary for ensuring that the commit resulting from applying a patch
// has the same id as it had in the proposer's machine -- all these tags can be omitted
// if the maintainer doesn't care about these things
["commit", "<current-commit-id>"],
["parent-commit", "<parent-commit-id>"],
["commit-pgp-sig", "-----BEGIN PGP SIGNATURE-----..."], // empty string for unsigned commit
["committer", "<name>", "<email>", "<timestamp>", "<timezone offset in minutes>"],
]
}
```
## Issues
Issues are Markdown text that is just human-readable conversational threads related to the repository: bug reports, feature requests, questions or comments of any kind. Like patches, these SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag.
```jsonc
{
"kind": 1621,
"content": "<markdown text>",
"tags": [
["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"],
["p", "<repository-owner>"]
]
}
```
## Replies
Replies are also Markdown text. The difference is that they MUST be issued as replies to either a `kind:1621` _issue_ or a `kind:1617` _patch_ event. The threading of replies and patches should follow NIP-10 rules.
```jsonc
{
"kind": 1622,
"content": "<markdown text>",
"tags": [
["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>", "<relay-url>"],
["e", "<issue-or-patch-id-hex>", "", "root"],
// other "e" and "p" tags should be applied here when necessary, following the threading rules of NIP-10
["p", "<patch-author-pubkey-hex>", "", "mention"],
["e", "<previous-reply-id-hex>", "", "reply"],
// ...
]
}
```
## Possible things to be added later
- "status" kind (for letting people know a patch was merged or an issue was fixed or won't be fixed)
- "branch merge" kind (specifying a URL from where to fetch the branch to be merged)
- "cover letter" kind (to which multiple patches can refer and serve as a unifying layer to them)
- inline file comments kind (we probably need one for patches and a different one for merged files)

4
50.md
View File

@@ -47,7 +47,3 @@ Relays SHOULD exclude spam from search results by default if they support some f
Relay MAY support these extensions:
- `include:spam` - turn off spam filtering, if it was enabled by default
- `domain:<domain>` - include only events from users whose valid nip05 domain matches the domain
- `language:<two letter ISO 639-1 language code>` - include only events of a specified language
- `sentiment:<negative/neutral/positive>` - include only events of a specific sentiment
- `nsfw:<true/false>` - include or exclude nsfw events (default: true)

55
64.md
View File

@@ -1,55 +0,0 @@
NIP-64
======
Inbox model
-----------
`draft` `optional`
Suppose **Sarah** wants to subscribe to the notes **Walter** writes.
She must let Walter know she is following him. The first step is to find Walter's _inbox list_:
```jsonc
{
"kind": 10064,
"pubkey": "<walter>",
"tags": [
["relay", "wss://walter.inbox"]
]
}
```
Now Sarah can publish a `kind:6401` _follow intent_ to `wss://walter.inbox` tagging Walter:
```jsonc
{
"kind": 6401,
"pubkey": "<sarah>"
"tags": [
["p", "<walter>"],
["relay", "wss://sarah.inbox"],
["relay", "wss://other.inbox"]
]
}
```
Sarah also publishes these to her own inbox relays (`wss://sarah.inbox` and `wss://other.inbox`) so they are aware.
From the Walter side, whenever he is about to publish a note, he downloads all the `kind:6401` events from his inbox relays and sends his note to all the relays he finds in these.
Whenever Sarah's inbox relay receive a note from Walter, they will know that Sarah is following him, so they index that note in a way that it is associated with Sarah. If the relays receive a note from someone else they can simply reject the note.
When Sarah turns on her client she will connect to her inbox relay, perform [NIP-42](42.md) `AUTH` and create a subscription that doesn't specify `"authors"` (for example, `["REQ", "_", {}]`). The relays, aware of who she is and who she is following, can deliver to her just Walter's notes.
If Sarah ever decides to stop following Walter, she just sends a `kind:5` _deletion_ to both Walter's relay and hers.
---
The approach described in this NIP doesn't replace any of the other models for following people that are already in use in Nostr, and doesn't claim to be strictly superior to the Outbox Model, but just provides an alternative way to do things.
In reality, clients should implement both approaches and can never assume others will implement this.
For example, if Sarah wanted to follow Wesley and he didn't have a `kind:10064` she would have to do the normal "outbox" approach of subscribing to his relays and fetching his notes from there.
In the same vein, if for any reason Sarah noticed that she had stopped receiving notes from Walter for a long time (~7 days) it would make sense for her to go to his relays (obtained from [NIP-65](65.md), [NIP-05](05.md), relay hints or other means) and check if he is publishing to these. In the affirmative case, she would turn Walter into an "outbox follow" instead of an "inbox follow".

View File

@@ -5,7 +5,6 @@ reverse chronological order.
| Date | Commit | NIP | Change |
| ----------- | --------- | -------- | ------ |
| 2024-02-25 | [4a171cb0](https://github.com/nostr-protocol/nips/commit/4a171cb0) | [NIP-18](18.md) | quote repost should use `q` tag |
| 2024-02-16 | [cbec02ab](https://github.com/nostr-protocol/nips/commit/cbec02ab) | [NIP-49](49.md) | Password first normalized to NFKC |
| 2024-02-15 | [afbb8dd0](https://github.com/nostr-protocol/nips/commit/afbb8dd0) | [NIP-39](39.md) | PGP identity was removed |
| 2024-02-07 | [d3dad114](https://github.com/nostr-protocol/nips/commit/d3dad114) | [NIP-46](46.md) | Connection token format was changed |

View File

@@ -49,7 +49,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-30: Custom Emoji](30.md)
- [NIP-31: Dealing with Unknown Events](31.md)
- [NIP-32: Labeling](32.md)
- [NIP-34: `git` stuff](34.md)
- [NIP-36: Sensitive Content](36.md)
- [NIP-38: User Statuses](38.md)
- [NIP-39: External Identities in Profiles](39.md)
@@ -111,9 +110,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `1059` | Gift Wrap | [59](59.md) |
| `1063` | File Metadata | [94](94.md) |
| `1311` | Live Chat Message | [53](53.md) |
| `1617` | Patches | [34](34.md) |
| `1621` | Issues | [34](34.md) |
| `1622` | Replies | [34](34.md) |
| `1971` | Problem Tracker | [nostrocket][nostrocket] |
| `1984` | Reporting | [56](56.md) |
| `1985` | Label | [32](32.md) |
@@ -166,7 +162,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `30315` | User Statuses | [38](38.md) |
| `30402` | Classified Listing | [99](99.md) |
| `30403` | Draft Classified Listing | [99](99.md) |
| `30617` | Repository announcements | [34](34.md) |
| `31922` | Date-Based Calendar Event | [52](52.md) |
| `31923` | Time-Based Calendar Event | [52](52.md) |
| `31924` | Calendar | [52](52.md) |
@@ -219,7 +214,6 @@ Please update these lists when proposing NIPs introducing new event kinds.
| `l` | label, label namespace | annotations | [32](32.md) |
| `L` | label namespace | -- | [32](32.md) |
| `m` | MIME type | -- | [94](94.md) |
| `q` | event id (hex) | relay URL | [18](18.md) |
| `r` | a reference (URL, etc) | petname | |
| `r` | relay url | marker | [65](65.md) |
| `t` | hashtag | -- | |
@@ -228,10 +222,9 @@ Please update these lists when proposing NIPs introducing new event kinds.
| `bolt11` | `bolt11` invoice | -- | [57](57.md) |
| `challenge` | challenge string | -- | [42](42.md) |
| `client` | name, address | relay URL | [89](89.md) |
| `clone` | git clone URL | -- | [34](34.md) |
| `content-warning` | reason | -- | [36](36.md) |
| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) |
| `description` | description | -- | [34](34.md), [57](57.md), [58](58.md) |
| `description` | invoice/badge description | -- | [57](57.md), [58](58.md) |
| `emoji` | shortcode, image URL | -- | [30](30.md) |
| `encrypted` | -- | -- | [90](90.md) |
| `expiration` | unix timestamp (string) | -- | [40](40.md) |
@@ -240,7 +233,7 @@ Please update these lists when proposing NIPs introducing new event kinds.
| `imeta` | inline metadata | -- | [92](92.md) |
| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) |
| `location` | location string | -- | [52](52.md), [99](99.md) |
| `name` | name | -- | [34](34.md), [58](58.md) |
| `name` | badge name | -- | [58](58.md) |
| `nonce` | random | -- | [13](13.md) |
| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) |
| `price` | price | currency, frequency | [99](99.md) |
@@ -253,7 +246,6 @@ Please update these lists when proposing NIPs introducing new event kinds.
| `summary` | article summary | -- | [23](23.md) |
| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) |
| `title` | article title | -- | [23](23.md) |
| `web` | webpage URL | -- | [34](34.md) |
| `zap` | pubkey (hex), relay URL | weight | [57](57.md) |
## Criteria for acceptance of NIPs