Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
update getLedgerEntries documentation (#614)
Browse files Browse the repository at this point in the history
* update

* update per feedback,
  • Loading branch information
tsachiherman authored Oct 16, 2023
1 parent de63ead commit 7506f2b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions api/methods/getLedgerEntries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ To fetch contract wasm byte-code, use the ContractCode ledger entry key.
## Return

- `<object>`
- `entries`: Array containing the specified ledger entries which were found
- `key`: `<xdr.LedgerKey>` - The key of the ledger entry (serialized in a base64 string)
- `xdr`: `<xdr.LedgerEntryData>` - The current value of the given ledger entry (serialized in a base64 string)
- `lastModifiedLedgerSeq`: `<number>` - The ledger number of the last time this entry was updated (optional)
- `entries`: Array containing the specified ledger entries which were found.
- `key`: `<xdr.LedgerKey>` - The key of the ledger entry (serialized in a base64 string).
- `xdr`: `<xdr.LedgerEntryData>` - The current value of the given ledger entry (serialized in a base64 string).
- `lastModifiedLedgerSeq`: `<string>` - The ledger sequence number of the last time this entry was updated.
- `expirationLedgerSeq`: `<string>` - The ledger sequence number after which the ledger entry would expire. This field exists only for ContractCodeEntry and ContractDataEntry ledger entries (optional).
- `latestLedger`: `<number>` - The current latest ledger observed by the node when this response was generated.

## Examples
Expand All @@ -40,7 +41,8 @@ To fetch contract wasm byte-code, use the ContractCode ledger entry key.
{
"key": "AAAAB+qfy4GuVKKfazvyk4R9P9fpo2n9HICsr+xqvVcTF+DC",
"xdr": "AAAABwAAAADqn8uBrlSin2s78pOEfT/X6aNp/RyArK/sar1XExfgwgAAAAphIGNvbnRyYWN0AAA=",
"lastModifiedLedgerSeq": "13"
"lastModifiedLedgerSeq": "13",
"expirationLedgerSeq": "95"
}
],
"latestLedger": "179436"
Expand Down Expand Up @@ -381,7 +383,8 @@ And the response we get contains (even more) `LedgerEntryData` that we can decod
{
"key": "AAAAB2QWKBCU9yGjzDJNxaEZpxEB6A8XsD2S/lKK/sViOLiC",
"xdr": "AAAABwAAAABkFigQlPcho8wyTcWhGacRAegPF7A9kv5Siv7FYji4ggAAAlQAYXNtAQAAAAEPA2ACfn4BfmABfgF+YAAAAgcBAXYBRwAAAwQDAQICBQMBABEGGQN/AUGAgMAAC38AQYWAwAALfwBBkIDAAAsHMQUGbWVtb3J5AgAFaGVsbG8AAQFfAAMKX19kYXRhX2VuZAMBC19faGVhcF9iYXNlAwIK4QID1gIDAn8CfgF/I4CAgIAAQSBrIgEkgICAgAACQAJAIACnQf8BcSICQQ5GDQAgAkHKAEcNAQtCACEDQXshAgNAAkACQAJAAkAgAkUNAEIBIQQgAkGFgMCAAGotAAAiBUHfAEYNAyAFrSEEIAVBUGpBCkkNAiAFQb9/akEaSQ0BAkAgBUGff2pBGk8NACAEQkV8IQQMBAsQgoCAgAAACyABIAA3AwggASADQgiGQg6ENwMAQQAhAgNAAkAgAkEQRw0AQQAhAgJAA0AgAkEQRg0BIAFBEGogAmogASACaikDADcDACACQQhqIQIMAAsLIAFBEGqtQiCGQgSEQoSAgIAgEICAgIAAIQQgAUEgaiSAgICAACAEDwsgAUEQaiACakICNwMAIAJBCGohAgwACwsgBEJLfCEEDAELIARCUnwhBAsgAkEBaiECIAQgA0IGhoQhAwwACwsAAAsEAAAACwIACwsOAQBBgIDAAAsFSGVsbG8AHhFjb250cmFjdGVudm1ldGF2MAAAAAAAAAAUAAAAJQBDDmNvbnRyYWN0c3BlY3YwAAAAAAAAAAAAAAAFaGVsbG8AAAAAAAABAAAAAAAAAAJ0bwAAAAAAEQAAAAEAAAPqAAAAEQ==",
"lastModifiedLedgerSeq": "75206"
"lastModifiedLedgerSeq": "75206",
"expirationLedgerSeq": "320384"
}
],
"latestLedger": "262384"
Expand Down

0 comments on commit 7506f2b

Please sign in to comment.