Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clients/stellarcore: Add support for Core's getledgerentryraw endpoint #5455

Closed
Tracked by #5433
SirTyson opened this issue Sep 3, 2024 · 0 comments · Fixed by #5428
Closed
Tracked by #5433

clients/stellarcore: Add support for Core's getledgerentryraw endpoint #5455

SirTyson opened this issue Sep 3, 2024 · 0 comments · Fixed by #5428

Comments

@SirTyson
Copy link
Contributor

SirTyson commented Sep 3, 2024

Stellar core recently introduced a new HTTP endpoint getledgerentryraw in the p22 release: stellar/stellar-core#4350.

Request Format

getledgerentryraw needs to be implemented into the stellarcore client as its described here. The format is a POST request as follows:

ledgerSeq=NUM&key=Base64&key=Base64...
  • ledgerSeq: An optional parameter, specifying the ledger snapshot to base the query on.
    If the specified ledger in not available, a 404 error will be returned. If this parameter
    is not set, the current ledger is used.
  • key: A series of Base64 encoded XDR strings specifying the LedgerKey to query.

Response Format

/getledgerentryraw

JSON response (as a TypeScript interface):

interface Response {
  ledger: number; // uint32
  entries: {
    le: string; // base64-encoded xdr.LedgerEntry
  }[]

Note that this replaces the preexisting getledgerentry endpoint, which no longer exists.

Notes

While there is no release yet with the new endpoint, stellar-core master currently has the endpoint and can be built from source. Note that the getledgerentryraw is disabled by default and must be enabled explicitly via the new HTTP_QUERY_PORT config option. See "Query Commands" section in stellar-core docs/software/commands.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants