ledger_entry - Mainnet examples for all types

- Working examples for all ledger_entry types in WebSocket tool
- Match examples on ledger_entry page to examples from WS tool
- Link various ledger_entry modes back & forth
This commit is contained in:
mDuo13
2021-03-03 17:22:35 -08:00
parent c20715bfff
commit 619c82b049
2 changed files with 208 additions and 190 deletions

View File

@@ -1,4 +1,5 @@
DEFAULT_ADDRESS_1 = "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" DEFAULT_ADDRESS_1 = "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
DEFAULT_ADDRESS_2 = "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX"
Request("Account Methods") Request("Account Methods")
@@ -8,8 +9,8 @@ Request('account_channels', {
body: { body: {
"id": 1, "id": 1,
"command": "account_channels", "command": "account_channels",
"account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH", //TODO: different address "account": DEFAULT_ADDRESS_1,
"destination_account": DEFAULT_ADDRESS_1, "destination_account": DEFAULT_ADDRESS_2,
"ledger_index": "validated" "ledger_index": "validated"
} }
}) })
@@ -166,7 +167,7 @@ Request('ledger_data', {
Request('ledger_entry - by object ID', { Request('ledger_entry - by object ID', {
description: "Returns an object by its unique ID.", description: "Returns an object by its unique ID.",
link: "ledger_entry.html#TODO", link: "ledger_entry.html#get-ledger-object-by-id",
body: { body: {
"command": "ledger_entry", "command": "ledger_entry",
"index": "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4", "index": "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4",
@@ -176,9 +177,9 @@ Request('ledger_entry - by object ID', {
Request('ledger_entry - AccountRoot', { Request('ledger_entry - AccountRoot', {
description: "Returns a single account in its raw ledger format.", description: "Returns a single account in its raw ledger format.",
link: "ledger_entry.html#TODO", link: "ledger_entry.html#get-accountroot-object",
body: { body: {
"id": 3, "id": "example_get_accountroot",
"command": "ledger_entry", "command": "ledger_entry",
"account_root": DEFAULT_ADDRESS_1, "account_root": DEFAULT_ADDRESS_1,
"ledger_index": "validated" "ledger_index": "validated"
@@ -189,11 +190,11 @@ Request('ledger_entry - DirectoryNode', {
description: "Returns a directory object in its raw ledger format.", description: "Returns a directory object in its raw ledger format.",
link: "ledger_entry.html#get-directorynode-object", link: "ledger_entry.html#get-directorynode-object",
body: { body: {
"id": 3, "id": "example_get_directorynode",
"command": "ledger_entry", "command": "ledger_entry",
"directory": { "directory": {
"owner": DEFAULT_ADDRESS_1, "owner": DEFAULT_ADDRESS_1,
"sub_index": 1 "sub_index": 0
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
@@ -203,7 +204,7 @@ Request('ledger_entry - Offer', {
description: "Returns an Offer object in its raw ledger format.", description: "Returns an Offer object in its raw ledger format.",
link: "ledger_entry.html#get-offer-object", link: "ledger_entry.html#get-offer-object",
body: { body: {
"id": 3, "id": "example_get_offer",
"command": "ledger_entry", "command": "ledger_entry",
"offer": { "offer": {
"account": DEFAULT_ADDRESS_1, "account": DEFAULT_ADDRESS_1,
@@ -217,7 +218,7 @@ Request('ledger_entry - RippleState', {
description: "Returns a RippleState object in its raw ledger format.", description: "Returns a RippleState object in its raw ledger format.",
link: "ledger_entry.html#get-ripplestate-object", link: "ledger_entry.html#get-ripplestate-object",
body: { body: {
"id": 3, "id": "example_get_ripplestate",
"command": "ledger_entry", "command": "ledger_entry",
"ripple_state": { "ripple_state": {
"accounts": [ "accounts": [
@@ -234,9 +235,9 @@ Request('ledger_entry - Check', {
description: "Returns a Check object in its raw ledger format.", description: "Returns a Check object in its raw ledger format.",
link: "ledger_entry.html#get-check-object", link: "ledger_entry.html#get-check-object",
body: { body: {
"id": 3, "id": "example_get_check",
"command": "ledger_entry", "command": "ledger_entry",
"check": "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334", "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D7944C28B95127C2659C47CBEB",
"ledger_index": "validated" "ledger_index": "validated"
} }
}) })
@@ -245,9 +246,12 @@ Request('ledger_entry - Escrow', {
description: "Returns an Escrow object in its raw ledger format.", description: "Returns an Escrow object in its raw ledger format.",
link: "ledger_entry.html#get-escrow-object", link: "ledger_entry.html#get-escrow-object",
body: { body: {
"id": 3, "id": "example_get_escrow",
"command": "ledger_entry", "command": "ledger_entry",
"escrow": ""//todo: make an escrow "escrow": { // This is a long-lasting Escrow found in public data
"owner": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9NTjKK",
"seq": 126
},
"ledger_index": "validated" "ledger_index": "validated"
} }
}) })
@@ -256,9 +260,9 @@ Request('ledger_entry - PayChannel', {
description: "Returns a PayChannel object in its raw ledger format.", description: "Returns a PayChannel object in its raw ledger format.",
link: "ledger_entry.html#get-paychannel-object", link: "ledger_entry.html#get-paychannel-object",
body: { body: {
"id": 3, "id": "example_get_paychannel",
"command": "ledger_entry", "command": "ledger_entry",
"channel": ""//todo: make a paychannel "payment_channel": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"ledger_index": "validated" "ledger_index": "validated"
} }
}) })
@@ -267,21 +271,27 @@ Request('ledger_entry - DepositPreauth', {
description: "Returns a DepositPreauth object in its raw ledger format.", description: "Returns a DepositPreauth object in its raw ledger format.",
link: "ledger_entry.html#get-depositpreauth-object", link: "ledger_entry.html#get-depositpreauth-object",
body: { body: {
"id": 3, "id": "example_get_deposit_preauth",
"command": "ledger_entry", "command": "ledger_entry",
"deposit_preauth": ""//todo: find a real example "deposit_preauth": {
"owner": DEFAULT_ADDRESS_1,
"authorized": DEFAULT_ADDRESS_2
},
"ledger_index": "validated" "ledger_index": "validated"
} }
}) })
// Waiting for TicketBatch amendment // Waiting for TicketBatch amendment on Mainnet
// Request('ledger_entry - Ticket', { // Request('ledger_entry - Ticket', {
// description: "Returns a Ticket object in its raw ledger format.", // description: "Returns a Ticket object in its raw ledger format.",
// link: "ledger_entry.html#get-ticket-object", // link: "ledger_entry.html#get-ticket-object",
// body: { // body: {
// "id": 3, // "id": "example_get_ticket",
// "command": "ledger_entry", // "command": "ledger_entry",
// "ticket": ""//TODO // "ticket": {
// "owner": DEFAULT_ADDRESS_1,
// "ticket_sequence": 0 // TODO: make a real ticket, fill in the seq
// },
// "ledger_index": "validated" // "ledger_index": "validated"
// } // }
// }) // })
@@ -296,7 +306,7 @@ Request('submit', {
description: "Submits a transaction to the network to be confirmed and included in future ledgers.", description: "Submits a transaction to the network to be confirmed and included in future ledgers.",
link: "submit.html", link: "submit.html",
body: { body: {
"id": 3, "id": "example_submit",
"command": "submit", "command": "submit",
"tx_blob": "1200002280000000240000001E61D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA968400000000000000B732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7447304502210095D23D8AF107DF50651F266259CC7139D0CD0C64ABBA3A958156352A0D95A21E02207FCF9B77D7510380E49FF250C21B57169E14E9B4ACFD314CEDC79DDD0A38B8A681144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754" "tx_blob": "1200002280000000240000001E61D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA968400000000000000B732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7447304502210095D23D8AF107DF50651F266259CC7139D0CD0C64ABBA3A958156352A0D95A21E02207FCF9B77D7510380E49FF250C21B57169E14E9B4ACFD314CEDC79DDD0A38B8A681144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754"
} }
@@ -386,8 +396,8 @@ Request('deposit_authorized', {
body: { body: {
"id": 1, "id": 1,
"command": "deposit_authorized", "command": "deposit_authorized",
"source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", "source_account": DEFAULT_ADDRESS_1,
"destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "destination_account": DEFAULT_ADDRESS_2,
"ledger_index": "validated" "ledger_index": "validated"
} }
}) })

View File

@@ -49,9 +49,8 @@ Retrieve any type of ledger object by its unique ID.
```json ```json
{ {
"id": 3,
"command": "ledger_entry", "command": "ledger_entry",
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05", "index": "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4",
"ledger_index": "validated" "ledger_index": "validated"
} }
``` ```
@@ -103,9 +102,9 @@ Retrieve an [AccountRoot object](accountroot.html) by its address. This is rough
```json ```json
{ {
"id": 3, "id": "example_get_accountroot",
"command": "ledger_entry", "command": "ledger_entry",
"account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "account_root": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ledger_index": "validated" "ledger_index": "validated"
} }
``` ```
@@ -117,9 +116,8 @@ Retrieve an [AccountRoot object](accountroot.html) by its address. This is rough
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [
{ {
"account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "account_root": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ledger_index": "validated", "ledger_index": "validated"
"type": "account_root"
} }
] ]
} }
@@ -133,9 +131,8 @@ rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-accountroot)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button.
@@ -159,7 +156,8 @@ Retrieve a [DirectoryNode](directorynode.html), which contains a list of other l
"id": 3, "id": 3,
"command": "ledger_entry", "command": "ledger_entry",
"directory": { "directory": {
"owner": "rQ3fNyLjbvcDaPNS4EAJY8aT9zR3uGk17c" "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"sub_index": 0
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
@@ -173,7 +171,8 @@ Retrieve a [DirectoryNode](directorynode.html), which contains a list of other l
"params": [ "params": [
{ {
"directory": { "directory": {
"owner": "rQ3fNyLjbvcDaPNS4EAJY8aT9zR3uGk17c" "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"sub_index": 0
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
@@ -184,14 +183,13 @@ Retrieve a [DirectoryNode](directorynode.html), which contains a list of other l
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "directory": { "owner": "rQ3fNyLjbvcDaPNS4EAJY8aT9zR3uGk17c"}, "ledger_index": "validated" }' rippled json ledger_entry '{ "directory": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "sub_index": 0 }, "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-directorynode)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button.
### Get Offer Object ### Get Offer Object
@@ -210,11 +208,11 @@ Retrieve an [Offer object](offer.html), which defines an offer to exchange curre
```json ```json
{ {
"id": 3, "id": "example_get_offer",
"command": "ledger_entry", "command": "ledger_entry",
"offer": { "offer": {
"account": "rH2k8SkwoWgwry9J89jgFP9NbSWu13jnsu", "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"seq": 6134107 "seq": 359
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
@@ -224,15 +222,15 @@ Retrieve an [Offer object](offer.html), which defines an offer to exchange curre
```json ```json
{ {
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [
{ {
"offer": { "offer": {
"account": "rH2k8SkwoWgwry9J89jgFP9NbSWu13jnsu", "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"seq": 6134107 "seq": 359
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
] ]
} }
``` ```
@@ -240,14 +238,13 @@ Retrieve an [Offer object](offer.html), which defines an offer to exchange curre
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "offer": { "account": "rH2k8SkwoWgwry9J89jgFP9NbSWu13jnsu", "seq": 6134107}, "ledger_index": "validated" }' rippled json ledger_entry '{ "offer": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "seq": 359}, "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-offer)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button.
### Get RippleState Object ### Get RippleState Object
@@ -266,10 +263,13 @@ Retrieve a [RippleState object](ripplestate.html), which tracks a (non-XRP) curr
```json ```json
{ {
"id": 3, "id": "example_get_ripplestate",
"command": "ledger_entry", "command": "ledger_entry",
"ripple_state": { "ripple_state": {
"accounts": ["rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW"], "accounts": [
"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW"
],
"currency": "USD" "currency": "USD"
}, },
"ledger_index": "validated" "ledger_index": "validated"
@@ -280,16 +280,17 @@ Retrieve a [RippleState object](ripplestate.html), which tracks a (non-XRP) curr
```json ```json
{ {
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [{
{ "ripple_state": {
"ripple_state": { "accounts": [
"accounts": ["rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW"], "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"currency": "USD" "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW"
}, ],
"ledger_index": "validated" "currency": "USD"
} },
] "ledger_index": "validated"
}]
} }
``` ```
@@ -301,9 +302,8 @@ rippled json ledger_entry '{ "ripple_state": { "accounts": ["rf1BiGeXwwQoi8Z2ueF
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-ripplestate)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button.
### Get Check Object ### Get Check Object
@@ -320,9 +320,9 @@ Retrieve a [Check object](check.html), which is a potential payment that can be
```json ```json
{ {
"id": 3, "id": "example_get_check",
"command": "ledger_entry", "command": "ledger_entry",
"check": "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334", "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D7944C28B95127C2659C47CBEB",
"ledger_index": "validated" "ledger_index": "validated"
} }
``` ```
@@ -331,27 +331,24 @@ Retrieve a [Check object](check.html), which is a potential payment that can be
```json ```json
{ {
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [{
{ "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D7944C28B95127C2659C47CBEB",
"check": "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334", "ledger_index": "validated"
"ledger_index": "validated" }]
}
]
} }
``` ```
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "check": "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334", "ledger_index": "validated" }' rippled json ledger_entry '{ "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D7944C28B95127C2659C47CBEB", "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-check)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button.
### Get Escrow Object ### Get Escrow Object
@@ -370,11 +367,11 @@ Retrieve an [Escrow object](escrow-object.html), which holds XRP until a specifi
```json ```json
{ {
"id": 3, "id": "example_get_escrow",
"command": "ledger_entry", "command": "ledger_entry",
"escrow": { "escrow": {
"account": "rH2k8SkwoWgwry9J89jgFP9NbSWu13jnsu", "owner": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9NTjKK",
"seq": 6134107 "seq": 126
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
@@ -384,30 +381,27 @@ Retrieve an [Escrow object](escrow-object.html), which holds XRP until a specifi
```json ```json
{ {
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [{
{ "escrow": {
"escrow": { "account": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9NTjKK",
"account": "rH2k8SkwoWgwry9J89jgFP9NbSWu13jnsu", "seq": 126
"seq": 6134107 },
}, "ledger_index": "validated"
"ledger_index": "validated" }]
}
]
} }
``` ```
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "escrow": { "account": "rH2k8SkwoWgwry9J89jgFP9NbSWu13jnsu", "seq": 6134107 }, "ledger_index": "validated" }' rippled json ledger_entry '{ "escrow": { "account": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9NTjKK", "seq": 126 }, "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-escrow)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button.
### Get PayChannel Object ### Get PayChannel Object
@@ -424,9 +418,9 @@ Retrieve a [PayChannel object](paychannel.html), which holds XRP for asynchronou
```json ```json
{ {
"id": 3, "id": "example_get_paychannel",
"command": "ledger_entry", "command": "ledger_entry",
"payment_channel": "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3", "payment_channel": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"ledger_index": "validated" "ledger_index": "validated"
} }
``` ```
@@ -435,25 +429,23 @@ Retrieve a [PayChannel object](paychannel.html), which holds XRP for asynchronou
```json ```json
{ {
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [{
{ "payment_channel": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"payment_channel": "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3", "ledger_index": "validated"
"ledger_index": "validated" }]
}
]
} }
``` ```
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "payment_channel": "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3", "ledger_index": "validated" }' rippled json ledger_entry '{ "payment_channel": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7", "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-paychannel)
### Get DepositPreauth Object ### Get DepositPreauth Object
@@ -472,11 +464,11 @@ Retrieve a [DepositPreauth object](depositpreauth-object.html), which tracks pre
```json ```json
{ {
"id": 3, "id": "example_get_deposit_preauth",
"command": "ledger_entry", "command": "ledger_entry",
"deposit_preauth": { "deposit_preauth": {
"owner": "rPRVdmDUwV4q5FTpwPijLQuzJ4WjDbgNrE", "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"authorized": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe" "authorized": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX"
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
@@ -486,30 +478,26 @@ Retrieve a [DepositPreauth object](depositpreauth-object.html), which tracks pre
```json ```json
{ {
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [{
{ "deposit_preauth": {
"deposit_preauth": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"owner": "rPRVdmDUwV4q5FTpwPijLQuzJ4WjDbgNrE", "authorized": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX"
"authorized": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe" },
}, "ledger_index": "validated"
"ledger_index": "validated" }]
}
]
} }
``` ```
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "deposit_preauth": { "owner": "rPRVdmDUwV4q5FTpwPijLQuzJ4WjDbgNrE", "authorized": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe" }, "ledger_index": "validated" }' rippled json ledger_entry '{ "deposit_preauth": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "authorized": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX" }, "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) [Try it! >](websocket-api-tool.html#ledger_entry-depositpreauth)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button. ALSO PLEASE NOTE THAT YOU WILL NEED TO CHANGE CONNECTION SETTINGS TO "TESTNET PUBLIC CLUSTER"
### Get Ticket Object ### Get Ticket Object
@@ -528,10 +516,10 @@ Retrieve a [Ticket object](ticket.html), which represents a [sequence number][]
```json ```json
{ {
"id": 3, "id": "example_get_ticket",
"command": "ledger_entry", "command": "ledger_entry",
"ticket": { "ticket": {
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ticket_sequence": 23 "ticket_sequence": 23
}, },
"ledger_index": "validated" "ledger_index": "validated"
@@ -542,30 +530,28 @@ Retrieve a [Ticket object](ticket.html), which represents a [sequence number][]
```json ```json
{ {
"method": "ledger_entry", "method": "ledger_entry",
"params": [ "params": [{
{ "ticket": {
"ticket": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "ticket_sequence": 23
"ticket_sequence": 23 },
}, "ledger_index": "validated"
"ledger_index": "validated" }]
}
]
} }
``` ```
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "ticket": { "owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "ticket_sequence: 23 }, "ledger_index": "validated" }' rippled json ledger_entry '{ "ticket": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "ticket_sequence: 23 }, "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_entry) <!-- TODO: enable if/when Tickets are available on Mainnet
[Try it! >](websocket-api-tool.html#ledger_entry-ticket)
**Tip:** Copy the WebSocket example request above before clicking on the "Try It!" button. -->
@@ -588,24 +574,32 @@ An example of a successful response:
```json ```json
{ {
"id": 3, "id": "example_get_accountroot",
"result": { "result": {
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05", "index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
"ledger_index": 6889347, "ledger_hash": "31850E8E48E76D1064651DF39DF4E9542E8C90A9A9B629F4DE339EB3FA74F726",
"node": { "ledger_index": 61966146,
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "node": {
"Balance": "27389517749", "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Flags": 0, "AccountTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
"LedgerEntryType": "AccountRoot", "Balance": "424021949",
"OwnerCount": 18, "Domain": "6D64756F31332E636F6D",
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932", "EmailHash": "98B4375E1D753E5B91627516F6D70977",
"PreviousTxnLgrSeq": 6592159, "Flags": 9568256,
"Sequence": 1400, "LedgerEntryType": "AccountRoot",
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05" "MessageKey": "0000000000000000000000070000000300",
} "OwnerCount": 12,
"PreviousTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
"PreviousTxnLgrSeq": 61965653,
"RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ",
"Sequence": 385,
"TransferRate": 4294967295,
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
}, },
"status": "success", "validated": true
"type": "response" },
"status": "success",
"type": "response"
} }
``` ```
@@ -615,47 +609,61 @@ An example of a successful response:
200 OK 200 OK
{ {
"result": { "result": {
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05", "index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
"ledger_index": 8696234, "ledger_hash": "395946243EA36C5092AE58AF729D2875F659812409810A63096AC006C73E656E",
"node": { "ledger_index": 61966165,
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "node": {
"Balance": "13176802787", "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Flags": 0, "AccountTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
"LedgerEntryType": "AccountRoot", "Balance": "424021949",
"OwnerCount": 17, "Domain": "6D64756F31332E636F6D",
"PreviousTxnID": "E5D0235A236F7CD162C1AB87A0325056AE61CFC63D92D1494AB5D826AAD0CDCA", "EmailHash": "98B4375E1D753E5B91627516F6D70977",
"PreviousTxnLgrSeq": 8554742, "Flags": 9568256,
"Sequence": 1406, "LedgerEntryType": "AccountRoot",
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05" "MessageKey": "0000000000000000000000070000000300",
}, "OwnerCount": 12,
"status": "success", "PreviousTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
"validated": true "PreviousTxnLgrSeq": 61965653,
} "RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ",
"Sequence": 385,
"TransferRate": 4294967295,
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
},
"status": "success",
"validated": true
}
} }
``` ```
*Commandline* *Commandline*
```json ```json
{ {
"result" : { "result": {
"index" : "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05", "index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
"ledger_hash" : "F434A8F21E401F84A2CDEDFDF801E6F3FC8B2567C6841818E684BEE019460179", "ledger_hash": "395946243EA36C5092AE58AF729D2875F659812409810A63096AC006C73E656E",
"ledger_index" : 56866309, "ledger_index": 61966165,
"node" : { "node": {
"Account" : "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Balance" : "13315612685", "AccountTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
"Flags" : 0, "Balance": "424021949",
"LedgerEntryType" : "AccountRoot", "Domain": "6D64756F31332E636F6D",
"OwnerCount" : 17, "EmailHash": "98B4375E1D753E5B91627516F6D70977",
"PreviousTxnID" : "D2FA1C28EF87E53029327AA832C378674B3ACA0551CF9EA1F65BB8CA34913FAB", "Flags": 9568256,
"PreviousTxnLgrSeq" : 55180009, "LedgerEntryType": "AccountRoot",
"Sequence" : 1406, "MessageKey": "0000000000000000000000070000000300",
"index" : "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05" "OwnerCount": 12,
}, "PreviousTxnID": "4E0AA11CBDD1760DE95B68DF2ABBE75C9698CEB548BEA9789053FCB3EBD444FB",
"status" : "success", "PreviousTxnLgrSeq": 61965653,
"validated" : true "RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ",
} "Sequence": 385,
"TransferRate": 4294967295,
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
},
"status": "success",
"validated": true
}
} }
``` ```