Skip to content

Conversation

@saitunc
Copy link
Contributor

@saitunc saitunc commented Nov 6, 2025

Closes #204

This PR is intended to implement the query features mentioned in issue #204 as a module.

Changes

Core Implementation

  • Added BlockExplorer interface defining waitTxInclusion() and getBlock() methods F(338ca4e)
  • Implemented GraphqlBlockExplorer in @proto-kit/sdk for client-side remote queries
  • Implemented InMemoryBlockExplorer in @proto-kit/sequencer for server-side local queries (Final form of those two are at 92fa991)

Features

  • waitTxInclusion(): Poll transaction status until included in a block
    • Returns transaction state: INCLUDED, PENDING, or UNKNOWN
    • Configurable polling interval and attempt limits
  • getBlock(): Retrieve block data by hash or height
    • Returns block model with transactions and metadata
    • Defined GraphQL fragment for efficient query composition (92fa991)

Tests

  • Added comprehensive test cases for both explorer implementations
  • Tests cover transaction inclusion polling and block retrieval

@saitunc saitunc marked this pull request as draft November 6, 2025 14:28
@saitunc saitunc marked this pull request as ready for review November 10, 2025 08:58
@saitunc saitunc requested a review from rpanic November 10, 2025 11:53
@saitunc saitunc merged commit 1f4173a into develop Nov 14, 2025
5 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.

Enhance client-side query API

3 participants