nostr-protocol / nostr

a truly censorship-resistant alternative to Twitter that has a chance of working

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion for docs code formatting

fo-rk opened this issue · comments

commented

Is this better for docs formatting of json? The current way Github handles incorrect json really makes nostr look scary to newcomers – which is the opposite of the truth.

{
  "id": // <string: 32-bytes lowercase hex-encoded sha256 of the serialized event data>,
  "pubkey": // <string: 32-bytes lowercase hex-encoded public key of the event creator>,
  "created_at": // <number: unix timestamp in seconds>,
  "kind": // <number>,
  "tags": [
    // ["e", <string: 32-bytes hex of the id of another event>, <string: recommended relay URL>],
    // ["p", <string: 32-bytes hex of a pubkey>, <string: recommended relay URL>],
    ... // other kinds of tags may be included later
  ],
  "content": // <string>,
  "sig": // <string: 64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
}