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
commitdf6fa5f322fc972b3894e720f2c406eb2d8f5f5a (patch)
tree4864006b54c512dea971d0c50efcacca65b12c6e /site/content/transaction_docs.md
parentd1b2e4bbd8f1ec5fe40c3d8c85ea4d13c8bfd755 (diff)
downloadgradecoin-df6fa5f322fc972b3894e720f2c406eb2d8f5f5a.tar.gz
gradecoin-df6fa5f322fc972b3894e720f2c406eb2d8f5f5a.tar.bz2
gradecoin-df6fa5f322fc972b3894e720f2c406eb2d8f5f5a.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```