-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: Add
getTransactions
documentation (#636)
* Add getTransactions documenation - 1 * Add getTransactions documentation - 2 * Add getTransactions documentation - 4 * Refactor Pagination changes * Refactor the params object in getTransactions examples * Change naming to only RPC * Change description of diagnosticEventsXdr * Add "items" * Update openrpc/src/methods/getTransactions.json Co-authored-by: George <Shaptic@users.noreply.github.com> * Update openrpc/src/schemas/Cursor.json Co-authored-by: George <Shaptic@users.noreply.github.com> * Update openrpc/src/schemas/Pagination.json Co-authored-by: George <Shaptic@users.noreply.github.com> * Small changes - 1 * Remove links - 1 * Remove links - 2 * Fix broken TOID link --------- Co-authored-by: George <Shaptic@users.noreply.github.com>
- Loading branch information
1 parent
c961713
commit 7b235e8
Showing
11 changed files
with
624 additions
and
11 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
network/soroban-rpc/api-reference/methods/getTransactions.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
hide_title: true | ||
description: Returns list of transactions | ||
--- | ||
|
||
import { RpcMethod } from "@site/src/components/RpcMethod"; | ||
|
||
<RpcMethod method="getTransactions" platform="soroban" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
{ | ||
"Pagination": { | ||
"EventsPagination": { | ||
"name": "pagination", | ||
"summary": "pagination options", | ||
"description": "Pagination in soroban-rpc is similar to pagination in Horizon. See [Pagination](https://developers.stellar.org/network/soroban-rpc/pagination).", | ||
"required": false, | ||
"schema": { | ||
"$ref": "#/components/schemas/Pagination" | ||
"$ref": "#/components/schemas/EventsPagination" | ||
} | ||
}, | ||
"TransactionsPagination": { | ||
"name": "pagination", | ||
"summary": "pagination options", | ||
"description": "Pagination in RPC is similar to pagination in Horizon. See [Pagination](https://developers.stellar.org/network/soroban-rpc/pagination).", | ||
"required": false, | ||
"schema": { | ||
"$ref": "#/components/schemas/TransactionsPagination" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
openrpc/src/examplePairingObjects/GetTransactionsPairs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"SuccessfulGetTransactionsRequest": { | ||
"name": "Successful getTransactions Request", | ||
"description": "Query a list of transactions starting from the given startLedger.", | ||
"params": [ | ||
{ "$ref": "#/components/examples/GetTransactionsStartLedger" }, | ||
{ "$ref": "#/components/examples/GetTransactionsPagination" } | ||
], | ||
"result": { | ||
"$ref": "#/components/examples/GetTransactionsResult" | ||
} | ||
}, | ||
"SuccessfulGetTransactionsRequestUsingCursor": { | ||
"name": "Successful getTransactions Request Using Cursor", | ||
"description": "Query a list of transactions starting from the given cursor.", | ||
"params": [ | ||
{ "$ref": "#/components/examples/GetTransactionsPaginationWithCursor" } | ||
], | ||
"result": { | ||
"$ref": "#/components/examples/GetTransactionsResultUsingCursor" | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "getTransactions", | ||
"summary": "returns a list of transactions with their details", | ||
"description": "The `getTransactions` method return a detailed list of transactions 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/network/soroban-rpc/api-reference/methods/getTransactions" | ||
}, | ||
"paramStructure": "by-name", | ||
"params": [ | ||
{ | ||
"$ref": "#/components/contentDescriptors/StartLedger" | ||
}, | ||
{ | ||
"$ref": "#/components/contentDescriptors/TransactionsPagination" | ||
} | ||
], | ||
"result": { | ||
"name": "getTransactionsResult", | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"transactions": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/Transactions" | ||
} | ||
}, | ||
"latestLedger": { | ||
"$ref": "#/components/schemas/LatestLedger" | ||
}, | ||
"latestLedgerCloseTime": { | ||
"$ref": "#/components/schemas/LatestLedgerCloseTime" | ||
}, | ||
"oldestLedger": { | ||
"$ref": "#/components/schemas/OldestLedger" | ||
}, | ||
"oldestLedgerCloseTime": { | ||
"$ref": "#/components/schemas/OldestLedgerCloseTime" | ||
} | ||
} | ||
} | ||
}, | ||
"examples": [ | ||
{ "$ref": "#/components/examplePairingObjects/SuccessfulGetTransactionsRequest" }, | ||
{ "$ref": "#/components/examplePairingObjects/SuccessfulGetTransactionsRequestUsingCursor" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"Cursor": { | ||
"title": "cursor", | ||
"type": "string", | ||
"description": "A unique identifier (specifically, a [TOID](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0035.md#specification)) that points to a specific location in a collection of responses and is pulled from the `paging_token` value of a record. When a cursor is provided, RPC will _not_ include the element whose ID matches the cursor in the response: only elements which appear _after_ the cursor will be included." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"Transactions": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"description": "Indicates whether the transaction was successful or not." | ||
}, | ||
"applicationOrder": { | ||
"type": "number", | ||
"description": "The 1-based index of the transaction among all transactions included in the ledger." | ||
}, | ||
"feeBump": { | ||
"type": "boolean", | ||
"description": "Indicates whether the transaction was fee bumped." | ||
}, | ||
"envelopeXdr": { | ||
"type": "string", | ||
"description": "A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction." | ||
}, | ||
"resultXdr": { | ||
"type": "string", | ||
"description": "A base64 encoded string of the raw TransactionResult XDR struct for this transaction." | ||
}, | ||
"resultMetaXdr": { | ||
"type": "string", | ||
"description": "A base64 encoded string of the raw TransactionMeta XDR struct for this transaction." | ||
}, | ||
"diagnosticEventsXdr": { | ||
"type": "array", | ||
"description": "(optional) A base64 encoded slice of xdr.DiagnosticEvent. This is only present if the `ENABLE_SOROBAN_DIAGNOSTIC_EVENTS` has been enabled in the stellar-core config.", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"ledger": { | ||
"title": "ledger", | ||
"description": "The sequence number of the ledger which included the transaction.", | ||
"$ref": "#/components/schemas/LedgerSequence" | ||
}, | ||
"ledgerCloseTime": { | ||
"title": "createdAt", | ||
"description": "The unix timestamp of when the transaction was included in the ledger.", | ||
"$ref": "#/components/schemas/LedgerCloseTime" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.