format(all): json formatting

This commit is contained in:
kehiy
2024-09-03 20:41:31 +03:30
parent b4a2561df7
commit e6552476aa
36 changed files with 206 additions and 194 deletions

8
42.md
View File

@@ -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...
}
```