mirror of
https://github.com/edufeed-org/nips.git
synced 2025-12-09 16:24:32 +00:00
use jsonc in some places.
This commit is contained in:
parent
c766f8892b
commit
d0812229a5
3 changed files with 12 additions and 13 deletions
11
01.md
11
01.md
|
|
@ -14,7 +14,7 @@ Each user has a keypair. Signatures, public key, and encodings are done accordin
|
|||
|
||||
The only object type that exists is the `event`, which has the following format on the wire:
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>,
|
||||
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
|
||||
|
|
@ -22,7 +22,7 @@ The only object type that exists is the `event`, which has the following format
|
|||
"kind": <integer between 0 and 65535>,
|
||||
"tags": [
|
||||
[<arbitrary string>...],
|
||||
...
|
||||
// ...
|
||||
],
|
||||
"content": <arbitrary string>,
|
||||
"sig": <64-bytes lowercase hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
|
||||
|
|
@ -58,17 +58,16 @@ To prevent implementation differences from creating a different event ID for the
|
|||
|
||||
Each tag is an array of strings of arbitrary size, with some conventions around them. Take a look at the example below:
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
...,
|
||||
"tags": [
|
||||
["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"],
|
||||
["p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca"],
|
||||
["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"],
|
||||
["alt", "reply"],
|
||||
...
|
||||
// ...
|
||||
],
|
||||
...
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue