Skip to content

Conversation

@m-kus
Copy link
Member

@m-kus m-kus commented Sep 29, 2025

Add API endpoint to retrieve multiple block headers

This PR adds a new API endpoint to retrieve a range of Bitcoin block headers by offset and size. The implementation includes:

  • New GetBlockHeaders variant in ApiRequestBody and ApiResponseBody enums
  • New get_block_headers method in AppClient to request multiple headers
  • New HTTP endpoint /headers with query parameters for offset and size
  • Default values for offset (0) and size (10) when not specified in the request

This allows clients to efficiently fetch multiple block headers in a single request rather than making separate calls for each header.

Copy link
Member Author

m-kus commented Sep 29, 2025

@m-kus m-kus marked this pull request as ready for review September 29, 2025 18:40
@m-kus m-kus requested a review from maciejka as a code owner September 29, 2025 18:40
@m-kus m-kus mentioned this pull request Sep 30, 2025
@m-kus m-kus force-pushed the 09-29-single_writer_multiple_reader_mmr_store branch from a621be0 to fdd9498 Compare September 30, 2025 13:04
@m-kus m-kus force-pushed the 09-29-expose_endpoint_to_fetch_multiple_block_headers branch from b1ec240 to a24ad49 Compare September 30, 2025 13:04
@m-kus m-kus force-pushed the 09-29-single_writer_multiple_reader_mmr_store branch from fdd9498 to 5ffb65f Compare October 3, 2025 16:16
@m-kus m-kus force-pushed the 09-29-expose_endpoint_to_fetch_multiple_block_headers branch from a24ad49 to 228385b Compare October 3, 2025 16:16
@m-kus m-kus force-pushed the 09-29-single_writer_multiple_reader_mmr_store branch from 5ffb65f to e967826 Compare October 3, 2025 16:19
@m-kus m-kus force-pushed the 09-29-expose_endpoint_to_fetch_multiple_block_headers branch from 228385b to 4be00c7 Compare October 3, 2025 16:19
@m-kus m-kus mentioned this pull request Oct 3, 2025
@m-kus m-kus force-pushed the 09-29-single_writer_multiple_reader_mmr_store branch from e967826 to f8254bd Compare October 6, 2025 13:27
@m-kus m-kus force-pushed the 09-29-expose_endpoint_to_fetch_multiple_block_headers branch from 4be00c7 to fa33177 Compare October 6, 2025 13:27
@m-kus m-kus force-pushed the 09-29-single_writer_multiple_reader_mmr_store branch from f8254bd to f87e158 Compare October 6, 2025 20:37
@m-kus m-kus force-pushed the 09-29-expose_endpoint_to_fetch_multiple_block_headers branch from fa33177 to e618821 Compare October 6, 2025 20:37
Base automatically changed from 09-29-single_writer_multiple_reader_mmr_store to main October 6, 2025 20:47
@m-kus m-kus force-pushed the 09-29-expose_endpoint_to_fetch_multiple_block_headers branch from e618821 to fe06826 Compare October 6, 2025 20:48
@m-kus m-kus merged commit beed531 into main Oct 6, 2025
9 checks passed
@m-kus m-kus deleted the 09-29-expose_endpoint_to_fetch_multiple_block_headers branch October 6, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants