mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
Add examples to DepositPreauth reference docs & clarify some details
This commit is contained in:
@@ -9,7 +9,16 @@ This has no effect on processing of transactions unless the account that provide
|
||||
## Example {{currentpage.name}} JSON
|
||||
|
||||
```json
|
||||
TODO
|
||||
{
|
||||
"LedgerEntryType" : "DepositPreauth",
|
||||
"Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"Authorize" : "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"Flags" : 0,
|
||||
"OwnerNode" : "0000000000000000",
|
||||
"PreviousTxnID" : "3E8964D5A86B3CD6B9ECB33310D4E073D64C865A5B866200AD2B7E29F8326702",
|
||||
"PreviousTxnLgrSeq" : 7,
|
||||
"index" : "4A255038CC3ADCC1A9C91509279B59908251728D0DAADB248FFE297D0F7E068C"
|
||||
}
|
||||
```
|
||||
|
||||
## {{currentpage.name}} Fields
|
||||
@@ -21,7 +30,7 @@ A `DepositPreauth` object has the following fields:
|
||||
| `LedgerEntryType` | String | UInt16 | The value `0x0070`, mapped to the string `DepositPreauth`, indicates that this is a DepositPreauth object. |
|
||||
| `Account` | String | Account | The account that granted the preauthorization. (The destination of the preauthorized payments.) |
|
||||
| `Authorize` | String | Account | The account that received the preauthorization. (The sender of the preauthorized payments.) |
|
||||
| `Flags` | Number | UInt32 | A bit-map of boolean flags. No flags are defined for Checks, so this value is always `0`. |
|
||||
| `Flags` | Number | UInt32 | A bit-map of boolean flags. No flags are defined for DepositPreauth objects, so this value is always `0`. |
|
||||
| `OwnerNode` | String | UInt64 | A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. **Note:** The object does not contain a direct link to the owner directory containing it, since that value can be derived from the `Account`. |
|
||||
| `PreviousTxnID` | String | Hash256 | The identifying hash of the transaction that most recently modified this object. |
|
||||
| `PreviousTxnLgrSeq` | Number | UInt32 | The [index of the ledger][Ledger Index] that contains the transaction that most recently modified this object. |
|
||||
|
||||
@@ -14,8 +14,8 @@ An example of the request format:
|
||||
{
|
||||
"id": 1,
|
||||
"command": "deposit_authorized",
|
||||
"source_account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
|
||||
"destination_account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
|
||||
"source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
@@ -27,8 +27,8 @@ An example of the request format:
|
||||
"method": "deposit_authorized",
|
||||
"params": [
|
||||
{
|
||||
"source_account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
|
||||
"destination_account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
|
||||
"source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
]
|
||||
@@ -39,7 +39,7 @@ An example of the request format:
|
||||
|
||||
```bash
|
||||
#Syntax: deposit_authorized <source_account> <destination_account> [<ledger>]
|
||||
rippled deposit_authorized rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA rDg53Haik2475DJx8bjMDSDPj4VX7htaMd validated
|
||||
rippled deposit_authorized rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8 validated
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
@@ -63,26 +63,56 @@ An example of a successful response:
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
TODO
|
||||
{
|
||||
"id": 1,
|
||||
"result": {
|
||||
"deposit_authorized": true,
|
||||
"destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322",
|
||||
"ledger_index": 8,
|
||||
"source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"result":
|
||||
{
|
||||
"result": {
|
||||
"deposit_authorized": true,
|
||||
"destination_account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
|
||||
"ledger_hash": "4C99E5F63C0D0B1C2283B4F5DCE2239F80CE92E8B1A6AED1E110C198FC96E659",
|
||||
"ledger_index": 14380380,
|
||||
"source_account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
|
||||
"destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322",
|
||||
"ledger_index": 8,
|
||||
"source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
Loading: "/etc/rippled.cfg"
|
||||
2018-Jul-30 20:07:38.771658157 HTTPClient:NFO Connecting to 127.0.0.1:5005
|
||||
|
||||
{
|
||||
"result" : {
|
||||
"deposit_authorized" : true,
|
||||
"destination_account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"ledger_hash" : "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322",
|
||||
"ledger_index" : 8,
|
||||
"source_account" : "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"status" : "success",
|
||||
"validated" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
@@ -103,7 +133,8 @@ The response follows the [standard format][], with a successful result containin
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actNotFound` - An [Address][] specified in the `source_account` or `destination_account` field of the request does not correspond to an account in the ledger.
|
||||
* `actMalformed` - An [Address][] specified in the `source_account` or `destination_account` field of the request was not properly formatted. (It may contain a typo or be the wrong length, causing a failed checksum.)
|
||||
* `dstActMissing` - The `destination_account` field of the request does not correspond to an account in the ledger.
|
||||
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ Transactions are the only thing that can modify the shared state of the XRP Ledg
|
||||
Paths define a way for payments to flow through intermediary steps on their way from sender to receiver. Paths enable cross-currency payments by connecting sender and receiver through order books. Use these methods to work with paths and other books.
|
||||
|
||||
* **[`book_offers`](book_offers.html)** - Get info about offers to exchange two currencies.
|
||||
* **[`deposit_authorized`](deposit_authorized.html)** - Look up whether one account is authorized to send payments directly to another.
|
||||
* **[`path_find`](path_find.html)** - Find a path for a payment between two accounts and receive updates.
|
||||
* **[`ripple_path_find`](ripple_path_find.html)** - Find a path for payment between two accounts, once.
|
||||
|
||||
|
||||
@@ -10,7 +10,14 @@ A DepositPreauth transaction gives another account pre-approval to deliver payme
|
||||
## Example {{currentpage.name}} JSON
|
||||
|
||||
```json
|
||||
TODO
|
||||
{
|
||||
"TransactionType" : "DepositPreauth",
|
||||
"Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"Authorize" : "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"Fee" : "10",
|
||||
"Flags" : 2147483648,
|
||||
"Sequence" : 2
|
||||
}
|
||||
```
|
||||
|
||||
{% include '_snippets/tx-fields-intro.md' %}
|
||||
|
||||
Reference in New Issue
Block a user