Skip to content

feat: Implement Mirror Node Blocks API support across all frameworks#80

Open
Twiineenock wants to merge 1 commit intohiero-ledger:mainfrom
Twiineenock:feat/blocks-api
Open

feat: Implement Mirror Node Blocks API support across all frameworks#80
Twiineenock wants to merge 1 commit intohiero-ledger:mainfrom
Twiineenock:feat/blocks-api

Conversation

@Twiineenock
Copy link
Copy Markdown

@Twiineenock Twiineenock commented Apr 24, 2026

This commit adds the Block data model, BlockRepository interfaces, and framework-specific implementations for Spring Boot and MicroProfile. It also includes integration tests and sample endpoint demonstrations.

Description:
Implement native support for the Mirror Node Blocks API across the Hiero Enterprise Java SDK to enable enterprise-grade network observation and indexing.

  • Add Block and TimestampRange Java Records to hiero-enterprise-base
  • Define BlockRepository interface in hiero-enterprise-base
  • Implement BlockRepositoryImpl in hiero-enterprise-spring with auto-configuration
  • Implement BlockRepositoryImpl in hiero-enterprise-microprofile
  • Update MirrorNodeJsonConverterImpl to handle block JSON mapping
  • Add integration tests for block retrieval and pagination in all framework modules
  • Update MicroProfile sample with necessary REST and JSON extensions

Related issue(s):

Fixes #79

Notes for reviewer:
I have verified the implementation by running both the Spring Boot and MicroProfile sample applications against the Hedera Testnet. Both frameworks successfully retrieve and display live block data via the /blocks endpoint. Integration tests cover pagination and data integrity for block queries by number and hash.

I've attached screenshots from both the Spring Boot and MicroProfile environments demonstrating live block data retrieval below.

blocks

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

This commit adds the Block data model, BlockRepository interfaces, and framework-specific implementations for Spring Boot and MicroProfile. It also includes integration tests and sample endpoint demonstrations.

Signed-off-by: Twiineenock <Twiineenock@users.noreply.github.com>
@Twiineenock
Copy link
Copy Markdown
Author

HI @hendrikebbers , @Ndacyayisenga-droid, please have a look here.

@manishdait
Copy link
Copy Markdown
Contributor

@Twiineenock , thanks for the PR, your commits are missing gpg-sign. you can follow this Signing Docs

Copy link
Copy Markdown

@Abhishek9639 Abhishek9639 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall the changes seem clean and consistent with the existing structure.
Just a quick check: were all tests/builds run after these changes to ensure everything still works as expected?

@Twiineenock
Copy link
Copy Markdown
Author

Looks good overall the changes seem clean and consistent with the existing structure. Just a quick check: were all tests/builds run after these changes to ensure everything still works as expected?

Thnaks @Abhishek9639 , tests passed

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.

Support for Mirror Node Blocks API in Hiero Enterprise Java

3 participants