mirror of
https://github.com/nostr-protocol/nips.git
synced 2026-02-17 21:34:32 +00:00
Compare commits
4 Commits
announceme
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6df3a218c9 | ||
|
|
b914aeffd8 | ||
|
|
5a4734f8b7 | ||
|
|
5d232e6525 |
233
11.md
233
11.md
@@ -22,8 +22,7 @@ When a relay receives an HTTP(s) request with an `Accept` header of `application
|
|||||||
"supported_nips": <a list of NIP numbers supported by the relay>,
|
"supported_nips": <a list of NIP numbers supported by the relay>,
|
||||||
"software": <string identifying relay software URL>,
|
"software": <string identifying relay software URL>,
|
||||||
"version": <string version identifier>,
|
"version": <string version identifier>,
|
||||||
"privacy_policy": <a link to a text file describing the relay's privacy policy>,
|
"terms_of_service": <a link to a text file describing the relay's term of service>
|
||||||
"terms_of_service": <a link to a text file describing the relay's term of service>,
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -81,15 +80,9 @@ The relay server implementation MAY be provided in the `software` attribute. If
|
|||||||
|
|
||||||
The relay MAY choose to publish its software version as a string attribute. The string format is defined by the relay implementation. It is recommended this be a version number or commit identifier.
|
The relay MAY choose to publish its software version as a string attribute. The string format is defined by the relay implementation. It is recommended this be a version number or commit identifier.
|
||||||
|
|
||||||
### Privacy Policy
|
|
||||||
|
|
||||||
The relay owner/admin MAY choose to link to a privacy policy document, which describes how the relay utilizes user data. Data collection, data usage, data retention, monetization of data, and third party data sharing SHOULD be included.
|
|
||||||
|
|
||||||
### Terms of Service
|
### Terms of Service
|
||||||
|
|
||||||
The relay owner/admin MAY choose to link to a terms of service document.
|
The relay MAY choose to publish its software version as a string attribute. The string format is defined by the relay implementation. It is recommended this be a version number or commit identifier.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Extra Fields
|
Extra Fields
|
||||||
------------
|
------------
|
||||||
@@ -167,112 +160,6 @@ a specific niche kind or content. Normal anti-spam heuristics, for example, do n
|
|||||||
|
|
||||||
- `default_limit`: The maximum returned events if you send a filter without a `limit`.
|
- `default_limit`: The maximum returned events if you send a filter without a `limit`.
|
||||||
|
|
||||||
### Event Retention
|
|
||||||
|
|
||||||
There may be a cost associated with storing data forever, so relays
|
|
||||||
may wish to state retention times. The values stated here are defaults
|
|
||||||
for unauthenticated users and visitors. Paid users would likely have
|
|
||||||
other policies.
|
|
||||||
|
|
||||||
Retention times are given in seconds, with `null` indicating infinity.
|
|
||||||
If zero is provided, this means the event will not be stored at
|
|
||||||
all, and preferably an error will be provided when those are received.
|
|
||||||
|
|
||||||
```jsonc
|
|
||||||
{
|
|
||||||
"retention": [
|
|
||||||
{"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600},
|
|
||||||
{"kinds": [[40000, 49999]], "time": 100},
|
|
||||||
{"kinds": [[30000, 39999]], "count": 1000},
|
|
||||||
{"time": 3600, "count": 10000}
|
|
||||||
],
|
|
||||||
// other fields...
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
`retention` is a list of specifications: each will apply to either all kinds, or
|
|
||||||
a subset of kinds. Ranges may be specified for the kind field as a tuple of inclusive
|
|
||||||
start and end values. Events of indicated kind (or all) are then limited to a `count`
|
|
||||||
and/or time period.
|
|
||||||
|
|
||||||
It is possible to effectively blacklist Nostr-based protocols that rely on
|
|
||||||
a specific `kind` number, by giving a retention time of zero for those `kind` values.
|
|
||||||
While that is unfortunate, it does allow clients to discover servers that will
|
|
||||||
support their protocol quickly via a single HTTP fetch.
|
|
||||||
|
|
||||||
There is no need to specify retention times for _ephemeral events_ since they are not retained.
|
|
||||||
|
|
||||||
### Content Limitations
|
|
||||||
|
|
||||||
Some relays may be governed by the arbitrary laws of a nation state. This
|
|
||||||
may limit what content can be stored in clear-text on those relays. All
|
|
||||||
clients are encouraged to use encryption to work around this limitation.
|
|
||||||
|
|
||||||
It is not possible to describe the limitations of each country's laws
|
|
||||||
and policies which themselves are typically vague and constantly shifting.
|
|
||||||
|
|
||||||
Therefore, this field allows the relay operator to indicate which
|
|
||||||
countries' laws might end up being enforced on them, and then
|
|
||||||
indirectly on their users' content.
|
|
||||||
|
|
||||||
Users should be able to avoid relays in countries they don't like,
|
|
||||||
and/or select relays in more favorable zones. Exposing this
|
|
||||||
flexibility is up to the client software.
|
|
||||||
|
|
||||||
```jsonc
|
|
||||||
{
|
|
||||||
"relay_countries": [ "CA", "US" ],
|
|
||||||
// other fields...
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- `relay_countries`: a list of two-level ISO country codes (ISO 3166-1 alpha-2) whose
|
|
||||||
laws and policies may affect this relay. `EU` may be used for European Union countries. A `*` can be used for global relays.
|
|
||||||
|
|
||||||
Remember that a relay may be hosted in a country which is not the
|
|
||||||
country of the legal entities who own the relay, so it's very
|
|
||||||
likely a number of countries are involved.
|
|
||||||
|
|
||||||
|
|
||||||
### Community Preferences
|
|
||||||
|
|
||||||
For public text notes at least, a relay may try to foster a
|
|
||||||
local community. This would encourage users to follow the global
|
|
||||||
feed on that relay, in addition to their usual individual follows.
|
|
||||||
To support this goal, relays MAY specify some of the following values.
|
|
||||||
|
|
||||||
```jsonc
|
|
||||||
{
|
|
||||||
"language_tags": ["en", "en-419"],
|
|
||||||
"tags": ["sfw-only", "bitcoin-only", "anime"],
|
|
||||||
"posting_policy": "https://example.com/posting-policy.html",
|
|
||||||
// other fields...
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- `language_tags` is an ordered list
|
|
||||||
of [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag) indicating
|
|
||||||
the major languages spoken on the relay. A `*` can be used for global relays.
|
|
||||||
|
|
||||||
- `tags` is a list of limitations on the topics to be discussed.
|
|
||||||
For example `sfw-only` indicates that only "Safe For Work" content
|
|
||||||
is encouraged on this relay. This relies on assumptions of what the
|
|
||||||
"work" "community" feels "safe" talking about. In time, a common
|
|
||||||
set of tags may emerge that allow users to find relays that suit
|
|
||||||
their needs, and client software will be able to parse these tags easily.
|
|
||||||
The `bitcoin-only` tag indicates that any *altcoin*, *"crypto"* or *blockchain*
|
|
||||||
comments will be ridiculed without mercy.
|
|
||||||
|
|
||||||
- `posting_policy` is a link to a human-readable page which specifies the
|
|
||||||
community policies for the relay. In cases where `sfw-only` is True, it's
|
|
||||||
important to link to a page which gets into the specifics of your posting policy.
|
|
||||||
|
|
||||||
The `description` field should be used to describe your community
|
|
||||||
goals and values, in brief. The `posting_policy` is for additional
|
|
||||||
detail and legal terms. Use the `tags` field to signify limitations
|
|
||||||
on content, or topics to be discussed, which could be machine
|
|
||||||
processed by appropriate client software.
|
|
||||||
|
|
||||||
### Pay-to-Relay
|
### Pay-to-Relay
|
||||||
|
|
||||||
Relays that require payments may want to expose their fee schedules.
|
Relays that require payments may want to expose their fee schedules.
|
||||||
@@ -291,82 +178,68 @@ Relays that require payments may want to expose their fee schedules.
|
|||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
As of 25 March 2025 the following command provided these results:
|
```yaml
|
||||||
|
~> curl -H "Accept: application/nostr+json" https://nostr.wine | jq
|
||||||
```bash
|
|
||||||
curl -H "Accept: application/nostr+json" https://jellyfish.land | jq
|
|
||||||
```
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
{
|
||||||
"name": "JellyFish",
|
"contact": "wino@nostr.wine",
|
||||||
"description": "Stay Immortal!",
|
"description": "A paid nostr relay for wine enthusiasts and everyone else.",
|
||||||
"banner": "https://image.nostr.build/7fdefea2dec1f1ec25b8ce69362566c13b2b7f13f1726c2e4584f05f64f62496.jpg",
|
|
||||||
"pubkey": "bf2bee5281149c7c350f5d12ae32f514c7864ff10805182f4178538c2c421007",
|
|
||||||
"contact": "hi@dezh.tech",
|
|
||||||
"software": "https://github.com/dezh-tech/immortal",
|
|
||||||
"supported_nips": [
|
|
||||||
1,
|
|
||||||
9,
|
|
||||||
11,
|
|
||||||
13,
|
|
||||||
17,
|
|
||||||
40,
|
|
||||||
42,
|
|
||||||
59,
|
|
||||||
62,
|
|
||||||
70
|
|
||||||
],
|
|
||||||
"version": "immortal - 0.0.9",
|
|
||||||
"relay_countries": [
|
|
||||||
"*"
|
|
||||||
],
|
|
||||||
"language_tags": [
|
|
||||||
"*"
|
|
||||||
],
|
|
||||||
"tags": [],
|
|
||||||
"posting_policy": "https://jellyfish.land/tos.txt",
|
|
||||||
"payments_url": "https://jellyfish.land/relay",
|
|
||||||
"icon": "https://image.nostr.build/2547e9ec4b23589e09bc7071e0806c3d4293f76284c58ff331a64bce978aaee8.jpg",
|
|
||||||
"retention": [],
|
|
||||||
"fees": {
|
"fees": {
|
||||||
"subscription": [
|
"admission": [
|
||||||
{
|
{
|
||||||
"amount": 3000,
|
"amount": 18888000,
|
||||||
"period": 2628003,
|
"unit": "msats"
|
||||||
"unit": "sats"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"amount": 8000,
|
|
||||||
"period": 7884009,
|
|
||||||
"unit": "sats"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"amount": 15000,
|
|
||||||
"period": 15768018,
|
|
||||||
"unit": "sats"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"amount": 28000,
|
|
||||||
"period": 31536036,
|
|
||||||
"unit": "sats"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"icon": "https://image.nostr.build/30acdce4a81926f386622a07343228ae99fa68d012d54c538c0b2129dffe400c.png",
|
||||||
"limitation": {
|
"limitation": {
|
||||||
"auth_required": false,
|
"auth_required": false,
|
||||||
"max_message_length": 70000,
|
"created_at_lower_limit": 94608000,
|
||||||
"max_subid_length": 256,
|
"created_at_upper_limit": 300,
|
||||||
"max_subscriptions": 350,
|
"max_event_tags": 4000,
|
||||||
|
"max_limit": 1000,
|
||||||
|
"max_message_length": 524288,
|
||||||
|
"max_subid_length": 71,
|
||||||
|
"max_subscriptions": 50,
|
||||||
"min_pow_difficulty": 0,
|
"min_pow_difficulty": 0,
|
||||||
"payment_required": true,
|
"payment_required": true,
|
||||||
"restricted_writes": true,
|
"restricted_writes": true
|
||||||
|
},
|
||||||
|
"name": "nostr.wine",
|
||||||
|
"payments_url": "https://nostr.wine/invoices",
|
||||||
|
"pubkey": "4918eb332a41b71ba9a74b1dc64276cfff592e55107b93baae38af3520e55975",
|
||||||
|
"software": "https://nostr.wine",
|
||||||
|
"supported_nips": [ 1, 2, 4, 9, 11, 40, 42, 50, 70, 77 ],
|
||||||
|
"terms_of_service": "https://nostr.wine/terms",
|
||||||
|
"version": "0.3.3"
|
||||||
|
}
|
||||||
|
|
||||||
|
~> curl -H "Accept: application/nostr+json" https://nostr.land | jq
|
||||||
|
{
|
||||||
|
"description": "[✨ NFDB] nostr.land family of relays (fi-01 [tiger])",
|
||||||
|
"name": "[✨ NFDB] nostr.land",
|
||||||
|
"pubkey": "52b4a076bcbbbdc3a1aefa3735816cf74993b1b8db202b01c883c58be7fad8bd",
|
||||||
|
"software": "NFDB",
|
||||||
|
"icon": "https://i.nostr.build/b3thno790aodH8lE.jpg",
|
||||||
|
"supported_nips": [ 1, 2, 4, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 27, 28, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 42, 44, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 65, 68, 69, 71, 72, 73, 75, 78, 84, 88, 89, 90, 92, 99 ],
|
||||||
|
"version": "1.0.0",
|
||||||
|
"limitation": {
|
||||||
|
"payment_required": true,
|
||||||
|
"max_message_length": 65535,
|
||||||
"max_event_tags": 2000,
|
"max_event_tags": 2000,
|
||||||
"max_content_length": 70000,
|
"max_subscriptions": 200,
|
||||||
"created_at_lower_limit": 0,
|
"auth_required": false
|
||||||
"created_at_upper_limit": 2147483647,
|
},
|
||||||
"default_limit": 500,
|
"payments_url": "https://nostr.land",
|
||||||
"max_limit": 5000
|
"fees": {
|
||||||
|
"subscription": [
|
||||||
|
{
|
||||||
|
"amount": 4000000,
|
||||||
|
"unit": "msats",
|
||||||
|
"period": 2592000
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"terms_of_service": "https://nostr.land/terms"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
6
52.md
6
52.md
@@ -95,6 +95,7 @@ Aside from the common tags, this also takes the following tags:
|
|||||||
* `end` (optional) exclusive end Unix timestamp in seconds. If omitted, the calendar event ends instantaneously.
|
* `end` (optional) exclusive end Unix timestamp in seconds. If omitted, the calendar event ends instantaneously.
|
||||||
* `start_tzid` (optional) time zone of the start timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`
|
* `start_tzid` (optional) time zone of the start timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`
|
||||||
* `end_tzid` (optional) time zone of the end timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`. If omitted and `start_tzid` is provided, the time zone of the end timestamp is the same as the start timestamp.
|
* `end_tzid` (optional) time zone of the end timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`. If omitted and `start_tzid` is provided, the time zone of the end timestamp is the same as the start timestamp.
|
||||||
|
* `D` (required) the day-granularity unix timestamp on which the event takes place, calculated as `floor(unix_seconds() / seconds_in_one_day)`. Multiple tags SHOULD be included to cover the event's timeframe.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
{
|
{
|
||||||
@@ -113,6 +114,7 @@ Aside from the common tags, this also takes the following tags:
|
|||||||
// timestamps
|
// timestamps
|
||||||
["start", "<unix timestamp in seconds>"],
|
["start", "<unix timestamp in seconds>"],
|
||||||
["end", "<unix timestamp in seconds>"],
|
["end", "<unix timestamp in seconds>"],
|
||||||
|
["D", "82549"],
|
||||||
|
|
||||||
["start_tzid", "<IANA Time Zone Database identifier>"],
|
["start_tzid", "<IANA Time Zone Database identifier>"],
|
||||||
["end_tzid", "<IANA Time Zone Database identifier>"],
|
["end_tzid", "<IANA Time Zone Database identifier>"],
|
||||||
@@ -203,10 +205,6 @@ The list of tags is as follows:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Unsolved Limitations
|
|
||||||
|
|
||||||
* No private events
|
|
||||||
|
|
||||||
## Intentionally Unsupported Scenarios
|
## Intentionally Unsupported Scenarios
|
||||||
|
|
||||||
### Recurring Calendar Events
|
### Recurring Calendar Events
|
||||||
|
|||||||
2
55.md
2
55.md
@@ -249,7 +249,7 @@ launcher.launch(intent)
|
|||||||
```kotlin
|
```kotlin
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:$encryptedText"))
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:$encryptedText"))
|
||||||
intent.`package` = "com.example.signer"
|
intent.`package` = "com.example.signer"
|
||||||
intent.putExtra("type", "nip04_decrypt")
|
intent.putExtra("type", "nip44_decrypt")
|
||||||
// to control the result in your application in case you are not waiting the result before sending another intent
|
// to control the result in your application in case you are not waiting the result before sending another intent
|
||||||
intent.putExtra("id", "some_id")
|
intent.putExtra("id", "some_id")
|
||||||
// Send the current logged in user pubkey
|
// Send the current logged in user pubkey
|
||||||
|
|||||||
36
85.md
36
85.md
@@ -10,7 +10,7 @@ Certain Webs of Trust calculations require access to a large volume of events an
|
|||||||
|
|
||||||
## Assertion Events
|
## Assertion Events
|
||||||
|
|
||||||
Trusted Assertions are always addressable (replaceable) events with the `d` tag pointing to the "subject" of the assertion. This NIP currently recognizes three distinct target "subjects" on which such calculations can be performed: *pubkeys*, *regular events*, and *addressable events*. Each subject type is mapped to an event kind:
|
Trusted Assertions are always addressable (replaceable) events with the `d` tag pointing to the "subject" of the assertion. This NIP currently recognizes four distinct target "subjects" on which such calculations can be performed: *pubkeys*, *regular events*, *addressable events*, and *nip73 identifiers*. Each subject type is mapped to an event kind:
|
||||||
|
|
||||||
| Subject | Event Kind | `d` tag value |
|
| Subject | Event Kind | `d` tag value |
|
||||||
| ------------------ | -------------- | ----------------- |
|
| ------------------ | -------------- | ----------------- |
|
||||||
@@ -26,6 +26,7 @@ Example of ranking a pubkey with a web of trust score of `89`:
|
|||||||
```jsonc
|
```jsonc
|
||||||
{
|
{
|
||||||
"kind": 30382,
|
"kind": 30382,
|
||||||
|
"pubkey": "<service pubkey>",
|
||||||
"tags": [
|
"tags": [
|
||||||
["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], // target user's public key
|
["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], // target user's public key
|
||||||
["rank", "89"],
|
["rank", "89"],
|
||||||
@@ -35,6 +36,8 @@ Example of ranking a pubkey with a web of trust score of `89`:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Service providers MUST use different service keys for distinct algorithms, including a key per user when the algorithm is personalized to that user's point of view or settings.
|
||||||
|
|
||||||
## Kind 30382: Users as Subject:
|
## Kind 30382: Users as Subject:
|
||||||
|
|
||||||
The following result types have been declared:
|
The following result types have been declared:
|
||||||
@@ -109,11 +112,17 @@ Kind `10040` lists the user's authorized providers for each result. Each `kind:t
|
|||||||
{
|
{
|
||||||
"kind": 10040,
|
"kind": 10040,
|
||||||
"tags": [
|
"tags": [
|
||||||
|
["<kind:tag>", "<service key>", "<relay hint>"],
|
||||||
|
|
||||||
|
// examples
|
||||||
["30382:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
["30382:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
||||||
["30382:rank", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"],
|
["30382:rank", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"],
|
||||||
["30382:zap_amt_sent", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
["30382:zap_amt_sent", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
||||||
],
|
],
|
||||||
"content": nip44Encrypt(JSON.stringify([
|
"content": nip44Encrypt(JSON.stringify([
|
||||||
|
["<kind:tag>", "<service key>", "<relay hint>"],
|
||||||
|
|
||||||
|
// examples
|
||||||
["30383:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
["30383:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
||||||
["30384:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
["30384:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"],
|
||||||
]),
|
]),
|
||||||
@@ -130,3 +139,28 @@ Service providers SHOULD update Trusted Assertions as fast as new information ar
|
|||||||
Service providers MAY limit access to the results by using paid relays.
|
Service providers MAY limit access to the results by using paid relays.
|
||||||
|
|
||||||
In TAs, `p`, `e`, and `a` tags with the same value as the `d` tag MAY be used to add a relay hint to the home relay of that user or event.
|
In TAs, `p`, `e`, and `a` tags with the same value as the `d` tag MAY be used to add a relay hint to the home relay of that user or event.
|
||||||
|
|
||||||
|
## Appendix 1: Service provider discoverability
|
||||||
|
|
||||||
|
Service Providers SHOULD sign a kind `0` of each service key that explains who controls the key and what the current version of the algorithm is about.
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"kind": 0,
|
||||||
|
"pubkey": "<service pubkey>",
|
||||||
|
"tags": [],
|
||||||
|
"content": "{
|
||||||
|
\"name\" = \"Vitor's Brainstormer\",
|
||||||
|
\"about\" = \"A Web of Trust algorithm from Vitor's point of view that considers Follows and Mutes, but no reports, and gives extra score points for anyone around Boston\",
|
||||||
|
\"picture\" = \"https://brainstorm.com/logo.png\",
|
||||||
|
\"website\" = \"https://brainstorm.com\"
|
||||||
|
}",
|
||||||
|
// other fields...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Clients wishing to offer a list of Service Providers to their users SHOULD:
|
||||||
|
1. Download kind `10040` events of the user's follow list
|
||||||
|
2. Connect to each of the listed relays and download the kind `0` of the respective service keys
|
||||||
|
3. Parse the kind `0` and collect the `website` property
|
||||||
|
4. Load the OpenGraph tags of that website and display them as clickable items
|
||||||
|
|||||||
73
AD.md
73
AD.md
@@ -1,73 +0,0 @@
|
|||||||
NIP-AD
|
|
||||||
======
|
|
||||||
|
|
||||||
MCP Server and Skill Announcements
|
|
||||||
----------------------------------
|
|
||||||
|
|
||||||
`draft` `optional`
|
|
||||||
|
|
||||||
Defines event kinds for announcing MCP servers and skills.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## MCP Server Announcement (Kind 4200)
|
|
||||||
|
|
||||||
Announces an MCP server that provides tools to agents.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"kind": 4200,
|
|
||||||
"pubkey": "<publisher-pubkey>",
|
|
||||||
"tags": [
|
|
||||||
["name", "<server-name>"],
|
|
||||||
["description", "<what-the-server-does>"],
|
|
||||||
["command", "<execution-command>"]
|
|
||||||
],
|
|
||||||
"content": ""
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Tags
|
|
||||||
|
|
||||||
- `name` — Server identifier
|
|
||||||
- `description` — What the server provides
|
|
||||||
- `command` — Command to start the server (e.g., `npx @anthropic-ai/mcp-server-fetch`)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Skill Announcement (Kind 4202)
|
|
||||||
|
|
||||||
Announces a skill—packaged capabilities with instructions and associated files.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"kind": 4202,
|
|
||||||
"pubkey": "<publisher-pubkey>",
|
|
||||||
"tags": [
|
|
||||||
["title", "<skill-name>"],
|
|
||||||
["description", "<what-the-skill-does>"],
|
|
||||||
["e", "<1063-event-id>"],
|
|
||||||
["license", "<SPDX-identifier>"]
|
|
||||||
],
|
|
||||||
"content": "<skill-instructions>"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Tags
|
|
||||||
|
|
||||||
- `title` — Skill name
|
|
||||||
- `description` — One-line description
|
|
||||||
- `e` — Reference to NIP-94 file metadata (kind 1063), one or more
|
|
||||||
- `license` — SPDX license identifier
|
|
||||||
|
|
||||||
### Content
|
|
||||||
|
|
||||||
Contains skill instructions in markdown, injected into agent context when active.
|
|
||||||
|
|
||||||
### Referenced Files
|
|
||||||
|
|
||||||
Each `e` tag references a kind 1063 event with:
|
|
||||||
- `url` — File location
|
|
||||||
- `name` — Relative filepath for installation
|
|
||||||
- `m` — MIME type
|
|
||||||
- `x` — SHA-256 hash
|
|
||||||
@@ -105,7 +105,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
|||||||
- [NIP-99: Classified Listings](99.md)
|
- [NIP-99: Classified Listings](99.md)
|
||||||
- [NIP-A0: Voice Messages](A0.md)
|
- [NIP-A0: Voice Messages](A0.md)
|
||||||
- [NIP-A4: Public Messages](A4.md)
|
- [NIP-A4: Public Messages](A4.md)
|
||||||
- [NIP-AD: MCP Server and Skill Announcements](AD.md)
|
|
||||||
- [NIP-B0: Web Bookmarks](B0.md)
|
- [NIP-B0: Web Bookmarks](B0.md)
|
||||||
- [NIP-B7: Blossom](B7.md)
|
- [NIP-B7: Blossom](B7.md)
|
||||||
- [NIP-BE: Nostr BLE Communications Protocol](BE.md)
|
- [NIP-BE: Nostr BLE Communications Protocol](BE.md)
|
||||||
@@ -179,8 +178,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
|||||||
| `2003` | Torrent | [35](35.md) |
|
| `2003` | Torrent | [35](35.md) |
|
||||||
| `2004` | Torrent Comment | [35](35.md) |
|
| `2004` | Torrent Comment | [35](35.md) |
|
||||||
| `2022` | Coinjoin Pool | [joinstr][joinstr] |
|
| `2022` | Coinjoin Pool | [joinstr][joinstr] |
|
||||||
| `4200` | MCP Server Announcement | [AD](AD.md) |
|
|
||||||
| `4202` | Skill Announcement | [AD](AD.md) |
|
|
||||||
| `4550` | Community Post Approval | [72](72.md) |
|
| `4550` | Community Post Approval | [72](72.md) |
|
||||||
| `5000`-`5999` | Job Request | [90](90.md) |
|
| `5000`-`5999` | Job Request | [90](90.md) |
|
||||||
| `6000`-`6999` | Job Result | [90](90.md) |
|
| `6000`-`6999` | Job Result | [90](90.md) |
|
||||||
@@ -351,6 +348,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
|||||||
| `A` | root address | relay URL | [22](22.md) |
|
| `A` | root address | relay URL | [22](22.md) |
|
||||||
| `c` | commit id | | [34](34.md) |
|
| `c` | commit id | | [34](34.md) |
|
||||||
| `d` | identifier | -- | [01](01.md) |
|
| `d` | identifier | -- | [01](01.md) |
|
||||||
|
| `D` | day | -- | [52](52.md) |
|
||||||
| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01](01.md), [10](10.md) |
|
| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01](01.md), [10](10.md) |
|
||||||
| `E` | root event id | relay URL | [22](22.md) |
|
| `E` | root event id | relay URL | [22](22.md) |
|
||||||
| `f` | currency code | -- | [69](69.md) |
|
| `f` | currency code | -- | [69](69.md) |
|
||||||
|
|||||||
Reference in New Issue
Block a user