Commit Graph

29 Commits

Author SHA1 Message Date
Reckless_Satoshi
b4fe30e733 Add testing against API specs with assertResponse 2023-11-14 13:54:51 +00:00
Reckless_Satoshi
eaca597522
Remove /api/user endpoint from api.urls 2023-08-14 07:38:16 -07:00
Reckless_Satoshi
e6ddcf9e4b
Add RobotTokenSHA256 middleware, /api/robot and frontend entropy calc (#512)
* Add RobotTokenSHA256 middleware for in-the-fly robot generation/login

* Add RobotView, fix middleware, upgrade frontend

* Token header as base91

* Add OAS schema of RobotView

* Use RobotView on new fetchRobot(), mimick old fetchRobot() functionality

* Upgrade websockets for token based authentication

* Small fixes

* Add frontend token entropy checks, add token on route /robot/<token>

* Rename admin panel

* Collect phrases
2023-05-05 10:12:38 +00:00
Reckless_Satoshi
7643e524f1
Fix all files with pre-commit 2022-10-25 11:04:12 -07:00
Lint Action
3d3da78f8a Fix code style issues with Black 2022-10-20 09:56:10 +00:00
redphix
c32c07eaa6
Python files style cleanup (#281)
* Remove unused imports in python files

* Add black and isort dependencies

Also added pyproject.toml for isort config, but later can be used to
configure various other python tools

* Add flake8 in requirements.txt

* Add py-linter workflow
2022-10-20 09:55:24 +00:00
Reckless_Satoshi
79dad7afe2
Add Chat endpoint to API v0 (#288)
* Add /api/chat route and GET method

* Add message POST method

* Wrap /api/chat GET in /api/order GET

* Add send channel message on POST request

* Fix OAS schema bug
2022-10-16 21:11:48 +00:00
redphix
9a6d3d33a4
Add OpenAPI v3.0 Docs for API (#243)
* Add initial api docs using drf-spectacular

This commit adds the inital and basic docs using drf-spectacular.
It also adds some serializers to be used for automatically
generating response objects by drf-spectacular

* Update api docs with correct request and response objects

- TODO: /order route

* Fix typo in api docs

* Separate OpenAPI schemas into it's own file

* Update drf-spectacular and add API intro and logo

* Update API docs for GET /order

* Add api docs for POST /order route

* Update serializers.py
2022-10-02 18:02:35 +00:00
ShatteredBunny
eff58dc91d
Add stealth invoices (#210)
* Add stealth invoice switch to profile

* Add stealth invoice including only order uuid

* Add explanatory tooltip for stealth invoices and fix code smells
2022-08-12 17:41:06 +00:00
Reckless_Satoshi
bd70d94d4a
Add MarketTicks endpoint /api/ticks. Fix do_accounting. 2022-06-21 13:25:03 -07:00
Reckless_Satoshi
83c8d80da3
Add exchange historical endpoint api/historical 2022-05-09 10:35:04 -07:00
Reckless_Satoshi
3d9ef5fc58
Add limits API endpoint 2022-03-20 16:46:36 -07:00
Reckless_Satoshi
f383d20c37
Implement public API non-KYC BTC prices 2022-03-12 03:24:11 -08:00
Reckless_Satoshi
255dae188d
Implement withdraw rewards (backend & frontend) 2022-03-06 08:08:28 -08:00
Reckless_Satoshi
4ee6778e11
Implement referral attributes and logics 2022-03-05 10:45:42 -08:00
Reckless_Satoshi
fc4ccd5281
Re-format all python code 2022-02-17 11:50:10 -08:00
LowEntropyFace
229294b878 change currencies.json access, fix async book filtering 2022-01-09 09:42:28 -05:00
Reckless_Satoshi
185e0af496
Merge with json-dicts 2022-01-09 04:35:19 -08:00
LowEntropyFace
ec823586c1 merge with branch logics-second-iteration 2022-01-08 20:18:11 -05:00
Reckless_Satoshi
5fb776aca7
Add TradeBox and QR client side generation 2022-01-08 05:08:03 -08:00
LowEntropyFace
215af668a2 merge htlc-model 2022-01-08 06:51:55 -05:00
fieryfrank
4516f1974a backend and BookPage.js use currencies.json 2022-01-07 18:48:23 -05:00
Reckless_Satoshi
9ab52853d5
Work on more logics. Rough draft finished 2022-01-07 10:22:52 -08:00
Reckless_Satoshi
34e05465c2
Add more logics bareframes 2022-01-06 12:33:40 -08:00
Reckless_Satoshi
9ade961e0f
Work on update order endpoint and taker requests 2022-01-04 16:13:08 -08:00
Reckless_Satoshi
e9bcd23347
Add BookView endpoint and refactor pages 2022-01-03 06:27:25 -08:00
Reckless_Satoshi
354e7fc5c7
Create user generation API
Endpoint request contains a token. Server checks whether it has enough entropy to be secure (at least 128 bits and >0.7 shannon heterogeneity). Server hashes the token (once as of now) and derives nickname and robohash avatar (goes into static/assets/avatars). Nickname is limited to only adjectives, nouns and 3 digits, restricted to 18 characters long max. The corpus of nicknames is 20 billion big (maybe not enough? nick collision chance can happen, but server will just reply with 400 unless the token matches perfectly too)
2022-01-02 09:15:09 -08:00
Reckless_Satoshi
298efc394b
Create order detail API endpoint, create order page. Not fully working yet 2022-01-02 04:59:48 -08:00
Reckless_Satoshi
76a45bc8d5
Create API endpoint for POST make order
Added the Order model with a rough approxiation to the fields needed. The field status can be read lineally as the progression trough the app pipeline. The view serves POSTs requests to enter new orders into the db.
2022-01-01 14:40:08 -08:00