Skip to content

Commit

Permalink
Add getLedgers documentation (#1128)
Browse files Browse the repository at this point in the history
Add getLedgers documentation
  • Loading branch information
aditya1702 authored Dec 13, 2024
1 parent baa1521 commit 9e7b6b3
Show file tree
Hide file tree
Showing 7 changed files with 284 additions and 2 deletions.
11 changes: 11 additions & 0 deletions docs/data/rpc/api-reference/methods/getLedgers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
hide_title: true
description: Returns list of ledgers
---

import { RpcMethod } from "@site/src/components/RpcMethod";
import rpcSpec from "@site/static/stellar-rpc.openrpc.json";

<RpcMethod
method={rpcSpec.methods.filter((meth) => meth.name === "getLedgers")[0]}
/>
13 changes: 13 additions & 0 deletions openrpc/src/stellar-rpc/examplePairingObjects/GetLedgersPairs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"SuccessfulGetLedgersRequest": {
"name": "Successful getLedgers Request",
"description": "Query a list of ledgers starting from the given startLedger.",
"params": [
{ "$ref": "#/components/examples/GetLedgersStartLedger" },
{ "$ref": "#/components/examples/GetLedgersPagination" }
],
"result": {
"$ref": "#/components/examples/GetLedgersResult"
}
}
}
38 changes: 38 additions & 0 deletions openrpc/src/stellar-rpc/examples/Ledgers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"GetLedgersStartLedger": {
"name": "startLedger",
"value": 36233
},
"GetLedgersPagination": {
"name": "pagination",
"value": {
"limit": 2
}
},
"GetLedgersResult": {
"name": "getLedgersResult",
"value": {
"ledgers": [
{
"hash": "434de11b427aa4b6f8cda259ac2111a6aa148d2ab6b4c7affe864e94a9f4bd80",
"sequence": 36233,
"ledgerCloseTime": "1734032457",
"headerXdr": "Q03hG0J6pLb4zaJZrCERpqoUjSq2tMev/oZOlKn0vYAAAAAWY6AkQmSfV+Rrnpq308LrTR1IZq7dUQr4HkNPlpDpw4/4WH/HGddpIrl1KZiCUKzFOi9sqkX+b56aTGNqhTRHtwAAAABnWzxJAAAAAAAAAAEAAAAAqCTN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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFjoCRCZJ9X5GuemrfTwutNHUhmrt1RCvgeQ0+WkOnDjwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADVBewAAAAAAAAAAA=="
},
{
"hash": "201f38ca43cfad09d00287ee70d77edc8c88a61e018683fd466e71688222a217",
"sequence": 36234,
"ledgerCloseTime": "1734032462",
"headerXdr": "IB84ykPPrQnQAofucNd+3IyIph4BhoP9Rm5xaIIiohcAAAAWQ03hG0J6pLb4zaJZrCERpqoUjSq2tMev/oZOlKn0vYB8UE9ZJ4uLDnIu/g7+08D/eYnJjrJD07fGpWaVoLi29wAAAABnWzxOAAAAAAAAAAEAAAAAtV0Qsrt9KE7VwDpHpeG1kMkPV4NVRxzEUHu+ggTSPIsAAABAN6Cc3KxXPM2WmFDtY/yPZM0aha2yhnHFBDaliMqO6BzVQMb9Zlq5DoGrLr/xoFOp8YJ3RjLedF8w/KfN3ogPBuzRjPABveSt1CvvmDdnwUpSXyUsjdjECdbpjuKxaZZR+NeVPfeYT06qs2v4JwBff4WWpIGwEXPcxq3tZKuekH8AAI2KDeC2s6dkAAAAAAAIewDaiQAAAAAAAAAAAAAB3wAAAGQATEtAAAAAyESlcNBlpidDCvLHH8Nu1MWDHWwUXTfbvGKqvbvlzzrb2GJe+2UfU8rr8mWrJXRTcQhl5UYgKhOQUOWP1nWgbp4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"metadataXdr": "AAAAAQAAAAAgHzjKQ8+tCdACh+5w137cjIimHgGGg/1GbnFogiKiFwAAABZDTeEbQnqktvjNolmsIRGmqhSNKra0x6/+hk6UqfS9gHxQT1kni4sOci7+Dv7TwP95icmOskPTt8alZpWguLb3AAAAAGdbPE4AAAAAAAAAAQAAAAC1XRCyu30oTtXAOkel4bWQ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AAAAAAAAAADUXVhr7Q755CFYZZqxfW0/xedPwpsHIY7kUwvuNTmSWAAAAF0hmMeAAACHEAAAXIwAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAAACNiAAAAABnWzxEAAAAAAAAAAMAAAAAAAAAAgAAAAMAAI2KAAAAAAAAAAA1F1Ya+0O+eQhWGWasX1tP8XnT8KbByGO5FML7jU5klgAAABdIZjHgAAAhxAAAFyMAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAjYgAAAAAZ1s8RAAAAAAAAAABAACNigAAAAAAAAAANRdWGvtDvnkIVhlmrF9bT/F50/CmwchjuRTC+41OZJYAAAAXSGYx4AAAIcQAABckAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAI2KAAAAAGdbPE4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANUF7AAAAAAAAAAA"
}
],
"latestLedger": 36379,
"latestLedgerCloseTime": 1734033188,
"oldestLedger": 29312,
"oldestLedgerCloseTime": 1733997822,
"cursor": "36234"
}
}
}
46 changes: 46 additions & 0 deletions openrpc/src/stellar-rpc/methods/getLedgers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "getLedgers",
"summary": "returns a list of ledgers with their details",
"description": "The `getLedgers` method returns a detailed list of ledgers starting from the user specified starting point that you can paginate as long as the pages fall within the history retention of their corresponding RPC provider.",
"externalDocs": {
"url": "https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgers"
},
"paramStructure": "by-name",
"params": [
{
"$ref": "#/components/contentDescriptors/StartLedger"
},
{
"$ref": "#/components/contentDescriptors/TransactionsPagination"
}
],
"result": {
"name": "getLedgersResult",
"schema": {
"type": "object",
"properties": {
"ledgers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Ledgers"
}
},
"latestLedger": {
"$ref": "#/components/schemas/LatestLedger"
},
"latestLedgerCloseTimestamp": {
"$ref": "#/components/schemas/LatestLedgerCloseTime"
},
"oldestLedger": {
"$ref": "#/components/schemas/OldestLedger"
},
"oldestLedgerCloseTimestamp": {
"$ref": "#/components/schemas/OldestLedgerCloseTime"
}
}
}
},
"examples": [
{ "$ref": "#/components/examplePairingObjects/SuccessfulGetLedgersRequest" }
]
}
29 changes: 29 additions & 0 deletions openrpc/src/stellar-rpc/schemas/Ledgers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"Ledgers": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "The hash of the ledger header which was included in the chain"
},
"sequence": {
"type": "number",
"description": "The sequence number of the ledger (sometimes called the 'block height').",
"$ref": "#/components/schemas/LedgerSequence"
},
"ledgerCloseTime": {
"type": "string",
"description": "The timestamp at which the ledger was closed.",
"$ref": "#/components/schemas/LedgerCloseTime"
},
"headerXdr": {
"type": "string",
"description": "A base64 encoded string of the raw `LedgerHeader` xdr struct for this ledger."
},
"metadataXdr": {
"type": "string",
"description": "A base64 encoded string of the raw `LedgerCloseMeta` xdr struct for this ledger."
}
}
}
}
2 changes: 1 addition & 1 deletion openrpc/src/stellar-rpc/schemas/Pagination.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"limit": {
"type": "number",
"description": "The maximum number of records returned. For getTransactions, this ranges from 1 to 200 and defaults to 50."
"description": "The maximum number of records returned by the endpoint."
}
},
"required": []
Expand Down
Loading

0 comments on commit 9e7b6b3

Please sign in to comment.