Intro

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.

https://youtu.be/IWWcnPj1Dfo

What is our goal?

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.

Coding

Prerequisites

Overview of what is built already

run local bitcoin network

curl [<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