This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
/
json-examples.json
59 lines (57 loc) · 1.9 KB
/
json-examples.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Pseudo-Code to showcase how the data should be
// structured inside the contract and on the
// individual IPFS hash resolves
// In contract
// Boards
{
"ticker": "biz", // chosen by creator of board
"punchline": "shitcoins and stocks",// same
"postcounter": 0, // always 0, incrementing with each post
}
// Thread + Posts
// Note: every post and file content is
// stored encrypted; the hashes lead the
// system to those encrypted containers
// and the frontend has to decrypt those
biz: [ // array holding all threads on biz
{ // object of each thread
"thread": "1234567890", // thread ID
"post": "Qm~", // IPFS hash for OP (single post)
"replies": [ // IPFS hash for each reply (single post)
["0x7ac7~", "Qm~"] // each reply is formed as a sub-array
],
"hidden": [ // community voted to hide these
{
"id": "1234556789",
"hash": "Qm~"
},
{
"id": "1234556788",
"hash": "Qm~"
},
],
}
]
// Single Post, example on https://ipfs.io/ipfs/Qmb2uspMc5iTHXYLcYDKov3nP6hwTb7C69QEWwwu4A7Jfd
{
"eth": "0x7ac73ebb~", // ETH address of creator
"id": "1234567890", // incrementing integer, last number stored in contract
"thread": "1234567890", // define thread to merge this into
"stamp": { // auto set by system, UTC, maybe UNIX timestamp
"time": "13:33:37", // HH:MM:SS
"date": "10/01/2019", // MM:DD:YYYY
},
"file": { // optional
"originalName": "bar.png", // original upload name
"size": "1280x760", // dimensions of image
"src": "Qm~", // IPFS hash to encrypted file
"iv": "generatedIV", // IV to start decryption
},
"replyTo": [ // optional / parsed in frontend (?)
"1234567889",
"1234567888",
],
"name": "Anonymous", // auto set to Anonymous if no other name was chosen
"subject": "foo", // defined by user
"text": "lorem ipsum dolor sit", // defined by user
}