Compare commits

...

40 Commits

Author SHA1 Message Date
Vitor Pamplona
4ac023057e
Merge 8dafaf8714 into e942427f8f 2024-12-10 18:11:30 -03:00
Jesus Christ
e942427f8f
nip17: specify order (#1637)
Order specificity is implied better.
2024-12-09 12:13:59 -03:00
Josh Brown
624b989f9f clarify that Standard lists and Sets are both types of lists with heading level 2024-12-09 12:13:20 -03:00
hodlbod
b35dd7d294
Merge pull request #1635 from AsaiToshiya/update-breaking
Update BREAKING.md
2024-12-09 06:30:47 -08:00
Asai Toshiya
b94ad00ac7 BREAKING.md: add NIP-46 change 2024-12-09 13:29:10 +09:00
Asai Toshiya
d71887a8e2 BREAKING.md: merge duplicate lines 2024-12-09 13:19:16 +09:00
Asai Toshiya
33cad5108e
Merge pull request #1633 from Gudnessuche/patch-5
Update 90.md
2024-12-08 21:37:37 +09:00
Jesus Christ
b04922586e
Update 90.md
Added a period to show the end of "Protocol Flow" explanation
2024-12-08 12:34:34 +00:00
Vitor Pamplona
8dafaf8714 moves event set names to the right position on readme 2024-10-11 08:36:13 -04:00
Vitor Pamplona
8cb2ebc46b Merge remote-tracking branch 'upstream/master' into relationship-status
# Conflicts:
#	README.md
2024-10-11 08:35:30 -04:00
Vitor Pamplona
3ba8526756 Fixing kind numbers 2024-06-20 14:35:45 -04:00
Vitor Pamplona
4e0b5fa038 Aligning the Private Relationship status Kind with the other PRs 2024-06-20 14:34:02 -04:00
Vitor Pamplona
a8c573f4ea adds public relationship status to the readme 2024-05-10 20:22:30 -04:00
Vitor Pamplona
bae459a771 Updates relationship status to use event sets. 2024-05-10 20:01:11 -04:00
Vitor Pamplona
89e812488d Merge remote-tracking branch 'upstream/master' into relationship-status
# Conflicts:
#	README.md
2024-05-10 19:50:00 -04:00
Vitor Pamplona
a5ff486989
Update 81.md
Co-authored-by: arthurfranca <arthur.a.franca@gmail.com>
2024-05-10 10:39:33 -04:00
Vitor Pamplona
08d8b1e5ac
Update 81.md
Co-authored-by: arthurfranca <arthur.a.franca@gmail.com>
2024-05-10 10:39:28 -04:00
Vitor Pamplona
a3a678464e
Update 81.md
Co-authored-by: arthurfranca <arthur.a.franca@gmail.com>
2024-05-10 10:39:22 -04:00
Vitor Pamplona
4482a41d90 Creating two event kinds. 2024-03-19 16:16:00 -04:00
Vitor Pamplona
61898c0cd0 Simplifying statuses 2024-03-19 16:01:55 -04:00
Vitor Pamplona
a401682a58 renames nicknames to petnames 2024-02-14 15:01:55 -05:00
Vitor Pamplona
3ff65d1d64 Adds edge cases 2024-02-12 12:17:06 -05:00
Vitor Pamplona
1e7da2bb70 Moves to 10008 kind for name maps 2024-02-12 11:57:50 -05:00
Vitor Pamplona
fbb5abac84 Merge remote-tracking branch 'upstream/master' into relationship-status 2024-02-12 11:53:26 -05:00
Vitor Pamplona
873569c208 formatting 2024-02-12 11:51:45 -05:00
Vitor Pamplona
df362d1461 formatting 2024-02-12 11:49:47 -05:00
Vitor Pamplona
1bcbd31090 wording 2024-02-12 11:49:02 -05:00
Vitor Pamplona
ee6d4e673e enhancing the example with private ntags 2024-02-12 11:48:35 -05:00
Vitor Pamplona
6868e029f9 formatting 2024-02-12 11:46:33 -05:00
Vitor Pamplona
c31a5043a3 Updating NIP-81 to add private and public statuses 2024-02-12 11:42:10 -05:00
Vitor Pamplona
0f4edef69f Switch to random UUID for better security. 2024-02-07 18:33:15 -05:00
Vitor Pamplona
225be8a2a1 correcting the example 2024-02-07 18:00:19 -05:00
Vitor Pamplona
73a2aab8dd Optional n tag 2024-02-07 17:59:27 -05:00
Vitor Pamplona
bd1755f44c Improves formatting 2024-02-07 17:57:53 -05:00
Vitor Pamplona
dc4af5d133 Refines proposal to make relationships private. 2024-02-07 17:54:20 -05:00
Vitor Pamplona
fe00ddd14d
Merge pull request #1 from sudocarlos/patch-1
correct typo
2023-09-06 13:38:32 -04:00
sudocarlos
5cc0c937dc
correct typo 2023-09-04 11:50:32 -04:00
Vitor Pamplona
0006b13d72 adds privately 2023-09-04 11:42:33 -04:00
Vitor Pamplona
b7aa64dab4 Quick adjustments 2023-09-04 11:41:59 -04:00
Vitor Pamplona
a3292f4ae7 First Draft 2023-09-04 11:35:30 -04:00
6 changed files with 87 additions and 11 deletions

2
17.md
View File

@ -133,7 +133,7 @@ When sending a message to anyone, clients must then connect to the relays in the
This example sends the message `Hola, que tal?` from `nsec1w8udu59ydjvedgs3yv5qccshcj8k05fh3l60k9x57asjrqdpa00qkmr89m` to `nsec12ywtkplvyq5t6twdqwwygavp5lm4fhuang89c943nf2z92eez43szvn4dt`.
The two final GiftWraps, one to the receiver and the other to the sender, are:
The two final GiftWraps, one to the receiver and the other to the sender, respectively, are:
```json
{

6
51.md
View File

@ -14,7 +14,7 @@ When new items are added to an existing list, clients SHOULD append them to the
## Types of lists
## Standard lists
### Standard lists
Standard lists use normal replaceable events, meaning users may only have a single list of each kind. They have special meaning and clients may rely on them to augment a user's profile or browsing experience.
@ -36,7 +36,7 @@ For example, _mute list_ can contain the public keys of spammers and bad actors
| Good wiki authors | 10101 | [NIP-54](54.md) user recommended wiki authors | `"p"` (pubkeys) |
| Good wiki relays | 10102 | [NIP-54](54.md) relays deemed to only host useful articles | `"relay"` (relay URLs) |
## Sets
### Sets
Sets are lists with well-defined meaning that can enhance the functionality and the UI of clients that rely on them. Unlike standard lists, users are expected to have more than one set of each kind, therefore each of them must be assigned a different `"d"` identifier.
@ -56,7 +56,7 @@ Aside from their main identifier, the `"d"` tag, sets can optionally have a `"ti
| Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) |
| Release artifact sets | 30063 | groups of files of a software release | `"e"` (kind:1063 [file metadata](94.md) events), `"i"` (application identifier, typically reverse domain notation), `"version"` |
## Deprecated standard lists
### Deprecated standard lists
Some clients have used these lists in the past, but they should work on transitioning to the [standard formats](#standard-lists) above.

75
81.md Normal file
View File

@ -0,0 +1,75 @@
NIP-81
======
Relationship Status
-------------------
`draft` `optional`
This NIP defines two new event kinds (`30382` and `31382`) to document the relationship between two keys.
Both kinds offer public and private tags to describe that relationship. Private tags are JSON Stringified, [NIP-44](44.md)-encrypted to the signer's keys and placed inside the `.content` of the event.
### Public Relationship Status
Event kind `30382` is used when the relationship itself is public. The `d` tag contains the target public key in hex.
```js
{
"kind": 30382,
"tags": [
["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"],
["n", "follow"],
["n", "bitcoiner"],
["n", "6064460175057025"]
],
"content": nip44Encrypt(JSON.stringify([
["petname", "NVK (Coldcard)"],
["summary", "Owes me a beer"]
])),
// ...other fields
}
```
`petname` SHOULD be rendered instead of the person's display name in all interfaces when the signer of this event is logged in.
### Relationship Categories
Optional `n` tags `["n", "<identifier>"]` add the target key to event sets. This allows clients to query by `n` and download all members of a set.
Set `identifier` can be human readable and public or not.
For private cases, a new event kind named "Event Set Names" (`kind:10008`) uses `map` tags to store the set name. Clients SHOULD display the `name` instead of the `identifier` if the `identifier` is present in this event.
```js
{
"kind": 10008,
"content": nip44Encrypt(JSON.stringify([
["map", "<identifier>", "<name>"],
["map", "bitcoiner", "bitcoiner"],
["map", "6064460175057025", "debtor"]
])),
// ...other fields
}
```
### Private Relationship Status
For relationships that must remain private (e.g private follows, client lists, etc), the event kind `31382` uses a similar structure but with a hashed `d` tag using [NIP-44](44.md)'s `hkdf` function.
```js
{
"kind": 31382,
"tags": [
["d", sha256(hkdf(private_key, salt: 'nip81') || "<pubkey>")],
["n", "6064460175057025"],
],
"content": nip44Encrypt(JSON.stringify([
["p", "<pubkey>", "<relay url>"],
["n", "client-list"],
["petname", "<My buddy>"],
["summary", "<Summary of the relationship>"],
])),
// ...other fields
}
```

2
90.md
View File

@ -185,7 +185,7 @@ Any job feedback event MIGHT include results in the `.content` field, as describ
* Customer publishes a job request (e.g. `kind:5000` speech-to-text).
* Service Providers MAY submit `kind:7000` job-feedback events (e.g. `payment-required`, `processing`, `error`, etc.).
* Upon completion, the service provider publishes the result of the job with a `kind:6000` job-result event.
* At any point, if there is an `amount` pending to be paid as instructed by the service provider, the user can pay the included `bolt11` or zap the job result event the service provider has sent to the user
* At any point, if there is an `amount` pending to be paid as instructed by the service provider, the user can pay the included `bolt11` or zap the job result event the service provider has sent to the user.
Job feedback (`kind:7000`) and Job Results (`kind:6000-6999`) events MAY include an `amount` tag, this can be interpreted as a suggestion to pay. Service Providers MUST use the `payment-required` feedback event to signal that a payment is required and no further actions will be performed until the payment is sent.

View File

@ -5,6 +5,7 @@ reverse chronological order.
| Date | Commit | NIP | Change |
| ----------- | --------- | -------- | ------ |
| 2024-12-05 | [6d16019e](https://github.com/nostr-protocol/nips/commit/6d16019e) | [46](46.md) | message encryption was changed to NIP-44 |
| 2024-11-12 | [2838e3bd](https://github.com/nostr-protocol/nips/commit/2838e3bd) | [29](29.md) | `kind: 12` and `kind: 10` were removed (use `kind: 1111` instead) |
| 2024-11-12 | [926a51e7](https://github.com/nostr-protocol/nips/commit/926a51e7) | [46](46.md) | NIP-05 login was removed |
| 2024-11-12 | [926a51e7](https://github.com/nostr-protocol/nips/commit/926a51e7) | [46](46.md) | `create_account` method was removed |
@ -30,8 +31,7 @@ reverse chronological order.
| 2024-02-07 | [d3dad114](https://github.com/nostr-protocol/nips/commit/d3dad114) | [46](46.md) | Connection token format was changed |
| 2024-01-30 | [1a2b21b6](https://github.com/nostr-protocol/nips/commit/1a2b21b6) | [59](59.md) | 'p' tag became optional |
| 2023-01-27 | [c2f34817](https://github.com/nostr-protocol/nips/commit/c2f34817) | [47](47.md) | optional expiration tag should be honored |
| 2024-01-10 | [3d8652ea](https://github.com/nostr-protocol/nips/commit/3d8652ea) | [02](02.md) | list entries should be chronological |
| 2024-01-10 | [3d8652ea](https://github.com/nostr-protocol/nips/commit/3d8652ea) | [51](51.md) | list entries should be chronological |
| 2024-01-10 | [3d8652ea](https://github.com/nostr-protocol/nips/commit/3d8652ea) | [02](02.md), [51](51.md) | list entries should be chronological |
| 2023-12-30 | [29869821](https://github.com/nostr-protocol/nips/commit/29869821) | [52](52.md) | 'name' tag was removed (use 'title' tag instead) |
| 2023-12-27 | [17c67ef5](https://github.com/nostr-protocol/nips/commit/17c67ef5) | [94](94.md) | 'aes-256-gcm' tag was removed |
| 2023-12-03 | [0ba45895](https://github.com/nostr-protocol/nips/commit/0ba45895) | [01](01.md) | WebSocket status code `4000` was replaced by 'CLOSED' message |
@ -46,10 +46,7 @@ reverse chronological order.
| 2023-08-21 | [89915e02](https://github.com/nostr-protocol/nips/commit/89915e02) | [11](11.md) | 'min_prefix' was removed |
| 2023-08-20 | [37c4375e](https://github.com/nostr-protocol/nips/commit/37c4375e) | [01](01.md) | replaceable events with same timestamp should be retained event with lowest id |
| 2023-08-15 | [88ee873c](https://github.com/nostr-protocol/nips/commit/88ee873c) | [15](15.md) | 'countries' tag was renamed to 'regions' |
| 2023-08-14 | [72bb8a12](https://github.com/nostr-protocol/nips/commit/72bb8a12) | [12](12.md) | NIP-12, 16, 20 and 33 were merged into NIP-01 |
| 2023-08-14 | [72bb8a12](https://github.com/nostr-protocol/nips/commit/72bb8a12) | [16](16.md) | NIP-12, 16, 20 and 33 were merged into NIP-01 |
| 2023-08-14 | [72bb8a12](https://github.com/nostr-protocol/nips/commit/72bb8a12) | [20](20.md) | NIP-12, 16, 20 and 33 were merged into NIP-01 |
| 2023-08-14 | [72bb8a12](https://github.com/nostr-protocol/nips/commit/72bb8a12) | [33](33.md) | NIP-12, 16, 20 and 33 were merged into NIP-01 |
| 2023-08-14 | [72bb8a12](https://github.com/nostr-protocol/nips/commit/72bb8a12) | [12](12.md), [16](16.md), [20](20.md), [33](33.md) | NIP-12, 16, 20 and 33 were merged into NIP-01 |
| 2023-08-11 | [d87f8617](https://github.com/nostr-protocol/nips/commit/d87f8617) | [25](25.md) | empty `content` should be considered as "+" |
| 2023-08-01 | [5d63b157](https://github.com/nostr-protocol/nips/commit/5d63b157) | [57](57.md) | 'zap' tag was changed |
| 2023-07-15 | [d1814405](https://github.com/nostr-protocol/nips/commit/d1814405) | [01](01.md) | `since` and `until` filters should be `since <= created_at <= until` |

View File

@ -86,6 +86,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-73: External Content IDs](73.md)
- [NIP-75: Zap Goals](75.md)
- [NIP-78: Application-specific data](78.md)
- [NIP-81: Relationship Status](81.md)
- [NIP-84: Highlights](84.md)
- [NIP-86: Relay Management API](86.md)
- [NIP-89: Recommended Application Handlers](89.md)
@ -168,6 +169,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `10005` | Public chats list | [51](51.md) |
| `10006` | Blocked relays list | [51](51.md) |
| `10007` | Search relays list | [51](51.md) |
| `10008` | Event Set Names | [81](81.md) |
| `10009` | User groups | [51](51.md), [29](29.md) |
| `10015` | Interests list | [51](51.md) |
| `10019` | Nutzap Mint Recommendation | [61](61.md) |
@ -206,6 +208,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `30078` | Application-specific Data | [78](78.md) |
| `30311` | Live Event | [53](53.md) |
| `30315` | User Statuses | [38](38.md) |
| `30382` | Public Relationship Status | [81](81.md) |
| `30388` | Slide Set | [Corny Chat][cornychat-slideset] |
| `30402` | Classified Listing | [99](99.md) |
| `30403` | Draft Classified Listing | [99](99.md) |
@ -213,6 +216,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `30618` | Repository state announcements | [34](34.md) |
| `30818` | Wiki article | [54](54.md) |
| `30819` | Redirects | [54](54.md) |
| `31382` | Private Relationship Status | [81](81.md) |
| `31388` | Link Set | [Corny Chat][cornychat-linkset] |
| `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] |
| `31922` | Date-Based Calendar Event | [52](52.md) |