Clone the project
git clone https://github.com/adrian-d-hidalgo/azle-api-rest-ckbtc
Go to the project directory
cd azle-api-rest-ckbtc
Install dependencies
npm install
# only for mac
codesign -s - .bitcoin/bin/bitcoind
npm run btc:start
In another terminal run:
npm run icp:start
Open another terminal and run:
npm run icp:deploy:local
Run the following command:
# only for mac
codesign -s - .bitcoin/bin/bitcoin-cli
# Run three times this command, but wait 1 second between each exacution
npm run btc:mint --address=$ADDRESS
Wait for 5 around seconds and make a request to POST /users/:userId/balance
Then, you can verify the user balance in this endpoint:
GET /users/:userId/balance