nips/37.md

36 lines
926 B
Markdown
Raw Normal View History

2024-11-07 06:46:51 -05:00
NIP-37 - Transport methods announcement
2024-11-06 07:00:21 -05:00
======
2024-11-07 06:46:51 -05:00
2024-11-06 07:00:21 -05:00
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.
2024-11-07 06:46:51 -05:00
## Specification
2024-11-06 07:00:21 -05:00
2024-11-18 08:07:29 -05:00
A replacable event of kind `11111`, containing one or more of the following tag(s):
2024-11-06 07:00:21 -05:00
```json
2024-11-18 08:07:29 -05:00
["<network>", "<address>", "<protocol>"]
2024-11-06 07:00:21 -05:00
```
2024-11-18 08:07:29 -05:00
- `<network>` describes which network is used.
- `<address>` describes where to address the service.
- `<protocol>` describes which protocol/schema should be used
2024-11-07 06:46:51 -05:00
2024-11-18 08:07:29 -05:00
## Example
2024-11-06 07:00:21 -05:00
```json
{
"kind": 11111,
"tags": [
2024-11-18 08:07:29 -05:00
["clearnet", "some.domain.com", "wss"],
["tor", "somehash.onion", "ws"],
["i2p", "somehash.b32.i2p/", "ws"],
["ipv4", "157.240.212.35", "http"],
["ipv6", "2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF", "http"]
2024-11-06 07:00:21 -05:00
]
}
2024-11-18 08:07:29 -05:00
```