aboutsummaryrefslogtreecommitdiffstats
path: root/site/content/transaction_docs.md
blob: cbdeaf4f6a6f7e8a8f79859cbcdfe9951722ab1a (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 = "Transactions"
description = "Transaction documentation"
weight = 6
+++

A transaction request between `source` and `target` to move `amount` Gradecoin.

# Requests

## GET
A HTTP `GET` request to [/transaction](/transaction) endpoint will return the current list of pending transactions.

## POST

A HTTP `POST` request with Authorization using JWT to [/transaction](/transactions) will allow you to propose your own transactions.


# Fields
```
by: Fingerprint
source: Fingerprint
target: Fingerprint
amount: unsigned 16 bit integer
timestamp: ISO 8601 <date>T<time>
```

# Hash

```tha``` field in [jwt documentation](/jwt) 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.