Skip to content

feat: add tx_slot and block_time to /accounts/:sa/*, treasury_donation in /txs/:tx_hash#306

Merged
slowbackspace merged 4 commits intomasterfrom
feat/accounts-time
Mar 2, 2026
Merged

feat: add tx_slot and block_time to /accounts/:sa/*, treasury_donation in /txs/:tx_hash#306
slowbackspace merged 4 commits intomasterfrom
feat/accounts-time

Conversation

@slowbackspace
Copy link
Copy Markdown
Contributor

@slowbackspace slowbackspace commented Feb 27, 2026

@slowbackspace slowbackspace changed the title feat: add tx_slot and block_time to /accounts/:sa/* feat: add tx_slot and block_time to /accounts/:sa/*, treasury_donation in /txs/:tx_hash Mar 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/openapi to 0.1.86-beta.2 and update lock/Nix yarn artifacts accordingly.
  • Add treasury_donation to /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.

@slowbackspace slowbackspace marked this pull request as ready for review March 2, 2026 20:07
@slowbackspace slowbackspace merged commit 53c113a into master Mar 2, 2026
2 of 3 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.

2 participants