Skip to content

[api] examples, tests, and docs for fetching latest blocks#14

Merged
0o-de-lally merged 6 commits intomainfrom
blocks-sugar
Jul 25, 2025
Merged

[api] examples, tests, and docs for fetching latest blocks#14
0o-de-lally merged 6 commits intomainfrom
blocks-sugar

Conversation

@0o-de-lally
Copy link
Copy Markdown
Collaborator

Pull Request Summary

  • Added new helpers: getLatestBlocks and getLatestTxVersions in src/ledger/ledgerInfo.ts for querying the latest blocks and transaction versions from the chain. getLatestTxVersions supports filtering for user transactions.
  • Added a new example script: examples/queryBlocksAndVersions.ts showing how to query latest blocks and transaction versions, including user transaction filtering.
  • Extended test coverage: in tests/e2e_tests/ledgerInfo.test.ts to cover the new helpers.
  • Improved README.md:
    • Added a section with usage examples for the new block and version query helpers.
    • Reformatted all code snippets for proper TypeScript/JavaScript/bash highlighting.
    • Moved and clarified data query documentation.
  • General cleanup and formatting improvements for code and documentation.

@0o-de-lally 0o-de-lally merged commit c8f927a into main Jul 25, 2025
8 checks 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.

1 participant