Merge pull request #1652 from XRPLF/ws_tool_tickets

Fix ledger_entry format for tickets and add to WS tool
This commit is contained in:
Rome Reginelli
2022-12-22 12:01:28 -08:00
committed by GitHub
2 changed files with 23 additions and 26 deletions

View File

@@ -292,20 +292,19 @@ Request('ledger_entry - DepositPreauth', {
} }
}) })
// 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": "example_get_ticket",
// "id": "example_get_ticket", "command": "ledger_entry",
// "command": "ledger_entry", "ticket": {
// "ticket": { "account": DEFAULT_ADDRESS_1,
// "owner": DEFAULT_ADDRESS_1, "ticket_seq": 389 // This is a real ticket on Mainnet.
// "ticket_sequence": 0 // TODO: make a real ticket, fill in the seq },
// }, "ledger_index": "validated"
// "ledger_index": "validated" }
// } })
// })
Request("Transaction Methods") Request("Transaction Methods")

View File

@@ -513,10 +513,10 @@ rippled json ledger_entry '{ "deposit_preauth": { "owner": "rf1BiGeXwwQoi8Z2ueFY
Retrieve a [Ticket object](ticket.html), which represents a [sequence number][] set aside for future use. Can be provided as string (object ID of the Ticket) or as an object. _(Added by the [TicketBatch amendment][])_ Retrieve a [Ticket object](ticket.html), which represents a [sequence number][] set aside for future use. Can be provided as string (object ID of the Ticket) or as an object. _(Added by the [TicketBatch amendment][])_
| `Field` | Type | Description | | `Field` | Type | Description |
|:------------------------|:---------------------------|:----------------------| |:--------------------|:---------------------|:----------------------|
| `ticket` | Object or String | The [Ticket object](ticket.html) to retrieve. If a string, must be the [object ID](ledger-object-ids.html) of the Ticket, as hexadecimal. If an object, the `owner` and `ticket_sequence` sub-fields are required to uniquely specify the Ticket entry. | | `ticket` | Object or String | The [Ticket object](ticket.html) to retrieve. If a string, must be the [object ID](ledger-object-ids.html) of the Ticket, as hexadecimal. If an object, the `account` and `ticket_seq` sub-fields are required to uniquely specify the Ticket entry. |
| `ticket.owner` | String - [Address][] | _(Required if `ticket` is specified as an object)_ The owner of the Ticket object. | | `ticket.account` | String - [Address][] | _(Required if `ticket` is specified as an object)_ The owner of the Ticket object. |
| `ticket.ticket_sequence` | Unsigned Integer | _(Required if `ticket` is specified as an object)_ The Ticket Sequence number of the Ticket entry to retrieve. | | `ticket.ticket_seq` | Number | _(Required if `ticket` is specified as an object)_ The Ticket Sequence number of the Ticket entry to retrieve. |
<!-- MULTICODE_BLOCK_START --> <!-- MULTICODE_BLOCK_START -->
@@ -527,8 +527,8 @@ Retrieve a [Ticket object](ticket.html), which represents a [sequence number][]
"id": "example_get_ticket", "id": "example_get_ticket",
"command": "ledger_entry", "command": "ledger_entry",
"ticket": { "ticket": {
"owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ticket_sequence": 23 "ticket_seq": 389
}, },
"ledger_index": "validated" "ledger_index": "validated"
} }
@@ -541,8 +541,8 @@ Retrieve a [Ticket object](ticket.html), which represents a [sequence number][]
"method": "ledger_entry", "method": "ledger_entry",
"params": [{ "params": [{
"ticket": { "ticket": {
"owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ticket_sequence": 23 "ticket_seq": 389
}, },
"ledger_index": "validated" "ledger_index": "validated"
}] }]
@@ -552,14 +552,12 @@ Retrieve a [Ticket object](ticket.html), which represents a [sequence number][]
*Commandline* *Commandline*
```sh ```sh
rippled json ledger_entry '{ "ticket": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "ticket_sequence: 23 }, "ledger_index": "validated" }' rippled json ledger_entry '{ "ticket": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "ticket_seq: 389 }, "ledger_index": "validated" }'
``` ```
<!-- MULTICODE_BLOCK_END --> <!-- MULTICODE_BLOCK_END -->
<!-- TODO: enable if/when Tickets are available on Mainnet
[Try it! >](websocket-api-tool.html#ledger_entry-ticket) [Try it! >](websocket-api-tool.html#ledger_entry-ticket)
-->