Skip to content

Commit

Permalink
Run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Mar 7, 2025
1 parent 2caa864 commit 5dffaed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/data/rpc/api-reference/methods/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Don't know which endpoint you need to get what you want? A lot of the returned f

Here's a bit of a dive into what the "workhorse" endpoints provide, in decreasing order of granularity:

* `getLedgers` operates at the block level, providing you with the full, complete details of what occurred during application of that ledger (known as "ledger metadata", defined in the protocol by the [`LedgerCloseMetaV1`](https://github.com/stellar/stellar-xdr/blob/v22.0/Stellar-ledger.x#L508-L537) structure). Each of the subsequent endpoints is just a microscope into a subset of the data available provided by this endpoint. Metadata includes things like:
- `getLedgers` operates at the block level, providing you with the full, complete details of what occurred during application of that ledger (known as "ledger metadata", defined in the protocol by the [`LedgerCloseMetaV1`](https://github.com/stellar/stellar-xdr/blob/v22.0/Stellar-ledger.x#L508-L537) structure). Each of the subsequent endpoints is just a microscope into a subset of the data available provided by this endpoint. Metadata includes things like:
- Details for recreating the blockchain's state (see [Ledger Headers](/docs/learn/encyclopedia/network-configuration/ledger-headers.mdx) for more).
- The consensus information that led to the block closing (see [Stellar Consensus Protocol](/docs/learn/fundamentals/stellar-consensus-protocol.mdx)).
- The set of transactions, their respective operations, and the results of applying those transactions in this block (see [Transactions](/docs/learn/fundamentals/transactions/operations-and-transactions)).
* `getTransaction(s)` operates across a span of ledgers or on a single transaction hash depending on the variant. The structured data here includes details such as:
- `getTransaction(s)` operates across a span of ledgers or on a single transaction hash depending on the variant. The structured data here includes details such as:
- The exact transaction structure ("envelope") that was submitted.
- Results for each of the operations within the transaction.
- All side-effects to ledger state that occurred as a result of this transaction.
* `getEvents` lets you search for events that occurred over a ledger range. Each event is made up of topics (which you can filter on) and data which are `ScVal`s, Stellar's generic "value" type (see [Contract Development](docs/learn/encyclopedia/contract-development/types/built-in-types) for more).
* `getLedgerEntries`, in contrast to the above endpoints, provides information about **live** on-chain state rather than historical actions. The [getLedgerEntries](./getLedgerEntries.mdx) page itself goes into detail on the different kinds of state stored on chain and how to fetch them.
- `getEvents` lets you search for events that occurred over a ledger range. Each event is made up of topics (which you can filter on) and data which are `ScVal`s, Stellar's generic "value" type (see [Contract Development](docs/learn/encyclopedia/contract-development/types/built-in-types) for more).
- `getLedgerEntries`, in contrast to the above endpoints, provides information about **live** on-chain state rather than historical actions. The [getLedgerEntries](./getLedgerEntries.mdx) page itself goes into detail on the different kinds of state stored on chain and how to fetch them.

If you still aren't sure what you're looking for, remember that you can pass `xdrFormat: "json"` as a parameter to each of these endpoints to get a fully unpacked, human-readable JSON version of the XDR structures returned. You can look through these until you find what you need and go back to the Base64+unpack variation in your app. Equipped with an understanding of how to traverse XDR, the structure of the protocol, and your [favorite SDK](/docs/tools/sdks/), you should be able to find anything you want about the Stellar network with these endpoints.

TODO: Merge #1060 before this so that the above `getLedgerEntries` cross-ref actually makes sense.
TODO: Merge #1060 before this so that the above `getLedgerEntries` cross-ref actually makes sense.

0 comments on commit 5dffaed

Please sign in to comment.