Methods
All you need to know about available RPC methods, parameters and responses, and making RPC requests.
ποΈ getEvents
Returns contract events
ποΈ getFeeStats
Returns statistics about charged inclusion fees for Soroban transactions and Stellar transactions
ποΈ getHealth
Returns node health
ποΈ getLatestLedger
Returns latest known ledger
ποΈ getLedgerEntries
Returns ledger entries
ποΈ getLedgers
Returns list of ledgers
ποΈ getNetwork
Returns network config
ποΈ getTransaction
Returns transaction details
ποΈ getTransactions
Returns list of transactions
ποΈ getVersionInfo
Returns version information
ποΈ sendTransaction
Submits a transaction
ποΈ simulateTransaction
Submits a trial contract invocation transaction
Don't know which endpoint you need to get what you want? A lot of the returned fields are deeply-nested XDR structures, so it can be hard to figure out what kind of information is available in each of these. 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 theLedgerCloseMeta
union, specifically theV1
iteration). 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 for more).
- The consensus information that led to the block closing (see Stellar Consensus Protocol).
- The set of transactions, their respective operations, and the results of applying those transactions in this block (see 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:- 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. Events are emitted by the system and by smart contracts to communicate meaningful state changes to off chain indexers (see Events for more). Each event is made up of topics (which you can filter on) and data which areScVal
s, Stellar's generic "value" type (see Contract Development for more).getLedgerEntries
, in contrast to the above endpoints, provides information about live on-chain state rather than historical actions. The getLedgerEntries 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, you should be able to find anything you want about the Stellar network with these endpoints.