Skip to content

Conversation

@whankinsiv
Copy link
Collaborator

@whankinsiv whankinsiv commented Oct 24, 2025

This PR implements 3 of the 10 remaining account related endpoints described in #256:

  • /accounts/{stake_address}/registrations - Queries historical_accounts_state for registration history, then fetches TxHash values from chain_store using each TxIdentifier to construct the Blockfrost aligned response.
  • /accounts/{stake_address}/delegations - Queries historical_accounts_state for delegation history, resolving TxHash via chain_store.
  • /accounts/{stake_address}/mirs - Queries historical_accounts_state for MIR history, resolving TxHash via chain_store.

Main changes:

  • Registered 3 endpoints in rest_blockfrost initialization.
  • Added and implemented handle_account_registrations_blockfrost, handle_account_delegations_blockfrost, and handle_account_mirs_blockfrost to handlers/accounts.rs.

Notes:

  • The registrations endpoint currently returns 0 for the amount field as this data isn't included in the certificate message. I am still considering the best approach for handling this and am currently leaning towards moving the historical epoch stakes data from accounts_state to historical_accounts_state although this would require passing the per stake address distribution on the message bus. Alternatively, we could rely on a second query in the rest handler to retrieve the account epoch stake from accounts_state under the assumption that spdd-retention-epochs is configured to store all epochs.

Next steps:

@whankinsiv
Copy link
Collaborator Author

Awaiting the review/merge of #272 before moving to ready for review.

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