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.
Merge pull request stellar#319 from paulbellamy/dev
Soroban-RPC updates for the release
- Loading branch information
1 parent
1e941b2
commit b6bb6d9
Showing
10 changed files
with
198 additions
and
44 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 2 | ||
sidebar_position: 3 | ||
--- | ||
|
||
General node health check. | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 3 | ||
sidebar_position: 1 | ||
--- | ||
|
||
:::note | ||
|
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
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,109 @@ | ||
--- | ||
sidebar_position: 6 | ||
--- | ||
|
||
:::note | ||
|
||
The `getTransactionStatus` method is still a work-in-progress. | ||
|
||
::: | ||
|
||
Clients will poll this to tell when the transaction has been completed. | ||
|
||
- TODO: Figure out result/error and how that fits into the jsonrpc response object | ||
- TODO: Figure out return values for non-contract-invocation transactions | ||
|
||
## Parameters | ||
|
||
- `<hash>` - transaction hash to query, as a hex-encoded string | ||
|
||
## Returns | ||
|
||
- `<object>` | ||
- `id`: `<hash>` - hash of the transaction as a hex-encoded string | ||
- `status`: `<status>` - the current status of the transaction by hash, one of: | ||
- pending | ||
- success | ||
- error | ||
- `results`: `<object[]>` - (optional) Will be present on completed successful transactions. | ||
- xdr: `<xdr.ScVal`> - xdr-encoded return value of the contract call | ||
- TODO: Anything else we should include? Gas spent? | ||
- `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. | ||
- `resultMetaXdr`: `<xdr.TransactionResultMeta>` - (optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction. | ||
- `error`: `<object>` - (optional) Will be present on failed transactions. | ||
- `code`: `<string>` - Short unique string representing the type of error | ||
- `message`: `<string>` - Human friendly summary of the error | ||
- `data`: `<object>` - (optional) More data related to the error if available | ||
|
||
## Examples | ||
|
||
### Request | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"method": "getTransactionStatus", | ||
"params": { | ||
"hash": "97eb77da26e21d6a032fc0c311831d94a702ba336037da7c8a5ec51b3e39c485" | ||
} | ||
} | ||
``` | ||
|
||
### Response | ||
|
||
#### Pending | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"result": { | ||
"id": "d70916f8b8aa55c13d5974a38e32a3efe440ef6870c0f0a07075d1c128d23698", | ||
"status": "pending" | ||
} | ||
} | ||
``` | ||
|
||
#### Success | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"result": { | ||
"id": "d70916f8b8aa55c13d5974a38e32a3efe440ef6870c0f0a07075d1c128d23698", | ||
"status": "success", | ||
"results": [ | ||
{ | ||
"xdr": "AAAAAQAAAAY=" | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
#### Error | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 8675309, | ||
"result": { | ||
"id": "48dd243d4683745b7efa9f4fe6182f944b03cfd169135657e39c974e9b1fc50d", | ||
"status": "error", | ||
"error": { | ||
"code": "tx_submission_failed", | ||
"message": "Transaction submission failed", | ||
"data": { | ||
"envelope_xdr": "AAAAAgAAAAAdq+kGxmBG/ikQNdYHQ2fBAG+8Av/xp1ZfPZ9Xt42ragAAAGQAAoAp/////gAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVoZWxsbwAAAAAAAAEAAAAHc29yb2JhbgAAAAAAAAAAAbeNq2oAAABAc6zcO/sTKyF26B1iJygLVrhhcVfK05rNW9gyeNwqSVeMFkHXpZ6D/6mqSB0KtvacxK4/VoiwWPrBQGPelnktBQ==", | ||
"result_codes": { | ||
"transaction": "tx_bad_seq" | ||
}, | ||
"result_xdr": "AAAAAAAAAAD////7AAAAAA==" | ||
} | ||
} | ||
} | ||
} | ||
``` |
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
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