Skip to content

Added more ledger details output by getLatestLedger endpoint (P25)#554

Merged
cjonas9 merged 5 commits intoprotocol-25from
add-more-ledger-details-to-getlatestledger-p25
Dec 3, 2025
Merged

Added more ledger details output by getLatestLedger endpoint (P25)#554
cjonas9 merged 5 commits intoprotocol-25from
add-more-ledger-details-to-getlatestledger-p25

Conversation

@cjonas9
Copy link
Contributor

@cjonas9 cjonas9 commented Dec 3, 2025

What

See issue #79. Included more details to be output by the getLatestLedger endpoint such that it matches the info output by getLedgers. The following fields are output:

  • id: hash of the lastest ledger
  • protocolVersion: Stellar Core protocol version
  • sequence: sequence number of the latest ledger
  • closeTime: time the latest ledger closed
  • headerXdr: xdr encoded ledger header
  • metadataXdr: xdr encoded representation of latest ledger metadata

Note that this is a copy of this PR for the protocol-25 branch.

This PR must be merged alongside this PR, which expands the newly migrated getLatestLedgerResponse struct.

Why

The getLatestLedger endpoint should return all information about the ledger, but it previously only output id, protocolVersion, and sequence.

Known limitations

N/A.

@cjonas9 cjonas9 linked an issue Dec 3, 2025 that may be closed by this pull request
@cjonas9 cjonas9 changed the base branch from main to protocol-25 December 3, 2025 09:27
@socket-security
Copy link

socket-security bot commented Dec 3, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​stellar/​go-stellar-sdk@​v0.0.0-20251201220028-3321201669c7 ⏵ v0.0.0-20251202202202-ea334ebd8d1f75 +1100100100100

View full report

@cjonas9 cjonas9 marked this pull request as ready for review December 3, 2025 09:29
Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

LGTM! But holding off on the ✔️ until stellar/go-stellar-sdk#5870 merges and your go.mod here updates.

@cjonas9 cjonas9 requested a review from a team December 3, 2025 20:05
@cjonas9 cjonas9 merged commit d77ee6d into protocol-25 Dec 3, 2025
11 of 14 checks passed
@cjonas9 cjonas9 deleted the add-more-ledger-details-to-getlatestledger-p25 branch December 3, 2025 21:03
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.

Add more ledger details to getLedger/getLatestLedger

2 participants