diff --git a/spec/_attachments/ic.did b/spec/_attachments/ic.did index 6f8521e9..26c2bd7d 100644 --- a/spec/_attachments/ic.did +++ b/spec/_attachments/ic.did @@ -166,6 +166,7 @@ type bitcoin_send_transaction_args = record { type bitcoin_get_block_headers_args = record { start_height : bitcoin_block_height; end_height : opt bitcoin_block_height; + network: bitcoin_network; }; type bitcoin_get_block_headers_result = record { diff --git a/spec/index.md b/spec/index.md index 4472530b..06a3a259 100644 --- a/spec/index.md +++ b/spec/index.md @@ -2479,7 +2479,7 @@ The `bitcoin_get_block_headers` endpoint is considered EXPERIMENTAL. Canister de ::: -Given a start height and an optional end height, the function returns the block headers in the provided range. The range is inclusive, i.e., the block headers at the start and end heights are returned as well. +Given a start height, an optional end height, and a Bitcoin network (`mainnet` or `testnet`), the function returns the block headers in the provided range. The range is inclusive, i.e., the block headers at the start and end heights are returned as well. An error is returned when an end height is specified that is greater than the tip height. If no end height is specified, all blocks until the tip height, i.e., the largest available height, are returned. However, if the range from the start height to the end height or the tip height is large, only a prefix of the requested block headers may be returned in order to bound the size of the response.