aboutsummaryrefslogtreecommitdiffstats
path: root/site/content/transaction_docs.md
diff options
context:
space:
mode:
authorYigit Sever2021-04-19 18:21:06 +0300
committerYigit Sever2021-04-19 18:21:06 +0300
commit81ebd267c89011ca65cd5cfe382e10fabd9017ac (patch)
tree4e1f17b897bc9e3850e9c50861fd4893371f05e4 /site/content/transaction_docs.md
parent202625e0e1a4a6a85c895d9cd71a9f419a3b2173 (diff)
downloadgradecoin-81ebd267c89011ca65cd5cfe382e10fabd9017ac.tar.gz
gradecoin-81ebd267c89011ca65cd5cfe382e10fabd9017ac.tar.bz2
gradecoin-81ebd267c89011ca65cd5cfe382e10fabd9017ac.zip
Moving site to separate repo
Diffstat (limited to 'site/content/transaction_docs.md')
-rw-r--r--site/content/transaction_docs.md52
1 files changed, 0 insertions, 52 deletions
diff --git a/site/content/transaction_docs.md b/site/content/transaction_docs.md
deleted file mode 100644
index 05c1534..0000000
--- a/site/content/transaction_docs.md
+++ /dev/null
@@ -1,52 +0,0 @@
1+++
2title = "Transactions"
3description = "Transaction documentation"
4weight = 6
5+++
6
7A transaction request between `source` and `target` to move `amount` Gradecoin.
8
9# Requests
10
11## GET
12A HTTP `GET` request to [/transaction](/transaction) endpoint will return the current list of pending transactions.
13
14## POST
15
16A HTTP `POST` request with Authorization using JWT to [/transaction](/transactions) will allow you to propose your own transactions.
17
18# Fields
19```
20by: Fingerprint
21source: Fingerprint
22target: Fingerprint
23amount: unsigned 16 bit integer
24timestamp: ISO 8601 <date>T<time>
25```
26
27# Hash
28
29`tha` field in [jwt documentation](@/JWT.md) in fact stands for "The Hash", in the case of a post request for a transaction, you need the Md5 hash of the serialized JSON representation of transaction. The resulting JSON string should look something like;
30
31```
32{"by":"foo","source":"bar","target":"baz","amount":2,"timestamp":"2021-04-18T21:49:00"}
33```
34
35Or; without any whitespace, separated with `:` and `,`.
36
37# Bank
38
39There is a `bank` account with Fingerprint `31415926535897932384626433832795028841971693993751058209749445923`
40
41{% tidbit() %}
42First 64 digits of Pi
43{% end %}
44
45This is the only account that will let you _withdraw_ from them.
46
47```
48by: this has to be your Fingerprint
49source: this can be either you or the bank
50target: this can be a valid fingerprint or yourself if source is the bank
51...
52```