get Ledger Entries
Reads the current value of ledger entries directly.
Allows direct inspection of ledger state including contracts, contract code, account data, and other ledger entries. This is a low-level API - prefer higher-level methods like getAccount or getContractData when possible.
Example
val keys = listOf(ledgerKey1, ledgerKey2)
val response = server.getLedgerEntries(keys)
response.entries?.forEach { entry ->
println("Key: ${entry.key}")
println("XDR: ${entry.xdr}")
}Content copied to clipboard
Return
Ledger entries response with current values
Parameters
keys
Collection of ledger keys to fetch (at least one required)
See also
Throws
If keys collection is empty
If the RPC request fails