improve json formatting on nips 1 and 9 and remove an unnecessary field.

pull/55/head
fiatjaf 2022-01-01 10:40:19 -03:00
rodzic 2ad53aa88f
commit 8601706ffc
2 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -16,17 +16,17 @@ The single object type that exists is the `event`, which has the following forma
```
{
id: <32-bytes sha256 of the the serialized event data>
pubkey: <32-bytes hex-encoded public key of the event creator>,
created_at: <unix timestamp in seconds>,
kind: <integer>,
tags: [
"id": <32-bytes sha256 of the the serialized event data>
"pubkey": <32-bytes hex-encoded public key of the event creator>,
"created_at": <unix timestamp in seconds>,
"kind": <integer>,
"tags": [
["e", <32-bytes hex of the id of another event>, <recommended relay URL>],
["p", <32-bytes hex of the key>, <recommended relay URL>],
... // other kinds of tags may be included later
]
content: <arbitrary string>,
sig: <64-bytes signature of the sha256 hash of the serialized event data, which is the same as the "id" field>,
"content": <arbitrary string>,
"sig": <64-bytes signature of the sha256 hash of the serialized event data, which is the same as the "id" field>,
}
```

Wyświetl plik

@ -2,27 +2,27 @@ NIP-09
======
Event Deletion
-------------------------
--------------
`draft` `optional` `author:scsibug`
A special event with kind `5`, meaning "deletion" is defined as having a list of one or more `e` tags, each referencing an event the author is requesting to be deleted.
Each tag entry must contain an event id intended for deletion. The `<recommended relay URL>` item SHOULD be set to `""`, it is ignored for deletion events.
Each tag entry must contain an "e" event id intended for deletion.
The event's `content` field MAY contain a text note describing the reason for the deletion.
For example:
```json
```
{
kind: 5,
pubkey: <32-bytes hex-encoded public key of the event creator>,
tags: [
["e", "dcd59..464a2", ""],
["e", "968c5..ad7a4", ""],
"kind": 5,
"pubkey": <32-bytes hex-encoded public key of the event creator>,
"tags": [
["e", "dcd59..464a2"],
["e", "968c5..ad7a4"],
],
content: "these posts were published by accident",
"content": "these posts were published by accident",
...other fields
}
```