feat: support transaction cursor pagination - #68
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds cursor-based (block range) filtering for transaction-list endpoints while ensuring cursor query parameters are retained during multi-page “fetch all” pagination.
Changes:
- Introduces
CursorPaginationwithfrom/to(inclusive) cursor builders onPagination. - Adds cursor query parameter support to account/address/asset transaction endpoints.
- Updates URL batch generation to preserve non-pagination query parameters (e.g.,
from/to) across pages and adds unit tests + changelog entry.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/url.rs | Adds cursor-aware URL builder and preserves extra query params in generate_batch (plus tests). |
| src/pagination.rs | Adds CursorPagination and Pagination::{with_from,with_to,with_range} helpers (plus tests). |
| src/lib.rs | Re-exports CursorPagination from the crate root. |
| src/api/mod.rs | Adds internal call_cursor_paged_endpoint and a test ensuring cursor params are sent. |
| src/api/endpoints/assets.rs | Updates asset transactions endpoint to accept cursor pagination. |
| src/api/endpoints/addresses.rs | Updates address transactions endpoint to accept cursor pagination. |
| src/api/endpoints/accounts.rs | Updates account transactions endpoint to accept cursor pagination. |
| CHANGELOG.md | Documents the added cursor support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
CHANGELOG.md:14
- The PR description mentions adding a
CursorPaginationtype, but the implementation (and this changelog entry) extendsPaginationwithfrom/toand introducesBlockCursor. Please update the PR description to match the actual API changes (or rename/introduce the described type) to avoid confusion for reviewers and release notes consumers.
### Added
- `Pagination::with_from`, `Pagination::with_to` and `Pagination::with_range` for inclusive `from`/`to`
block cursors, plus the `BlockCursor` type they take
- Cursors are only sent by the three endpoints that accept them (`accounts_transactions`,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.