upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrbittencourt <fbittencourt@neadvance.com>2023-03-09 14:05:07 +0000
committerfiatjaf_ <fiatjaf@gmail.com>2023-04-20 08:06:14 -0300
commit0ef5486e569f3e9888cab1030edea96785c360e1 (patch)
tree3363c8198d4e837f6d7e1cca8f57e7a9d14ccc65
parent342722963b5d6716410166c8e02d7d0b7cabb0f3 (diff)
add json schema
-rw-r--r--95.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/95.md b/95.md
index 680496c..ffb3906 100644
--- a/95.md
+++ b/95.md
@@ -15,6 +15,21 @@ This event must not be returned in generic searches. It should only be returned
15 15
16The `NIP-94` can be used to broadcast the ID of that event, with the ` and ` tag referencing the event id, without having to send the full event which can be a lot of data. 16The `NIP-94` can be used to broadcast the ID of that event, with the ` and ` tag referencing the event id, without having to send the full event which can be a lot of data.
17 17
18```json
19{
20 "id": <32-bytes lowercase hex-encoded sha256 of the the serialized event data>,
21 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
22 "created_at": <unix timestamp in seconds>,
23 "kind": 30064,
24 "tags": [
25 ["d", <string with name of file>],
26 ["decrypt",<algorithm>,<key>],
27 ["p", <32-bytes hex of a pubkey>, <recommended relay URL>],
28 ],
29 "content": <string with base64 data>,
30 "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
31}
32
18Relay Behavior 33Relay Behavior
19--------------- 34---------------
20Relays that use a relational database may have more difficulty implementing this NIP, but a possible solution is for this NIP not to be recorded in the database, but on disk, the file name being the event id. So it can be easily found and searched. And because it is not in the database, it does not interfere with the indexing of common events. 35Relays that use a relational database may have more difficulty implementing this NIP, but a possible solution is for this NIP not to be recorded in the database, but on disk, the file name being the event id. So it can be easily found and searched. And because it is not in the database, it does not interfere with the indexing of common events.