feat: add tx_slot and block_time to /accounts/:sa/*, treasury_donation in /txs/:tx_hash#306
Merged
slowbackspace merged 4 commits intomasterfrom Mar 2, 2026
Merged
feat: add tx_slot and block_time to /accounts/:sa/*, treasury_donation in /txs/:tx_hash#306slowbackspace merged 4 commits intomasterfrom
slowbackspace merged 4 commits intomasterfrom
Conversation
78e3ce0 to
39067db
Compare
39067db to
cf7c5b5
Compare
975695f to
ce60d63
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the backend API and SQL queries to expose newly added Blockfrost OpenAPI fields (tx_slot, block_height, block_time, treasury_donation) on specific /accounts/{stake_address}/* and /txs/{hash} endpoints, aligning the implementation with the referenced OpenAPI change.
Changes:
- Bump
@blockfrost/openapito0.1.86-beta.2and update lock/Nix yarn artifacts accordingly. - Add
treasury_donationto/txs/{hash}SQL + route response and extend the Tx query type. - Extend stake-address accounts SQL queries (paged + unpaged) to return
tx_slot,block_height,block_time, and update related query types and unit fixtures.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks @blockfrost/openapi at 0.1.86-beta.2. |
| yarn-project.nix | Updates Nix yarn cache entries for the new OpenAPI package version. |
| package.json | Bumps @blockfrost/openapi dependency to 0.1.86-beta.2. |
| CHANGELOG.md | Documents added response fields for the affected endpoints. |
| src/types/queries/tx.ts | Adds treasury_donation to the Tx query interface. |
| src/types/queries/accounts.ts | Adds tx_slot, block_height, block_time to relevant account query interfaces. |
| src/sql/txs/txs_hash.sql | Selects treasury_donation (as text) in /txs/{hash} query. |
| src/routes/txs/hash/index.ts | Includes treasury_donation in the /txs/{hash} response object. |
| src/sql/accounts/delegations.sql | Adds block join and returns tx_slot, block_height, block_time. |
| src/sql/accounts/registrations.sql | Adds block join and returns tx_slot, block_height, block_time. |
| src/sql/accounts/withdrawals.sql | Adds block join and returns tx_slot, block_height, block_time. |
| src/sql/accounts/mirs.sql | Adds block join and returns tx_slot, block_height, block_time. |
| test/unit/fixtures/txs.fixtures.ts | Updates /txs/{hash} fixtures to include treasury_donation. |
| test/unit/fixtures/accounts.fixtures.ts | Updates account endpoint fixtures to include tx_slot, block_height, block_time. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ce60d63 to
fdec0b0
Compare
fdec0b0 to
fb77425
Compare
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.
openapi blockfrost/openapi#440
tests blockfrost/blockfrost-tests#52