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

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@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
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