A service that provides collaborative and secure custody of bitcoin. A M of N multi-sig wallet where the user holds M of the keys and the service holds one, that way the service is unable to sign transactions since they only have one key. Users can make use of their M keys or allow service to provide the other key necessary for transaction (User has to give service permission to sign with their key)
python
pip
virtualenv
postgres
- clone the repository
git clone https://github.com/toshmanuel/co-sign.git
cd Backend
virtualenv venv
- for MACOS/LINUX
source venv/bin/activate
- for WINDOWS
venv\Scripts\activate
pip install -r requirements.txt
- create a .env file in the Backend directory
- check the .env.sample file and copy to variable to the .env file
- replace the 'somevalues' with the neccesary value
python manage.py runserver
POST /api/v1/register
Request Body
{ "email": "some@email.com", "password": "somepassword", "password2": "somepassword" }On a successful request, this endpoint would return a 201 status code and
Response Body
{ "email": "some@email.com" }On a failed request e.g, email is not provided or the password does not match, or the password is too common, or the user already exists. this endpoint would return a 400 bad request status code
Possible Error Response, may return one or more of the following error
{ "email": [ "This field must be unique.", "Enter a valid email address." ], "password": [ "This password is too common.", "Password fields didn't match.", ] }
POST /api/v1/login
Request Body
{ "username": "some@email.com", "password": "somepassword", }On a successful request, this endpoint would return a 200 status code and
Response Body
{ "expiry": "2022-05-10T06:01:06.930521+01:00", "token": "3ee47e529230b68e12685924f1da2aa0cf67e228ea486626b6e2bbbeda117936" }On a failed request e.g, username is not provided, or the username is wrong or does not exist, or the password is incorrect, this endpoint would return a 400 bad request status code
Possible Error Response, may return one or more of the following error
{ "non_field_errors": [ "Unable to log in with provided credentials." ], "username": [ "This field may not be blank." ], "password": [ "This field may not be blank." ] }
POST /api/v1/logout/
Request Header should contain
Authorzation: Token token_generated_from_login
On a successful request, this endpoint would return a 204 status code
On a failed request e.g, if the key "Authorization" is not provided in the header, this endpoint would return a 400 bad request status code
Possible Error Response, may return one or more of the following error
{ "detail": "Invalid token." } { "detail": "Authentication credentials were not provided." }
👤 toshmanuel 👤 Muneerah1612 👤 j-kon
- Github: @toshmanuel
- Github: @Muneerah1612
- Github: @j-kon
Give a ⭐️ if this project helped you!