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

Add page in RPC docs on XDR/JSON response format #1368

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

mollykarcher
Copy link
Contributor

@mollykarcher mollykarcher commented Mar 6, 2025

Related: #1366

image

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.

you write fast 😳 just a few nits but I'll ✔️ so you don't have to re-request a review


In RPC, you will encounter XDR when [simulating](../methods/simulateTransaction) and [sending](../methods/sendTransaction) transactions, as well as when retrieving [transactions](../methods/getTransactions), [ledgers](../methods/getLedgers), and [ledger entries](../methods/getLedgerEntries).

By default, RPC will return all XDR attributes as the machine-readable base64 encoded XDR string. All XDR encoded response fields are suffixed with `Xdr`. You can decode this XDR in the Stellar Lab’s [XDR page](https://lab.stellar.org/xdr/view?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;).
Copy link
Contributor

Choose a reason for hiding this comment

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

unfortunately, not all:

Suggested change
By default, RPC will return all XDR attributes as the machine-readable base64 encoded XDR string. All XDR encoded response fields are suffixed with `Xdr`. You can decode this XDR in the Stellar Lab’s [XDR page](https://lab.stellar.org/xdr/view?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;).
By default, RPC will return all XDR attributes as the machine-readable base64 encoded XDR string. XDR-encoded response fields are usually suffixed with `Xdr`. You can decode this XDR in the Stellar Lab’s [XDR page](https://lab.stellar.org/xdr/view?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dang it all! Thanks, which are not?

Copy link
Contributor

Choose a reason for hiding this comment

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

https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries is the biggest offender :/ xdr and key for the xdr.LedgerEntryData and xdr.LedgerKey, respectively (awesome right)

@mollykarcher
Copy link
Contributor Author

you write fast 😳

You read fast. ✊ team work makes the dream work

@mollykarcher mollykarcher force-pushed the molly/main/xdr-json branch from 2c20108 to abaa08a Compare March 7, 2025 00:02
@stellar-jenkins
Copy link

Co-authored-by: George <Shaptic@users.noreply.github.com>
@stellar-jenkins
Copy link

1 similar comment
@stellar-jenkins
Copy link

@mollykarcher mollykarcher merged commit 2f8c66b into main Mar 7, 2025
2 checks passed
@mollykarcher mollykarcher deleted the molly/main/xdr-json branch March 7, 2025 00:35
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.

3 participants