kopia lustrzana https://github.com/nostr-protocol/nostr
fix NIP-01 top-level JSON array messages.
rodzic
9ee3a0259e
commit
69509f40cd
11
nips/01.md
11
nips/01.md
|
@ -44,12 +44,13 @@ To obtain the `event.id`, we `sha256` the serialized event. The serialization is
|
|||
|
||||
### Communication between clients and relays
|
||||
|
||||
Relays expose a websocket endpoint at its domain under the `/ws` path (say, `ws(s)://relay.domain/ws`) to which clients can connect.
|
||||
Relays expose a websocket endpoint to which clients can connect.
|
||||
|
||||
Clients can send either 3 types of messages, according to the following patterns:
|
||||
* `EVENT <event JSON as defined above>`, used to publish events.
|
||||
* `REQ <id> <filter JSON>...`, used to request events and subscribe to new updates.
|
||||
* `CLOSE <id>`, used to stop previous subscriptions.
|
||||
Clients can send either 3 types of messages, which must be JSON arrays, according to the following patterns:
|
||||
|
||||
* `["EVENT", <event JSON as defined above>`], used to publish events.
|
||||
* `["REQ", <id>, <filter JSON>...`], used to request events and subscribe to new updates.
|
||||
* `["CLOSE", <id>]`, used to stop previous subscriptions.
|
||||
|
||||
`<id>` is a random string that should be used to represent a subscription. The same
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue