Skip to content

Commit 3ee4c6a

Browse files
committed
Fix ledger_entry formatting issues
1 parent b3d6917 commit 3ee4c6a

File tree

1 file changed

+47
-150
lines changed
  • docs/references/http-websocket-apis/public-api-methods/ledger-methods

1 file changed

+47
-150
lines changed

docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md

Lines changed: 47 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -808,135 +808,19 @@ rippled json ledger_entry '{ "nft_page": "255DD86DDF59D778081A06D02701E9B2C9F4F0
808808

809809
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-nft-page)
810810

811-
## Response Format
812-
813-
The response follows the [standard format][], with a successful result containing the following fields:
814-
815-
| Field | Type | Description |
816-
|:---------------|:-----------------|:-----------------------------------------|
817-
| `index` | String | The unique ID of this [ledger entry](../../../protocol/ledger-data/ledger-entry-types/index.md). |
818-
| `ledger_index` | Unsigned Integer | The [ledger index][] of the ledger that was used when retrieving this data. |
819-
| `node` | Object | _(Omitted if `"binary": true` specified.)_ Object containing the data of this ledger entry, according to the [ledger format][]. |
820-
| `node_binary` | String | _(Omitted unless `"binary":true` specified)_ The [binary representation](../../../protocol/binary-format.md) of the ledger object, as hexadecimal. |
821-
| `deleted_ledger_index` | String | _(Clio server only, returned if `include_deleted` parameter is set.)_ The [ledger index][] where the ledger entry object was deleted. |
822-
823-
An example of a successful response:
824-
825-
{% tabs %}
826-
827-
{% tab label="WebSocket" %}
828-
```json
829-
{
830-
"id": "example_get_accountroot",
831-
"result": {
832-
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
833-
"ledger_hash": "31850E8E48E76D1064651DF39DF4E9542E8C90A9A9B629F4DE339EB3FA74F726",
834-
"ledger_index": 61966146,
835-
"node": {
836-
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
837-
"AccountTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
838-
"Balance": "424021949",
839-
"Domain": "6D64756F31332E636F6D",
840-
"EmailHash": "98B4375E1D753E5B91627516F6D70977",
841-
"Flags": 9568256,
842-
"LedgerEntryType": "AccountRoot",
843-
"MessageKey": "0000000000000000000000070000000300",
844-
"OwnerCount": 12,
845-
"PreviousTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
846-
"PreviousTxnLgrSeq": 61965653,
847-
"RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ",
848-
"Sequence": 385,
849-
"TransferRate": 4294967295,
850-
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
851-
},
852-
"validated": true
853-
},
854-
"status": "success",
855-
"type": "response"
856-
}
857-
```
858-
{% /tab %}
859-
860-
{% tab label="JSON-RPC" %}
861-
```json
862-
200 OK
863-
864-
{
865-
"result": {
866-
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
867-
"ledger_hash": "395946243EA36C5092AE58AF729D2875F659812409810A63096AC006C73E656E",
868-
"ledger_index": 61966165,
869-
"node": {
870-
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
871-
"AccountTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
872-
"Balance": "424021949",
873-
"Domain": "6D64756F31332E636F6D",
874-
"EmailHash": "98B4375E1D753E5B91627516F6D70977",
875-
"Flags": 9568256,
876-
"LedgerEntryType": "AccountRoot",
877-
"MessageKey": "0000000000000000000000070000000300",
878-
"OwnerCount": 12,
879-
"PreviousTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
880-
"PreviousTxnLgrSeq": 61965653,
881-
"RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ",
882-
"Sequence": 385,
883-
"TransferRate": 4294967295,
884-
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
885-
},
886-
"status": "success",
887-
"validated": true
888-
}
889-
}
890-
```
891-
{% /tab %}
892-
893-
{% tab label="Commandline" %}
894-
```json
895-
{
896-
"result": {
897-
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
898-
"ledger_hash": "395946243EA36C5092AE58AF729D2875F659812409810A63096AC006C73E656E",
899-
"ledger_index": 61966165,
900-
"node": {
901-
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
902-
"AccountTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
903-
"Balance": "424021949",
904-
"Domain": "6D64756F31332E636F6D",
905-
"EmailHash": "98B4375E1D753E5B91627516F6D70977",
906-
"Flags": 9568256,
907-
"LedgerEntryType": "AccountRoot",
908-
"MessageKey": "0000000000000000000000070000000300",
909-
"OwnerCount": 12,
910-
"PreviousTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
911-
"PreviousTxnLgrSeq": 61965653,
912-
"RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ",
913-
"Sequence": 385,
914-
"TransferRate": 4294967295,
915-
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
916-
},
917-
"status": "success",
918-
"validated": true
919-
}
920-
}
921-
```
922-
{% /tab %}
923-
924-
{% /tabs %}
925-
926811
### Get MPT Issuance Object
927812

928813
_(Requires the [MPToken amendment][] {% not-enabled /%})_
929814

930815
Return an `MPTokenIssuance` object.
931816

932-
| Field | Type | Description |
933-
|:------------------------|:---------------------------|:----------------------|
934-
| `mpt_issuance` | String | The 192-bit `MPTokenIssuanceID` that's associated with the MPTokenIssuance. |
935-
936-
<!-- MULTICODE_BLOCK_START -->
817+
| Field | Type | Description |
818+
|:---------------|:-------|:----------------------|
819+
| `mpt_issuance` | String | The 192-bit `MPTokenIssuanceID` that's associated with the MPTokenIssuance, as hexadecimal. |
937820

938-
*WebSocket*
821+
{% tabs %}
939822

823+
{% tab label="WebSocket" %}
940824
```json
941825
{
942826
"id": "example_get_mpt_issuance",
@@ -945,9 +829,9 @@ Return an `MPTokenIssuance` object.
945829
"ledger_index": "validated"
946830
}
947831
```
832+
{% /tab %}
948833

949-
*JSON-RPC*
950-
834+
{% tab label="JSON-RPC" %}
951835
```json
952836
{
953837
"method": "ledger_entry",
@@ -957,41 +841,47 @@ Return an `MPTokenIssuance` object.
957841
}]
958842
}
959843
```
960-
*Commandline*
844+
{% /tab %}
961845

846+
{% tab label="Commandline" %}
962847
```sh
963848
rippled json ledger_entry '{ "mpt_issuance": "000004C463C52827307480341125DA0577DEFC38405B0E3E", "ledger_index": "validated" }'
964849
```
850+
{% /tab %}
851+
{% /tabs %}
965852

853+
<!-- TODO: add try-it for MPT issuance
966854
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-mpt_issuance)
855+
-->
967856

968857
### Get MPToken Object
969858

970859
_(Requires the [MPToken amendment][] {% not-enabled /%})_
971860

972861
Return an `MPToken` object.
973862

974-
| Field | Type | Description |
975-
|:------------------------|:---------------------------|:----------------------|
976-
| `mptoken` | ️Object or String | If a string, interpret as ledger entry ID of the MPToken to retrieve. If an object, requires the sub-fields account and mpt_issuance_id to unique identify the MPToken. |
977-
| mptoken.mpt_issuance_id | ️String | (Required if the `MPToken` is specified as an object) The 192-bit MPTokenIssuanceID that's associated with the MPTokenIssuance. |
978-
| mptoken.account ️ | String | (Required if the `MPToken` is specified as an object) The account that owns the MPToken. |
979-
980-
<!-- MULTICODE_BLOCK_START -->
863+
| Field | Type | Description |
864+
|:--------------------------|:-----------------|:------------|
865+
| `mptoken` | ️Object or String | If a string, interpret as ledger entry ID of the MPToken to retrieve. If an object, requires the sub-fields `account` and `mpt_issuance_id` to unique identify the MPToken. |
866+
| `mptoken.mpt_issuance_id` | String | (Required if the `MPToken` is specified as an object) The 192-bit MPTokenIssuanceID that's associated with the MPTokenIssuance. |
867+
| `mptoken.account`| String | (Required if the `MPToken` is specified as an object) The account that owns the MPToken. |
981868

982-
*WebSocket*
869+
{% tabs %}
983870

871+
{% tab label="WebSocket" %}
984872
```json
985873
{
986874
"id": "example_get_mpt_issuance",
987875
"command": "ledger_entry",
988-
"mpt_issuance_id": "000002DFA4D893CFBC4DC6AE877EB585F90A3B47528B958D",
989-
"account":"r33kves44ksufkHSGg3M6GPPAsoVHEN8C1"
876+
"mptoken": {
877+
"mpt_issuance_id": "000002DFA4D893CFBC4DC6AE877EB585F90A3B47528B958D",
878+
"account":"r33kves44ksufkHSGg3M6GPPAsoVHEN8C1"
879+
}
990880
}
991881
```
882+
{% /tab %}
992883

993-
*JSON-RPC*
994-
884+
{% tab label="JSON-RPC" %}
995885
```json
996886
{
997887
"method": "ledger_entry",
@@ -1005,13 +895,19 @@ Return an `MPToken` object.
1005895
]
1006896
}
1007897
```
1008-
*Commandline*
898+
{% /tab %}
1009899

900+
{% tab label="Commandline" %}
1010901
```sh
1011-
rippled json ledger_entry '{ "mpt_issuance_id": "000002DFA4D893CFBC4DC6AE877EB585F90A3B47528B958D", "account":"r33kves44ksufkHSGg3M6GPPAsoVHEN8C1"}'
902+
rippled json ledger_entry '{ "mptoken": {"mpt_issuance_id": "000002DFA4D893CFBC4DC6AE877EB585F90A3B47528B958D", "account":"r33kves44ksufkHSGg3M6GPPAsoVHEN8C1"} }'
1012903
```
1013-
<!-- MULTICODE_BLOCK_END -->
1014-
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-mptissuance)
904+
{% /tab %}
905+
{% /tabs %}
906+
907+
<!-- TODO: make a try-it link for MPT object
908+
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-mptoken)
909+
-->
910+
1015911

1016912
## Response Format
1017913

@@ -1020,16 +916,16 @@ The response follows the [standard format][], with a successful result containin
1020916
| Field | Type | Description |
1021917
|:---------------|:-----------------|:-----------------------------------------|
1022918
| `index` | String | The unique ID of this [ledger entry](../../../protocol/ledger-data/ledger-entry-types/index.md). |
1023-
| `ledger_index` | Unsigned Integer | The [ledger index](../../../protocol/data-types/basic-data-types.md#ledger-index) of the ledger that was used when retrieving this data. |
1024-
| `node` | Object | _(Omitted if `"binary": true` specified.)_ Object containing the data of this ledger entry, according to the [ledger format](../../../protocol/ledger-data/ledger-entry-types/index.md). |
919+
| `ledger_index` | Unsigned Integer | The [ledger index][] of the ledger that was used when retrieving this data. |
920+
| `node` | Object | _(Omitted if `"binary": true` specified.)_ Object containing the data of this ledger entry, according to the [ledger format][]. |
1025921
| `node_binary` | String | _(Omitted unless `"binary":true` specified)_ The [binary representation](../../../protocol/binary-format.md) of the ledger object, as hexadecimal. |
922+
| `deleted_ledger_index` | String | _(Clio server only, returned if `include_deleted` parameter is set.)_ The [ledger index][] where the ledger entry object was deleted. |
1026923

1027924
An example of a successful response:
1028925

1029-
<!-- MULTICODE_BLOCK_START -->
1030-
1031-
*WebSocket*
926+
{% tabs %}
1032927

928+
{% tab label="WebSocket" %}
1033929
```json
1034930
{
1035931
"id": "example_get_accountroot",
@@ -1060,9 +956,9 @@ An example of a successful response:
1060956
"type": "response"
1061957
}
1062958
```
959+
{% /tab %}
1063960

1064-
*JSON-RPC*
1065-
961+
{% tab label="JSON-RPC" %}
1066962
```json
1067963
200 OK
1068964

@@ -1093,9 +989,9 @@ An example of a successful response:
1093989
}
1094990
}
1095991
```
992+
{% /tab %}
1096993

1097-
*Commandline*
1098-
994+
{% tab label="Commandline" %}
1099995
```json
1100996
{
1101997
"result": {
@@ -1124,8 +1020,9 @@ An example of a successful response:
11241020
}
11251021
}
11261022
```
1023+
{% /tab %}
11271024

1128-
<!-- MULTICODE_BLOCK_END -->
1025+
{% /tabs %}
11291026

11301027

11311028
## Possible Errors

0 commit comments

Comments
 (0)