Skip to content

Commit

Permalink
Added the Bitcoin network parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
THLO committed Jul 16, 2024
1 parent b4122d2 commit 44f9850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/_attachments/ic.did
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 44f9850

Please sign in to comment.