From 376ec590ea5da21315a37292817997352e58dee6 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 03:39:36 +0300 Subject: Create the static site DON'T FORGET TO CHANGE site/config.toml BEFORE DEPLOYMENT --- site/content/_index.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 site/content/_index.md (limited to 'site/content/_index.md') diff --git a/site/content/_index.md b/site/content/_index.md new file mode 100644 index 0000000..7dd7a7c --- /dev/null +++ b/site/content/_index.md @@ -0,0 +1,28 @@ ++++ +title = "Gradecoin" +sort_by = "weight" ++++ + +- Don't know where to start? Gradecoin uses RESTful API, simple `curl` commands or even your browser will work! [This website can help as well](https://curl.trillworks.com/). +- [JWT Debugger](https://jwt.io) and the corresponding [RFC](https://tools.ietf.org/html/rfc7519) + +# Services +## /register +- Student creates their own 2048 bit RSA `keypair` +- Downloads `Gradecoin`'s Public Key from [Moodle](https://odtuclass.metu.edu.tr/my/) +- Encrypts their JSON wrapped `Public Key`, `Student ID` and one time `passwd` using Gradecoin's Public Key +- Their public key is now in our database and can be used to sign their JWT's during requests + +## /transaction +- You can offer a [Transaction](/transaction) - POST request + - The request should have `Authorization` + - The request header should be signed by the Public Key of the `by` field in the transaction +- fetch the list of `Transaction`s - GET request + +## /block +- offer a [`schema::Block`] - POST request + - The request should have `Authorization` + - The [`schema::Block::transaction_list`] of the block should be a subset of [`schema::Db::pending_transactions`] +- fetch the last accepted [`schema::Block`] - GET request + +`Authorization`: The request header should have Bearer JWT.Token signed with Student Public Key -- cgit v1.2.3-70-g09d2