summaryrefslogtreecommitdiffstats
path: root/site/content/block_docs.md
blob: 4227f26f5e2437c4828a6da2c1393bc263284351 (plain)
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
+++
title = "Blocks"
description = "Block Documentation"
weight = 2
+++

A block that was proposed to commit Transactions in `transaction_list` to the
ledger with a nonce that made `hash` valid; 6 zeroes at the left hand side of the
hash (24 bytes).

We are _mining_ using [blake2s](https://www.blake2.net/) 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.

# Requests

## GET
A HTTP `GET` request to [/block](/block) endpoint will return the latest mined block.

## POST

A HTTP `POST` request with Authorization using JWT will allow you to propose your own blocks.

# Fields
```
transaction_list: [array of Fingerprints]
nonce: unsigned 32-bit integer
timestamp: ISO 8601 <date>T<time>
hash: String
```

[ISO 8601 Reference](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)