How to access the bitcoin block headers using the API?

According to ICP Further Advances Chain Fusion With Latest Bitcoin Milestone: Deuterium | by DFINITY | The Internet Computer Review | Aug, 2024 | Medium, it’s now possible to have access to bitcoin’s block headers.

image

I couldn’t not find in the documentation or at cdk-rs/src/ic-cdk/src/api/management_canister/bitcoin/mod.rs at main · dfinity/cdk-rs · GitHub any function to do that.

How can that be done using the Rust CDK?

I guess it was not included in the stable Rust CDK yet.

However, it can be called invoking the bitcoin canister directly: bitcoin-canister/canister/src/main.rs at master · dfinity/bitcoin-canister · GitHub

2 Likes