mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
41 lines
1.3 KiB
Markdown
41 lines
1.3 KiB
Markdown
|
NIP-37
|
||
|
======
|
||
|
|
||
|
Transport methods announcement
|
||
|
-----------------------------------
|
||
|
|
||
|
`draft` `optional`
|
||
|
|
||
|
This NIP describes how digital services can announce how clients can reach them, it describes which network is used and depending on the network what other data is needed to reach it.
|
||
|
|
||
|
## Motivation
|
||
|
Nostr decouples applications completely from the transportation layer, meaning services no longer have to be designed around a single transportation method, but can be accessible through a plethora of ways. This NIP is meant to act as a lookup system that tells a client what transportation methods can be used to access a service.
|
||
|
|
||
|
#### Spec
|
||
|
|
||
|
A replacable event of kind `11111` event containing or more of the following tag(s):
|
||
|
```json
|
||
|
["<network>", "<address>"]
|
||
|
```
|
||
|
- `<network>` describes the network.
|
||
|
- `<address>` describes how to address the service, this value may or may not include a protocol based on the tag's first value.
|
||
|
|
||
|
#### Example
|
||
|
|
||
|
```json
|
||
|
{
|
||
|
"kind": 11111,
|
||
|
"tags": [
|
||
|
["clearnet", "wss://some.domain.com"],
|
||
|
["clearnet", "mailto:mail@example.com"],
|
||
|
["tor", "ws://somehash.onion"],
|
||
|
["i2p", "ws://somehash.b32.i2p/"],
|
||
|
["lo-ra", "914.3Mhz"],
|
||
|
["ipv4", "157.240.212.35"],
|
||
|
["ipv6", "2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF"],
|
||
|
["aviation", "pigeon://MainSt.45thAve"]
|
||
|
]
|
||
|
}
|
||
|
```
|
||
|
|