Escrow: add ledger node type, correct tx types

This commit is contained in:
mDuo13
2017-04-12 16:24:39 -07:00
parent 41541ac9a4
commit cb0d4c1ebd
4 changed files with 46 additions and 16 deletions

View File

@@ -252,7 +252,22 @@ An Escrow node is associated with two addresses: the owner, who provides the XRP
Example Escrow node:
```
TODO
{
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": "10000",
"CancelAfter": 545440232,
"Condition": "A0258020A82A88B2DF843A54F58772E4A3861866ECDB4157645DD9AE528C1D3AEEDABAB6810120",
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"DestinationTag": 23480,
"FinishAfter": 545354132,
"Flags": 0,
"LedgerEntryType": "Escrow",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "C44F2EB84196B9AD820313DBEBA6316A15C9A2D35787579ED172B87A30131DA7",
"PreviousTxnLgrSeq": 28991004,
"SourceTag": 11747,
"index": "DC5F3851D8A1AB622F957761E5963BC5BD439D5C24AC6AD7AC4523F0640244AC"
}
```
An Escrow node has the following fields:
@@ -262,7 +277,7 @@ An Escrow node has the following fields:
| Account | String | AccountID | The address of the owner (sender) of this held payment. This is the account that provided the XRP, and gets it back if the held payment is canceled. |
| Destination | String | AccountID | The destination address where the XRP is paid if the held payment is successful. |
| Amount | String | Amount | The amount of XRP, in drops, to be delivered by the held payment. |
| Condition | String | VariableLength | _(Optional)_ A SHA-256 hash, as a hexadecimal string. If present, the [EscrowFinish transaction][] must contain a fulfillment that hashes to this value. |
| Condition | String | VariableLength | _(Optional)_ A [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1), as hexadecimal. If present, the [EscrowFinish transaction][] must contain a fulfillment that satisfies this condition. |
| CancelAfter | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple epoch](reference-rippled.html#specifying-time), after which this held payment can only be canceled. (Specifically, this is compared with the close time of the previous validated ledger.) |
| FinishAfter | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple epoch](reference-rippled.html#specifying-time), after which this held payment can be finished. Any [EscrowFinish transaction][] before this time fails. (Specifically, this is compared with the close time of the previous validated ledger.) |
| SourceTag | Number | UInt32 | _(Optional)_ An arbitrary tag to further specify the source for this held payment, such as a hosted recipient at the owner's address. |