Context
The dfinity/examples submodule was bumped to d4ea422 (commit 12e1f0d), which added a get_blockchain_info endpoint to the basic_bitcoin example (Rust).
Current state
docs/guides/chain-fusion/bitcoin.mdx already has a short mention of get_blockchain_info (around line 456) with a minimal Rust snippet using ic_cdk_bitcoin_canister::get_blockchain_info. It does not:
- show the full
BlockchainInfo response fields (height, block_hash, timestamp, difficulty, UTXO count)
- include a Motoko equivalent
- link to the example
Task
Expand the existing get_blockchain_info section in docs/guides/chain-fusion/bitcoin.mdx to:
- Show the complete
BlockchainInfo response struct and what each field means
- Add a Motoko tab alongside the existing Rust snippet
- Link to the example: https://github.com/dfinity/examples/tree/master/rust/basic_bitcoin (implementation at
src/service/get_blockchain_info.rs)
Source material
.sources/examples/rust/basic_bitcoin/src/service/get_blockchain_info.rs — Rust implementation
.sources/examples/rust/basic_bitcoin/README.md — documents the response fields
- The
BlockchainInfo type is in ic-cdk-bitcoin-canister = "0.2"
Context
The
dfinity/examplessubmodule was bumped tod4ea422(commit12e1f0d), which added aget_blockchain_infoendpoint to thebasic_bitcoinexample (Rust).Current state
docs/guides/chain-fusion/bitcoin.mdxalready has a short mention ofget_blockchain_info(around line 456) with a minimal Rust snippet usingic_cdk_bitcoin_canister::get_blockchain_info. It does not:BlockchainInforesponse fields (height, block_hash, timestamp, difficulty, UTXO count)Task
Expand the existing
get_blockchain_infosection indocs/guides/chain-fusion/bitcoin.mdxto:BlockchainInforesponse struct and what each field meanssrc/service/get_blockchain_info.rs)Source material
.sources/examples/rust/basic_bitcoin/src/service/get_blockchain_info.rs— Rust implementation.sources/examples/rust/basic_bitcoin/README.md— documents the response fieldsBlockchainInfotype is inic-cdk-bitcoin-canister = "0.2"