forked from stellar/stellar-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation for getTransaction() and sendTransaction() (stel…
- Loading branch information
Showing
3 changed files
with
122 additions
and
126 deletions.
There are no files selected for viewing
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,108 @@ | ||
--- | ||
sidebar_position: 8 | ||
--- | ||
|
||
Clients will poll this to tell when the transaction has been completed. | ||
|
||
|
||
## Parameters | ||
|
||
- `<hash>` - transaction hash to query, as a hex-encoded string | ||
|
||
## Returns | ||
|
||
- `<object>` | ||
- `status`: `<status>` - the current status of the transaction by hash, one of: | ||
- `SUCCESS` | ||
- `NOT_FOUND` | ||
- `FAILED` | ||
- `latestLedger`: `<string>` - The latest ledger known to Soroban-RPC at the time it handled the `getTransaction()` request. | ||
- `latestLedgerCloseTime`: `<string>` - The unix timestamp of the close time of the latest ledger known to Soroban-RPC at the time it handled the `getTransaction()` request. | ||
- `oldestLedger`: `<string>` - The oldest ledger ingested by Soroban-RPC at the time it handled the `getTransaction()` request. | ||
- `oldestLedgerCloseTime`: `<string>` - The unix timestamp of the close time of the oldest ledger ingested by Soroban-RPC at the time it handled the `getTransaction()` request. | ||
- `ledger`: `<string>` - (optional) The sequence of the ledger which included the transaction. This field is only present if `status` is `SUCCESS` or `FAILED`. | ||
- `createdAt`: `<string>` - (optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`. | ||
- `applicationOrder`: `<number>` - (optional) The index of the transaction among all transactions included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`. | ||
- `feeBump`: `<boolean>` - (optional) Indicates whether the transaction was fee bumped. This field is only present if `status` is `SUCCESS` or `FAILED`. | ||
- `envelopeXdr`: `<xdr.TransactionEnvelope>` - (optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction. | ||
- `resultXdr`: `<xdr.TransactionResult>` - (optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if `status` is `SUCCESS` or `FAILED`. | ||
- `resultMetaXdr`: `<xdr.TransactionResultMeta>` - (optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction. | ||
|
||
## Examples | ||
|
||
### Request | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"method": "getTransactionStatus", | ||
"params": { | ||
"hash": "97eb77da26e21d6a032fc0c311831d94a702ba336037da7c8a5ec51b3e39c485" | ||
} | ||
} | ||
``` | ||
|
||
### Response | ||
|
||
#### Not Found | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"result": { | ||
"status": "NOT_FOUND", | ||
"latestLedger": "45075181", | ||
"latestLedgerCloseTime": "1677115742", | ||
"oldestLedger": "45070000", | ||
"latestLedgerCloseTime": "1677000000" | ||
} | ||
} | ||
``` | ||
|
||
#### Success | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"result": { | ||
"status": "SUCCESS", | ||
"latestLedger": "45075181", | ||
"latestLedgerCloseTime": "1677115742", | ||
"oldestLedger": "45070000", | ||
"latestLedgerCloseTime": "1677000000", | ||
"ledger": "45070700", | ||
"createdAt": "1677009000", | ||
"applicationOrder": 1, | ||
"feeBump": false, | ||
"envelope_xdr": "AAAAAgAAAAC+B6dP3Y3Dk7cO+EXButf4j/a6NgZ8jhUdGd8Y4DLK1QAAJxMB1QqkAGOQiwAAAAEAAAAAAAAAAAAAAABkAG82AAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABRVRYAAAAAACIVkm2vMC7wfGBUXcyyT5KMkEhZr0TEHmgyspvSQ+skwAAAAAFSbLgKG8eYQCUWuIAAAAAR3McdwAAAAAAAAAB4DLK1QAAAEDJvETQ3zLdr1RXE4KEQ+tlmWPh6zp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AAAAAAAAAAwKxa3UAAAAAAAAAAL4Hp0/djcOTtw74RcG61/iP9ro2BnyOFR0Z3xjgMsrVAAAAAAx/eFQB1QqkAGOQiwAAAAgAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAABM1434AAAAAAFScZoAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAArFrdQAAAABkAG8eAAAAAAAAAAECsWt1AAAAAAAAAAC+B6dP3Y3Dk7cO+EXButf4j/a6NgZ8jhUdGd8Y4DLK1QAAAAAMf3hUAdUKpABjkIsAAAAIAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAATNeN+AAAAAABUmy4AAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAKxa3UAAAAAZABvHgAAAAAAAAADArFrcwAAAAEAAAAAvgenT92Nw5O3DvhFwbrX+I/2ujYGfI4VHRnfGOAyytUAAAABRVRYAAAAAACIVkm2vMC7wfGBUXcyyT5KMkEhZr0TEHmgyspvSQ+skwAAAE+W7pTjf/////////8AAAABAAAAAQAAAAFw+HPyAAAARkSap3YAAAAAAAAAAAAAAAECsWt1AAAAAQAAAAC+B6dP3Y3Dk7cO+EXButf4j/a6NgZ8jhUdGd8Y4DLK1QAAAAFFVFgAAAAAAIhWSba8wLvB8YFRdzLJPkoyQSFmvRMQeaDKym9JD6yTAAAAT5bulON//////////wAAAAEAAAABAAAAAXDzHW4AAABGRJqndgAAAAAAAAAAAAAAAA==" | ||
} | ||
} | ||
``` | ||
|
||
#### Failed | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"result": { | ||
"status": "FAILED", | ||
"latestLedger": "45075181", | ||
"latestLedgerCloseTime": "1677115742", | ||
"oldestLedger": "45070000", | ||
"latestLedgerCloseTime": "1677000000", | ||
"ledger": "45070700", | ||
"createdAt": "1677009000", | ||
"applicationOrder": 1, | ||
"feeBump": false, | ||
"envelope_xdr": "AAAAAgAAAAC+B6dP3Y3Dk7cO+EXButf4j/a6NgZ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oMrKb0kPrJMAAAAABUmy4ChvHmEAlFriAAAAAAAAAAAAAAAAAAAAAwKxa3UAAAAAAAAAAL4Hp0/djcOTtw74RcG61/iP9ro2BnyOFR0Z3xjgMsrVAAAAAAx/eFQB1QqkAGOQiwAAAAgAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAABM1434AAAAAAFScZoAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAArFrdQAAAABkAG8eAAAAAAAAAAECsWt1AAAAAAAAAAC+B6dP3Y3Dk7cO+EXButf4j/a6NgZ8jhUdGd8Y4DLK1QAAAAAMf3hUAdUKpABjkIsAAAAIAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAATNeN+AAAAAABUmy4AAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAKxa3UAAAAAZABvHgAAAAAAAAADArFrcwAAAAEAAAAAvgenT92Nw5O3DvhFwbrX+I/2ujYGfI4VHRnfGOAyytUAAAABRVRYAAAAAACIVkm2vMC7wfGBUXcyyT5KMkEhZr0TEHmgyspvSQ+skwAAAE+W7pTjf/////////8AAAABAAAAAQAAAAFw+HPyAAAARkSap3YAAAAAAAAAAAAAAAECsWt1AAAAAQAAAAC+B6dP3Y3Dk7cO+EXButf4j/a6NgZ8jhUdGd8Y4DLK1QAAAAFFVFgAAAAAAIhWSba8wLvB8YFRdzLJPkoyQSFmvRMQeaDKym9JD6yTAAAAT5bulON//////////wAAAAEAAAABAAAAAXDzHW4AAABGRJqndgAAAAAAAAAAAAAAAA==" | ||
} | ||
} | ||
``` |
This file was deleted.
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