mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-09-01 05:50:47 -04:00
format(all): json formatting
This commit is contained in:
8
42.md
8
42.md
@@ -22,13 +22,13 @@ A relay may want to require clients to authenticate to access restricted resourc
|
||||
|
||||
This NIP defines a new message, `AUTH`, which relays CAN send when they support authentication and clients can send to relays when they want to authenticate. When sent by relays the message has the following form:
|
||||
|
||||
```json
|
||||
```
|
||||
["AUTH", <challenge-string>]
|
||||
```
|
||||
|
||||
And, when sent by clients, the following form:
|
||||
|
||||
```json
|
||||
```
|
||||
["AUTH", <signed-event-json>]
|
||||
```
|
||||
|
||||
@@ -38,14 +38,14 @@ And, when sent by clients, the following form:
|
||||
|
||||
The signed event is an ephemeral event not meant to be published or queried, it must be of `kind: 22242` and it should have at least two tags, one for the relay URL and one for the challenge string as received from the relay. Relays MUST exclude `kind: 22242` events from being broadcasted to any client. `created_at` should be the current time. Example:
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"kind": 22242,
|
||||
"tags": [
|
||||
["relay", "wss://relay.example.com/"],
|
||||
["challenge", "challengestringhere"]
|
||||
],
|
||||
...
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user