diff options
author | Yigit Sever | 2021-04-15 23:35:24 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-15 23:35:24 +0300 |
commit | c38545f032a82702c7a2f9b670176c14de80e2d3 (patch) | |
tree | 8fab8c1b883e5650e631ebeabce1c4eb39aa93b0 /site/public/block-docs | |
parent | 7d8b9272f885c2a240867f45e7abccc98ebf18f7 (diff) | |
download | gradecoin-c38545f032a82702c7a2f9b670176c14de80e2d3.tar.gz gradecoin-c38545f032a82702c7a2f9b670176c14de80e2d3.tar.bz2 gradecoin-c38545f032a82702c7a2f9b670176c14de80e2d3.zip |
Reorder site navigation items
Diffstat (limited to 'site/public/block-docs')
-rw-r--r-- | site/public/block-docs/index.html | 168 |
1 files changed, 0 insertions, 168 deletions
diff --git a/site/public/block-docs/index.html b/site/public/block-docs/index.html deleted file mode 100644 index d323198..0000000 --- a/site/public/block-docs/index.html +++ /dev/null | |||
@@ -1,168 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html lang="en"> | ||
3 | |||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title>Blocks | Gradecoin </title> | ||
7 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
8 | <style> | ||
9 | :root { | ||
10 | /* Primary theme color */ | ||
11 | --primary-color: #F8D12F; | ||
12 | /* Primary theme text color */ | ||
13 | --primary-text-color: #1E2329; | ||
14 | /* Primary theme link color */ | ||
15 | --primary-link-color: #2F57F7; | ||
16 | /* Secondary color: the background body color */ | ||
17 | --secondary-color: #FAFAFA; | ||
18 | --secondary-text-color: #303030; | ||
19 | /* Highlight text color of table of content */ | ||
20 | --toc-highlight-text-color: #d46e13; | ||
21 | } | ||
22 | </style> | ||
23 | |||
24 | <link href="https://fonts.googleapis.com/css?family=Alfa+Slab+One&display=swap" rel="stylesheet"> | ||
25 | <link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600&display=swap" rel="stylesheet"> | ||
26 | <link rel="stylesheet" href="/normalize.css"> | ||
27 | <link rel="stylesheet" href="https://gradecoin.xyz/juice.css"> | ||
28 | |||
29 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> | ||
30 | |||
31 | </head> | ||
32 | |||
33 | <body> | ||
34 | |||
35 | <header class="box-shadow"> | ||
36 | |||
37 | |||
38 | <a href="https://gradecoin.xyz/"> | ||
39 | <div class="logo"> | ||
40 | <img src="https://gradecoin.xyz/gradecoin.png" alt="logo"> | ||
41 | Gradecoin | ||
42 | </div> | ||
43 | </a> | ||
44 | |||
45 | <nav> | ||
46 | |||
47 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/block-docs/">Blocks</a> | ||
48 | |||
49 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/transaction-docs/">Transactions</a> | ||
50 | |||
51 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/register-docs/">Register</a> | ||
52 | |||
53 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/jwt/">JWT</a> | ||
54 | |||
55 | |||
56 | |||
57 | <a class="nav-item subtitle-text" href="https://github.com/zhuowei/nft_ptr#why">why?</a> | ||
58 | |||
59 | |||
60 | </nav> | ||
61 | |||
62 | </header> | ||
63 | |||
64 | |||
65 | <main> | ||
66 | |||
67 | |||
68 | |||
69 | |||
70 | |||
71 | <div class="toc"> | ||
72 | <div class="toc-sticky"> | ||
73 | |||
74 | <div class="toc-item"> | ||
75 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#requests">Requests</a> | ||
76 | </div> | ||
77 | |||
78 | |||
79 | <div class="toc-item-child"> | ||
80 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#get"><small>- GET</small></a> | ||
81 | </div> | ||
82 | |||
83 | <div class="toc-item-child"> | ||
84 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#post"><small>- POST</small></a> | ||
85 | </div> | ||
86 | |||
87 | |||
88 | |||
89 | <div class="toc-item"> | ||
90 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#fields">Fields</a> | ||
91 | </div> | ||
92 | |||
93 | |||
94 | </div> | ||
95 | </div> | ||
96 | |||
97 | |||
98 | |||
99 | <div class="content text"> | ||
100 | |||
101 | <div class="heading-text">Block Documentation</div> | ||
102 | <p>A block that was proposed to commit Transactions in <code>transaction_list</code> to the | ||
103 | ledger with a nonce that made <code>hash</code> valid; 6 zeroes at the left hand side of the | ||
104 | hash (24 bytes).</p> | ||
105 | <p>We are <em>mining</em> using <a href="https://www.blake2.net/">blake2s</a> algorithm, which produces 256 bit hashes. Hash/second is roughly 20x10^3 on my machine, a new block can be mined in around 4-6 minutes.</p> | ||
106 | <h1 id="requests">Requests</h1> | ||
107 | <h2 id="get">GET</h2> | ||
108 | <p>A HTTP <code>GET</code> request to <a href="/block">/block</a> endpoint will return the latest mined block.</p> | ||
109 | <h2 id="post">POST</h2> | ||
110 | <p>A HTTP <code>POST</code> request with Authorization using JWT will allow you to propose your own blocks.</p> | ||
111 | <h1 id="fields">Fields</h1> | ||
112 | <pre style="background-color:#ffffff;"> | ||
113 | <code><span style="color:#545052;">transaction_list: [array of Fingerprints] | ||
114 | nonce: unsigned 32-bit integer | ||
115 | timestamp: ISO 8601 <date>T<time> | ||
116 | hash: String | ||
117 | </span></code></pre> | ||
118 | <p><a href="https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations">ISO 8601 Reference</a></p> | ||
119 | |||
120 | |||
121 | </div> | ||
122 | |||
123 | |||
124 | |||
125 | </main> | ||
126 | |||
127 | |||
128 | <footer> | ||
129 | Built For ⁂ CENG489 ⁂ Introduction to Computer Security | ||
130 | </footer> | ||
131 | |||
132 | </body> | ||
133 | <script> | ||
134 | function highlightNav(heading) { | ||
135 | let pathname = location.pathname; | ||
136 | document.querySelectorAll(".toc a").forEach((item) => { | ||
137 | item.classList.remove("active"); | ||
138 | }); | ||
139 | document.querySelector(".toc a[href$='" + pathname + "#" + heading + "']").classList.add("active"); | ||
140 | } | ||
141 | |||
142 | let currentHeading = ""; | ||
143 | window.onscroll = function () { | ||
144 | let h = document.querySelectorAll("h1,h2,h3,h4,h5,h6"); | ||
145 | let elementArr = []; | ||
146 | |||
147 | h.forEach(item => { | ||
148 | if (item.id !== "") { | ||
149 | elementArr[item.id] = item.getBoundingClientRect().top; | ||
150 | } | ||
151 | }); | ||
152 | elementArr.sort(); | ||
153 | for (let key in elementArr) { | ||
154 | if (!elementArr.hasOwnProperty(key)) { | ||
155 | continue; | ||
156 | } | ||
157 | if (elementArr[key] > 0 && elementArr[key] < 300) { | ||
158 | if (currentHeading !== key) { | ||
159 | highlightNav(key); | ||
160 | currentHeading = key; | ||
161 | } | ||
162 | break; | ||
163 | } | ||
164 | } | ||
165 | } | ||
166 | </script> | ||
167 | |||
168 | </html> | ||