Hello There! ✌🏽 This project implements transactions in ckBTC, a cryptocurrency based on the Bitcoin blockchain. The goal of this project is to demonstrate how transactions can be implemented in a cryptocurrency in a secure and efficient manner.
At first rename the .env-example
to .env
, then:
Build the image:
npm run docker:build
Start all services:
npm run docker:up
or
npm i
Install prisma-cli:
npm i prisma -g
We have to create a mysql container, if you want to use another instance, just change the variables in the .env
file.
npm run docker:up:db
Run migrations:
npx prisma migrate dev
Run seeders:
npx prisma db seed
And finally:
npm run start:dev
We have two kinds of endpoints here public
and private
.
More details in: Postman Collection
GET app/user-balance/:uid
Get the user balance by ckBTC from network.
GET app/payment-status
Get payment status from ckBTC Network.
GET app/payment-received
Check if the payment has been received.
GET app/payment-history
Retrieve the payment history by user.
POST app/payment-status
Create payment request to another ckBTC address.
POST /login
POST /refresh
POST /recover
POST /register