mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 20:25:51 +00:00
update content from v1 to v2
This commit is contained in:
@@ -105,12 +105,13 @@ An example of the request format:
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"api_version": 2,
|
||||
"command": "submit",
|
||||
"tx_json" : {
|
||||
"TransactionType" : "Payment",
|
||||
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"Amount" : {
|
||||
"DeliverMax" : {
|
||||
"currency" : "USD",
|
||||
"value" : "1",
|
||||
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
@@ -130,10 +131,11 @@ An example of the request format:
|
||||
"params": [
|
||||
{
|
||||
"offline": false,
|
||||
"api_version": 2,
|
||||
"secret": "s████████████████████████████",
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": {
|
||||
"DeliverMax": {
|
||||
"currency": "USD",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "1"
|
||||
@@ -151,7 +153,7 @@ An example of the request format:
|
||||
{% tab label="Commandline" %}
|
||||
```sh
|
||||
#Syntax: submit secret json [offline]
|
||||
rippled submit s████████████████████████████ '{"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Amount": { "currency": "USD", "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "value": "1" }, "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", "TransactionType": "Payment", "Fee": "10000"}'
|
||||
rippled submit s████████████████████████████ '{"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "DeliverMax": { "currency": "USD", "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "value": "1" }, "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", "TransactionType": "Payment", "Fee": "10000"}'
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -169,6 +171,7 @@ An example of a successful response:
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"api_version": 2,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
@@ -186,7 +189,7 @@ An example of a successful response:
|
||||
"tx_blob": "1200002280000000240000016861D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7446304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F858081144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": {
|
||||
"DeliverMax": {
|
||||
"currency": "USD",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "1"
|
||||
@@ -225,7 +228,7 @@ An example of a successful response:
|
||||
"tx_blob": "1200002280000000240000016961D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB74473045022100A7CCD11455E47547FF617D5BFC15D120D9053DFD0536B044F10CA3631CD609E502203B61DEE4AC027C5743A1B56AF568D1E2B8E79BB9E9E14744AC87F38375C3C2F181144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": {
|
||||
"DeliverMax": {
|
||||
"currency": "USD",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "1"
|
||||
@@ -267,7 +270,7 @@ Connecting to 127.0.0.1:5005
|
||||
"tx_blob": "1200002280000000240000016961D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB74473045022100A7CCD11455E47547FF617D5BFC15D120D9053DFD0536B044F10CA3631CD609E502203B61DEE4AC027C5743A1B56AF568D1E2B8E79BB9E9E14744AC87F38375C3C2F181144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": {
|
||||
"DeliverMax": {
|
||||
"currency": "USD",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "1"
|
||||
|
||||
@@ -76,7 +76,7 @@ An example of a successful response:
|
||||
"result": {
|
||||
"ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A",
|
||||
"ledger_index": 56865245,
|
||||
"metadata": {
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
@@ -200,7 +200,7 @@ An example of a successful response:
|
||||
"result": {
|
||||
"ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A",
|
||||
"ledger_index": 56865245,
|
||||
"metadata": {
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
@@ -323,7 +323,7 @@ An example of a successful response:
|
||||
"result" : {
|
||||
"ledger_hash" : "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A",
|
||||
"ledger_index" : 56865245,
|
||||
"metadata" : {
|
||||
"meta" : {
|
||||
"AffectedNodes" : [
|
||||
{
|
||||
"ModifiedNode" : {
|
||||
@@ -444,6 +444,23 @@ An example of a successful response:
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% tab label="API v2" %}
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------|:--------------------------|:--------------------------------|
|
||||
| `close_time_iso` | String | The ledger close time represented in ISO 8601 time format. |
|
||||
| `hash` | String | The unique hash identifier of the transaction. |
|
||||
| `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger version the transaction was found in; this is the same as the one from the request. |
|
||||
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version the transaction was found in; this is the same as the one from the request. |
|
||||
| `meta` | Object | The [transaction metadata](../../../protocol/transactions/metadata.md), which shows the exact results of the transaction in detail. |
|
||||
| `tx_json` | Object | JSON representation of the [Transaction object](../../../protocol/transactions/index.md) |
|
||||
|
||||
{% /tab %}
|
||||
|
||||
{% tab label="API v1" %}
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:--------------------------|:--------------------------------|
|
||||
| `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger version the transaction was found in; this is the same as the one from the request. |
|
||||
@@ -451,6 +468,10 @@ The response follows the [standard format][], with a successful result containin
|
||||
| `metadata` | Object | The [transaction metadata](../../../protocol/transactions/metadata.md), which shows the exact results of the transaction in detail. |
|
||||
| `tx_json` | Object | JSON representation of the [Transaction object](../../../protocol/transactions/index.md) |
|
||||
|
||||
{% /tab %}
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
There are a couple possible reasons the server may fail to find the transaction:
|
||||
|
||||
* The transaction does not exist
|
||||
|
||||
@@ -25,7 +25,8 @@ An example of the request format:
|
||||
"id": 1,
|
||||
"command": "tx",
|
||||
"transaction": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9",
|
||||
"binary": false
|
||||
"binary": false,
|
||||
"api_version": 2
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -36,7 +37,8 @@ An example of the request format:
|
||||
"id": "CTID example",
|
||||
"command": "tx",
|
||||
"ctid": "C005523E00000000",
|
||||
"binary": false
|
||||
"binary": false,
|
||||
"api_version": 2
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -48,7 +50,8 @@ An example of the request format:
|
||||
"params": [
|
||||
{
|
||||
"transaction": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9",
|
||||
"binary": false
|
||||
"binary": false,
|
||||
"api_version": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -62,7 +65,8 @@ An example of the request format:
|
||||
"params": [
|
||||
{
|
||||
"ctid": "C005523E00000000",
|
||||
"binary": false
|
||||
"binary": false,
|
||||
"api_version": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -240,6 +244,29 @@ An example of a successful response:
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% tab label="API v2" %}
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the fields of the [Transaction object](../../../protocol/transactions/index.md) as well as the following additional fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:---------------------------------|:-------------------------|
|
||||
| `ctid` | String | The transaction's [compact transaction identifier](../../api-conventions/ctid.md). {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.12.0" %}New in: rippled 1.12.0{% /badge %} _(Not supported in Clio v2.0 and earlier.)_ |
|
||||
| `date` | Number | The [close time](../../../../concepts/ledgers/ledger-close-times.md) of the ledger in which the transaction was applied, in [seconds since the Ripple Epoch][]. |
|
||||
| `hash` | String | The unique [identifying hash][] of the transaction |
|
||||
| `inLedger` | Number | _(Deprecated)_ Alias for `ledger_index`. |
|
||||
| `ledger_index` | Number | The [ledger index][] of the ledger that includes this transaction. |
|
||||
| `meta` | Object (JSON) | (JSON mode) [Transaction metadata](../../../protocol/transactions/metadata.md), which describes the results of the transaction. |
|
||||
| `meta_blob` | String (binary) | (Binary mode) [Transaction metadata](../../../protocol/transactions/metadata.md), which describes the results of the transaction, represented as a hex string. |
|
||||
| `tx_blob` | String (binary) | (Binary mode) The transaction data represented as a hex string. |
|
||||
| `tx_json` | Object (JSON) | The transaction data represented in JSON. |
|
||||
| `validated` | Boolean | If `true`, this data comes from a validated ledger version; if omitted or set to `false`, this data is not final. |
|
||||
|
||||
{% /tab %}
|
||||
|
||||
{% tab label="API v1" %}
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the fields of the [Transaction object](../../../protocol/transactions/index.md) as well as the following additional fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
@@ -250,9 +277,14 @@ The response follows the [standard format][], with a successful result containin
|
||||
| `inLedger` | Number | _(Deprecated)_ Alias for `ledger_index`. |
|
||||
| `ledger_index` | Number | The [ledger index][] of the ledger that includes this transaction. |
|
||||
| `meta` | Object (JSON) or String (binary) | [Transaction metadata](../../../protocol/transactions/metadata.md), which describes the results of the transaction. |
|
||||
| `tx` | String (binary) | (Binary mode) The transaction data represented as a hex string. |
|
||||
| `validated` | Boolean | If `true`, this data comes from a validated ledger version; if omitted or set to `false`, this data is not final. |
|
||||
| (Various) | (Various) | Other fields from the [Transaction object](../../../protocol/transactions/index.md) |
|
||||
|
||||
{% /tab %}
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
|
||||
### Not Found Response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user