Underneath is a recording explaining the direct BTC integration and the code in this document in detail. You can find other helpful resources here.
You can find the slides here.
The repository with the final outcome of this tutorial can be found here.
We want to build on top of our HTTPS Outcalls example, that allowed us to fetch historic BTC price from the coinbase API. Initially this was free, now we want to charge users in ckBTC.
getPrice
that through the management canister interface made an http outcallcurl [<https://bitcoin.org/bin/bitcoin-core-22.0/bitcoin-22.0-osx64.tar.gz>](<https://bitcoin.org/bin/bitcoin-core-22.0/bitcoin-22.0-osx64.tar.gz>) -o btc.tar.gz
home
unpack the folderdata
folder in rootbitcoin.conf
file within root and add following content