Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for docs code formatting #158

Open
fo-rk opened this issue Apr 18, 2023 · 0 comments
Open

Suggestion for docs code formatting #158

fo-rk opened this issue Apr 18, 2023 · 0 comments

Comments

@fo-rk
Copy link

fo-rk commented Apr 18, 2023

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>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant