diff options
Diffstat (limited to 'site/public/block-docs/index.html')
-rw-r--r-- | site/public/block-docs/index.html | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/site/public/block-docs/index.html b/site/public/block-docs/index.html index 84a1463..7fd12c4 100644 --- a/site/public/block-docs/index.html +++ b/site/public/block-docs/index.html | |||
@@ -66,14 +66,55 @@ | |||
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | |||
70 | <div class="toc"> | ||
71 | <div class="toc-sticky"> | ||
72 | |||
73 | <div class="toc-item"> | ||
74 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#requests">Requests</a> | ||
75 | </div> | ||
76 | |||
77 | |||
78 | <div class="toc-item-child"> | ||
79 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#get"><small>- GET</small></a> | ||
80 | </div> | ||
81 | |||
82 | <div class="toc-item-child"> | ||
83 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#post"><small>- POST</small></a> | ||
84 | </div> | ||
85 | |||
86 | |||
87 | |||
88 | <div class="toc-item"> | ||
89 | <a class="subtext" href="https://gradecoin.xyz/block-docs/#fields">Fields</a> | ||
90 | </div> | ||
91 | |||
92 | |||
93 | </div> | ||
94 | </div> | ||
95 | |||
96 | |||
69 | 97 | ||
70 | <div class="content text"> | 98 | <div class="content text"> |
71 | 99 | ||
72 | <div class="heading-text">Block Documentation</div> | 100 | <div class="heading-text">Block Documentation</div> |
73 | <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod | 101 | <p>A block that was proposed to commit Transactions in <code>transaction_list</code> to the |
74 | tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At | 102 | ledger with a nonce that made <code>hash</code> valid; 6 zeroes at the left hand side of the |
75 | vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd | 103 | hash (24 bytes).</p> |
76 | ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p> | 104 | <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> |
105 | <h1 id="requests">Requests</h1> | ||
106 | <h2 id="get">GET</h2> | ||
107 | <p>A HTTP <code>GET</code> request to <a href="/block">/block</a> endpoint will return the latest mined block.</p> | ||
108 | <h2 id="post">POST</h2> | ||
109 | <p>A HTTP <code>POST</code> request with Authorization using JWT will allow you to propose your own blocks.</p> | ||
110 | <h1 id="fields">Fields</h1> | ||
111 | <pre style="background-color:#ffffff;"> | ||
112 | <code><span style="color:#545052;">transaction_list: [array of Fingerprints] | ||
113 | nonce: unsigned 32-bit integer | ||
114 | timestamp: ISO 8601 <date>T<time> | ||
115 | hash: String | ||
116 | </span></code></pre> | ||
117 | <p><a href="https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations">ISO 8601 Reference</a></p> | ||
77 | 118 | ||
78 | 119 | ||
79 | </div> | 120 | </div> |