- Go Base programming language
- Postgresql Database to store data
- Redis Basic queue management (POP/PUSH)
- Docker Make the back-end work in containers
- Docker Compose Connect all services together
Simply start the app with the docker-compose:
docker-compose up -d
It will give you your JWT token.
URL: /api/v1/user/register
Method: POST
Needs auth? No
Header: none
Request Body:
{
"name": "NAME",
"email": "[email protected]",
"password": "password"
}
It will give you your JWT token.
URL: /api/v1/user/login
Method: POST
Needs auth? No
Header: none
Request Body:
{
"email": "[email protected]",
"password": "password"
}
By adding an address, It will give you 10 units of that currency for testing.
URL: /api/v1/currency/add
Method: POST
Needs auth? Yes
Header:
{
"Authorization": "Bearer TOKEN"
}
Request Body:
{
"type": 1,
"address": "1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX"
}
Note:
Type 1
-> Bitcoin
Type 2
-> Ethereum
URL: /api/v1/tx/send
Method: POST
Needs auth? Yes
Header:
{
"Authorization": "Bearer TOKEN"
}
Request Body:
{
"type": 1,
"amount": 5,
"to": "[email protected]"
}
Note:
Type 1
-> Bitcoin
Type 2
-> Ethereum
URL: /api/v1/tx/history
Method: GET
Needs auth? Yes
Header:
{
"Authorization": "Bearer TOKEN"
}
Request Body: none
URL: /api/v1/tx/state/<ID>
Method: GET
Needs auth? Yes
Header:
{
"Authorization": "Bearer TOKEN"
}
Request Body: none