From 2ed629572265163afb0666e6991aaaaff9fb7b68 Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa Date: Fri, 1 Dec 2017 10:45:20 -0800 Subject: [PATCH 1/7] updated escrow tut & samples - look up by receiver --- .../account_objects-request-receiver.json | 7 ++ .../account_objects-request-sender.json | 2 +- .../account_objects-response-receiver.json | 39 +++++++++++ .../account_objects-response-sender.json | 64 +++++++++++++------ content/tutorial-escrow.md | 48 ++++++++++++-- 5 files changed, 134 insertions(+), 26 deletions(-) create mode 100644 content/code_samples/escrow/websocket/account_objects-request-receiver.json create mode 100644 content/code_samples/escrow/websocket/account_objects-response-receiver.json diff --git a/content/code_samples/escrow/websocket/account_objects-request-receiver.json b/content/code_samples/escrow/websocket/account_objects-request-receiver.json new file mode 100644 index 0000000000..609b7c745f --- /dev/null +++ b/content/code_samples/escrow/websocket/account_objects-request-receiver.json @@ -0,0 +1,7 @@ +{ + "id": 5, + "command": "account_objects", + "account": "rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", + "ledger_index": "validated", + "type": "escrow" +} diff --git a/content/code_samples/escrow/websocket/account_objects-request-sender.json b/content/code_samples/escrow/websocket/account_objects-request-sender.json index 5249ee088a..74f8ff3e1c 100644 --- a/content/code_samples/escrow/websocket/account_objects-request-sender.json +++ b/content/code_samples/escrow/websocket/account_objects-request-sender.json @@ -1,7 +1,7 @@ { "id": 5, "command": "account_objects", - "account": "rEhw9vD98ZrkY4tZPvkZst5H18RysqFdaB", + "account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", "ledger_index": "validated", "type": "escrow" } diff --git a/content/code_samples/escrow/websocket/account_objects-response-receiver.json b/content/code_samples/escrow/websocket/account_objects-response-receiver.json new file mode 100644 index 0000000000..b718a9a679 --- /dev/null +++ b/content/code_samples/escrow/websocket/account_objects-response-receiver.json @@ -0,0 +1,39 @@ +{ + "id":5, + "result":{ + "account":"rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", + "account_objects":[ + { + "Account":"r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "Amount":"2500", + "Destination":"rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", + "DestinationNode":"0000000000000000", + "FinishAfter":570672000, + "Flags":0, + "LedgerEntryType":"Escrow", + "OwnerNode":"0000000000000000", + "PreviousTxnID":"F403A36E7A05898C68ADF5DC788FC69AF15C34DD84B6AB5345A34320D2BB5489", + "PreviousTxnLgrSeq":4570102, + "index":"07CFC2B7D9B7E8484B39403D00A851E2FD556CEE410EB682D1E9C912CF4ED6FB" + }, + { + "Account":"rnYL8VxgjkasX9NgM5SeMwgnykpRLw2u2v", + "Amount":"2500", + "Destination":"rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", + "DestinationNode":"0000000000000000", + "FinishAfter":570672000, + "Flags":0, + "LedgerEntryType":"Escrow", + "OwnerNode":"0000000000000000", + "PreviousTxnID":"2FD4FBF8A4BC65936C2DF1259FAA28BD79E4E0FA89612495B006E9BA7FB28971", + "PreviousTxnLgrSeq":4570913, + "index":"098ECEC65981434E549FC2A47620BBC1CFB9AA8D7DA385538C019B3DFE534B88" + } + ], + "ledger_hash":"AF0DB9E937976ECEE2215D9B77C21076A3E1045836102AB682864EF2F8030A22", + "ledger_index":4571007, + "validated":true + }, + "status":"success", + "type":"response" +} diff --git a/content/code_samples/escrow/websocket/account_objects-response-sender.json b/content/code_samples/escrow/websocket/account_objects-response-sender.json index 5b39fac1b4..5ddff9ffbe 100644 --- a/content/code_samples/escrow/websocket/account_objects-response-sender.json +++ b/content/code_samples/escrow/websocket/account_objects-response-sender.json @@ -1,26 +1,48 @@ { "id": 5, - "status": "success", - "type": "response", "result": { - "account": "rEhw9vD98ZrkY4tZPvkZst5H18RysqFdaB", - "account_objects": [ - { - "Account": "rEhw9vD98ZrkY4tZPvkZst5H18RysqFdaB", - "Amount": "100000", - "CancelAfter": 556927412, - "Condition": "A0258020E24D9E1473D4DF774F6D8E089067282034E4FA7ECACA2AD2E547953B2C113CBD810120", - "Destination": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "Flags": 0, - "LedgerEntryType": "Escrow", - "OwnerNode": "0000000000000000", - "PreviousTxnID": "E22D1F6EB006CAD35E0DBD3B4F3748427055E4C143EBE95AA6603823AEEAD324", - "PreviousTxnLgrSeq": 1772019, - "index": "E2CF730A31FD419382350C9DBD8DB7CD775BA5AA9B97A9BE9AB07304AA217A75" - } - ], - "ledger_hash": "F2ABEA175F4AB871845B01CB51E4324DBA2C2553EC34448D4AB1EB0A3F2D8EFB", - "ledger_index": 1772020, + "account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "account_objects": [{ + "Account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "Amount": "2500", + "Destination": "rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "F403A36E7A05898C68ADF5DC788FC69AF15C34DD84B6AB5345A34320D2BB5489", + "PreviousTxnLgrSeq": 4570102, + "index": "07CFC2B7D9B7E8484B39403D00A851E2FD556CEE410EB682D1E9C912CF4ED6FB" + }, { + "Account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "Amount": "2500", + "Destination": "rLwsbsEHu3yWn6FBEfXz6B7iwZmxMeY9H7", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "56780536AC1B85029143634416434CAE374213732FDBB284574F2CD8B826A868", + "PreviousTxnLgrSeq": 4570083, + "index": "250AF3071E37089C920832BBF56E66BAA0940F698F48418A9D65D9970C555EE9" + }, { + "Account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "Amount": "250", + "Destination": "rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "E6F60C460D768E4C833C14B89168929AAA538374BE5720B9112530AE04E651A5", + "PreviousTxnLgrSeq": 4570975, + "index": "4720F356A6F6A0C3A62D3E3AD72DF05AF45458D3124998D2BFE1CB085E55E302" + }], + "ledger_hash": "007E15650382AC1B1482FF245FC52080C5379E278A92169C50BAD3608A16123E", + "ledger_index": 4570985, "validated": true - } + }, + "status": "success", + "type": "response" } diff --git a/content/tutorial-escrow.md b/content/tutorial-escrow.md index f73a259323..be879072c9 100644 --- a/content/tutorial-escrow.md +++ b/content/tutorial-escrow.md @@ -5,7 +5,7 @@ The XRP Ledger supports held payments, or _escrows_, that can be executed only a - [Send a time-held escrow](#send-a-time-held-escrow) - [Send a conditionally-held escrow](#send-a-conditionally-held-escrow) - [Cancel an expired escrow](#cancel-an-expired-escrow) -- [Look up escrows by sender](#look-up-escrows-by-sender) +- [Look up escrows](#look-up-escrows) @@ -511,9 +511,19 @@ _Websocket_ In the above example, `r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT` is the sender of the escrow, and the increase in `Balance` from 99999**8**9990 drops to 99999**9**9990 drops represents the return of the escrowed 10,000 drops of XRP (0.01 XRP). -## Look up escrows by sender +**Tip:** If you don't know what `OfferSequence` to use in the [EscrowFinish transaction][] to execute an escrow, use the [`tx` method](reference-rippled.html) to look up the transaction that created the escrow, using the identifying hash of the transaction in the Escrow's `PreviousTxnID` field. Use the `Sequence` value of that transaction as the `OfferSequence` value when finishing the escrow. -All pending escrows are stored in the ledger as [Escrow objects](reference-ledger-format.html#escrow). You can look up escrow nodes owned by your address using the [`account_objects` method](reference-rippled.html#account-objects). +## Look up escrows + +All pending escrows are stored in the ledger as [Escrow objects](reference-ledger-format.html#escrow). + +You can look up escrow nodes by [sender](#look-up-escrows-by-sender) or [receiver](#look-up-escrows-by-receiver) using the [`account_objects`](reference-rippled.html#account-objects) method. + +###Look up escrows by sender + +You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrows by sender. + +The following examples illustrate an escrow lookup by sender. Note that the `account` in the request is the sender `Account` of the escrow `account_objects` returned in the response. Request: @@ -539,6 +549,36 @@ _Websocket_ -**Tip:** If you don't know what `OfferSequence` to use in the [EscrowFinish transaction][] to execute an escrow, use the [`tx` method](reference-rippled.html) to look up the transaction that created the escrow, using the identifying hash of the transaction in the Escrow's `PreviousTxnID` field. Use the `Sequence` value of that transaction as the `OfferSequence` value when finishing the escrow. +###Look up escrows by receiver + +You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrows by receiver address. + +Look up by receiver is possible for only pending escrows created after [fix1523](concept-amendments.html#fix1523) was enabled for rippled 0.80.0 on 2017-11-14. + +The following examples illustrate an escrow lookup by receiver. Note that the `account` in the request is the receiver `Destination` of the escrow `account_objects` returned in the response. + +Request: + + + +_Websocket_ + +```json +{% include 'code_samples/escrow/websocket/account_objects-request-receiver.json' %} +``` + + + +Response: + + + +_Websocket_ + +```json +{% include 'code_samples/escrow/websocket/account_objects-response-receiver.json' %} +``` + + {% include 'snippets/tx-type-links.md' %} From fb1b247b78914f40bb61ebb47a7fc61934f092c0 Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa Date: Fri, 1 Dec 2017 15:34:20 -0800 Subject: [PATCH 2/7] Updated doc & samples to address Rome's feedback. --- .../account_objects-request-sender.json | 2 +- .../account_objects-response-sender.json | 76 +++++++++++-------- content/tutorial-escrow.md | 31 +++++--- 3 files changed, 65 insertions(+), 44 deletions(-) diff --git a/content/code_samples/escrow/websocket/account_objects-request-sender.json b/content/code_samples/escrow/websocket/account_objects-request-sender.json index 74f8ff3e1c..bbf2c924f4 100644 --- a/content/code_samples/escrow/websocket/account_objects-request-sender.json +++ b/content/code_samples/escrow/websocket/account_objects-request-sender.json @@ -1,7 +1,7 @@ { "id": 5, "command": "account_objects", - "account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", "ledger_index": "validated", "type": "escrow" } diff --git a/content/code_samples/escrow/websocket/account_objects-response-sender.json b/content/code_samples/escrow/websocket/account_objects-response-sender.json index 5ddff9ffbe..55abd09bc1 100644 --- a/content/code_samples/escrow/websocket/account_objects-response-sender.json +++ b/content/code_samples/escrow/websocket/account_objects-response-sender.json @@ -1,46 +1,58 @@ { "id": 5, "result": { - "account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", "account_objects": [{ - "Account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", - "Amount": "2500", - "Destination": "rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", - "DestinationNode": "0000000000000000", - "FinishAfter": 570672000, - "Flags": 0, - "LedgerEntryType": "Escrow", - "OwnerNode": "0000000000000000", - "PreviousTxnID": "F403A36E7A05898C68ADF5DC788FC69AF15C34DD84B6AB5345A34320D2BB5489", - "PreviousTxnLgrSeq": 4570102, - "index": "07CFC2B7D9B7E8484B39403D00A851E2FD556CEE410EB682D1E9C912CF4ED6FB" - }, { - "Account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", - "Amount": "2500", - "Destination": "rLwsbsEHu3yWn6FBEfXz6B7iwZmxMeY9H7", - "DestinationNode": "0000000000000000", - "FinishAfter": 570672000, - "Flags": 0, - "LedgerEntryType": "Escrow", - "OwnerNode": "0000000000000000", - "PreviousTxnID": "56780536AC1B85029143634416434CAE374213732FDBB284574F2CD8B826A868", - "PreviousTxnLgrSeq": 4570083, - "index": "250AF3071E37089C920832BBF56E66BAA0940F698F48418A9D65D9970C555EE9" - }, { - "Account": "r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", + "Account": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG", "Amount": "250", - "Destination": "rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", + "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", "DestinationNode": "0000000000000000", "FinishAfter": 570672000, "Flags": 0, "LedgerEntryType": "Escrow", "OwnerNode": "0000000000000000", - "PreviousTxnID": "E6F60C460D768E4C833C14B89168929AAA538374BE5720B9112530AE04E651A5", - "PreviousTxnLgrSeq": 4570975, - "index": "4720F356A6F6A0C3A62D3E3AD72DF05AF45458D3124998D2BFE1CB085E55E302" + "PreviousTxnID": "A0951691DF3BCBEEB3108F2229A702D078BBBF848268BC601E59B68A2E390AAC", + "PreviousTxnLgrSeq": 4602906, + "index": "2BF3226ACCA8FF7ACB7201F20A701F51D8666A2FA2FBFBE6A05C9161F9228A18" + }, { + "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "Amount": "250", + "Destination": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "463D5A3CF09F4890B8471027F80414B3B438E6907425B71DC324D7118E90A107", + "PreviousTxnLgrSeq": 4603003, + "index": "35462CDC28AD830B29D101E8307AF5B6BFBC262F1BDCCA7EB45D1CA3F8B44F53" + }, { + "Account": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX", + "Amount": "250", + "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "08C9B20AC9EB191238038A108CC4CBBC0243672484B466FB42DED0A7DF6A31A1", + "PreviousTxnLgrSeq": 4602954, + "index": "A7B0983A1B53D92278E21499064A4F8BBE08CB8D14DB6BBBA8F688AB1D3FDA45" + }, { + "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "Amount": "250", + "Destination": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "F4778F528AB3CB945BDB88036EF9FE6C0E899F1629D9E51129E3B93CD488395A", + "PreviousTxnLgrSeq": 4602977, + "index": "F99A4DDADDDF623908C9A048170AB107AFF78684AB8F3110E9F00BBBC606ABD2" }], - "ledger_hash": "007E15650382AC1B1482FF245FC52080C5379E278A92169C50BAD3608A16123E", - "ledger_index": 4570985, + "ledger_hash": "1D4850035F175CA6F1CD5CE3B53C01AA83E4F086C13085E4FBC1EEFCCB345A9B", + "ledger_index": 4603176, "validated": true }, "status": "success", diff --git a/content/tutorial-escrow.md b/content/tutorial-escrow.md index be879072c9..561aa1b73b 100644 --- a/content/tutorial-escrow.md +++ b/content/tutorial-escrow.md @@ -6,7 +6,6 @@ The XRP Ledger supports held payments, or _escrows_, that can be executed only a - [Send a conditionally-held escrow](#send-a-conditionally-held-escrow) - [Cancel an expired escrow](#cancel-an-expired-escrow) - [Look up escrows](#look-up-escrows) - ## Send a Time-Held Escrow @@ -517,13 +516,13 @@ In the above example, `r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT` is the sender of the All pending escrows are stored in the ledger as [Escrow objects](reference-ledger-format.html#escrow). -You can look up escrow nodes by [sender](#look-up-escrows-by-sender) or [receiver](#look-up-escrows-by-receiver) using the [`account_objects`](reference-rippled.html#account-objects) method. +You can look up escrow objects by the [sender's address](#look-up-escrows-by-sender-address) or the [receiver's address](#look-up-escrows-by-receiver-address) using the [`account_objects`](reference-rippled.html#account-objects) method. -###Look up escrows by sender +###Look up escrows by sender address -You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrows by sender. +You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrow objects by sender address. -The following examples illustrate an escrow lookup by sender. Note that the `account` in the request is the sender `Account` of the escrow `account_objects` returned in the response. +Let's say that you want to look up all pending escrow objects with a sender address of `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. You can do this using the following example request, where the sender address is the `account` value. Request: @@ -537,6 +536,11 @@ _Websocket_ + +The response will look something like the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the sender or receiver address, where the sender address is the `Account` value and the receiver address is the `Destination` value. + +In this case, the second and fourth escrow objects have `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as their sender address (`Account`) value and are what we are looking for. + Response: @@ -549,13 +553,13 @@ _Websocket_ -###Look up escrows by receiver +###Look up escrows by receiver address -You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrows by receiver address. +You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrow objects by receiver address. -Look up by receiver is possible for only pending escrows created after [fix1523](concept-amendments.html#fix1523) was enabled for rippled 0.80.0 on 2017-11-14. +You can only look up pending escrow objects by receiver address if those escrows were created after the [fix1523 amendment](concept-amendments.html#fix1523) was enabled on 2017-11-14. -The following examples illustrate an escrow lookup by receiver. Note that the `account` in the request is the receiver `Destination` of the escrow `account_objects` returned in the response. +Let's say that you want to look up all pending escrow objects with a receiver address of `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. You can do this using the following example request, where the receiver address is the `account` value. Request: @@ -564,11 +568,16 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-request-receiver.json' %} +{% include 'code_samples/escrow/websocket/account_objects-request-sender.json' %} ``` + +The response will look something like the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the receiver or sender address, where the receiver address is the `Destination` value and the sender address is the `Account` value. + +In this case, the first and third escrow objects have `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as their receiver address (`Destination`) value and are what we are looking for. + Response: @@ -576,7 +585,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-response-receiver.json' %} +{% include 'code_samples/escrow/websocket/account_objects-response-sender.json' %} ``` From 42f983fe5ffb663da7b156876cf958e05af9db83 Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa Date: Mon, 4 Dec 2017 11:01:43 -0800 Subject: [PATCH 3/7] addressed comments from Rome --- content/tutorial-escrow.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/tutorial-escrow.md b/content/tutorial-escrow.md index 561aa1b73b..12ec7631f5 100644 --- a/content/tutorial-escrow.md +++ b/content/tutorial-escrow.md @@ -537,9 +537,9 @@ _Websocket_ -The response will look something like the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the sender or receiver address, where the sender address is the `Account` value and the receiver address is the `Destination` value. +The response resembles the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the sender or receiver address, where the sender address is the `Account` value and the receiver address is the `Destination` value. -In this case, the second and fourth escrow objects have `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as their sender address (`Account`) value and are what we are looking for. +In this example, the second and fourth escrow objects meet our lookup criteria because their `Account` (sender address) values are set to `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. Response: @@ -574,9 +574,9 @@ _Websocket_ -The response will look something like the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the receiver or sender address, where the receiver address is the `Destination` value and the sender address is the `Account` value. +The response resembles the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the receiver or sender address, where the receiver address is the `Destination` value and the sender address is the `Account` value. -In this case, the first and third escrow objects have `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as their receiver address (`Destination`) value and are what we are looking for. +In this example, the first and third escrow objects meet our lookup criteria because their `Destination` (receiver address) values are set to `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. Response: From c19abc8a46d9c2a67453ecdf97445c7b4b5d546a Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa Date: Mon, 11 Dec 2017 08:42:31 -0800 Subject: [PATCH 4/7] renamed escrow obj code sample file names --- .../websocket/account_objects-request.json | 7 +++ .../websocket/account_objects-response.json | 60 +++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 content/code_samples/escrow/websocket/account_objects-request.json create mode 100644 content/code_samples/escrow/websocket/account_objects-response.json diff --git a/content/code_samples/escrow/websocket/account_objects-request.json b/content/code_samples/escrow/websocket/account_objects-request.json new file mode 100644 index 0000000000..bbf2c924f4 --- /dev/null +++ b/content/code_samples/escrow/websocket/account_objects-request.json @@ -0,0 +1,7 @@ +{ + "id": 5, + "command": "account_objects", + "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "ledger_index": "validated", + "type": "escrow" +} diff --git a/content/code_samples/escrow/websocket/account_objects-response.json b/content/code_samples/escrow/websocket/account_objects-response.json new file mode 100644 index 0000000000..55abd09bc1 --- /dev/null +++ b/content/code_samples/escrow/websocket/account_objects-response.json @@ -0,0 +1,60 @@ +{ + "id": 5, + "result": { + "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "account_objects": [{ + "Account": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG", + "Amount": "250", + "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "A0951691DF3BCBEEB3108F2229A702D078BBBF848268BC601E59B68A2E390AAC", + "PreviousTxnLgrSeq": 4602906, + "index": "2BF3226ACCA8FF7ACB7201F20A701F51D8666A2FA2FBFBE6A05C9161F9228A18" + }, { + "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "Amount": "250", + "Destination": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "463D5A3CF09F4890B8471027F80414B3B438E6907425B71DC324D7118E90A107", + "PreviousTxnLgrSeq": 4603003, + "index": "35462CDC28AD830B29D101E8307AF5B6BFBC262F1BDCCA7EB45D1CA3F8B44F53" + }, { + "Account": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX", + "Amount": "250", + "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "08C9B20AC9EB191238038A108CC4CBBC0243672484B466FB42DED0A7DF6A31A1", + "PreviousTxnLgrSeq": 4602954, + "index": "A7B0983A1B53D92278E21499064A4F8BBE08CB8D14DB6BBBA8F688AB1D3FDA45" + }, { + "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", + "Amount": "250", + "Destination": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG", + "DestinationNode": "0000000000000000", + "FinishAfter": 570672000, + "Flags": 0, + "LedgerEntryType": "Escrow", + "OwnerNode": "0000000000000000", + "PreviousTxnID": "F4778F528AB3CB945BDB88036EF9FE6C0E899F1629D9E51129E3B93CD488395A", + "PreviousTxnLgrSeq": 4602977, + "index": "F99A4DDADDDF623908C9A048170AB107AFF78684AB8F3110E9F00BBBC606ABD2" + }], + "ledger_hash": "1D4850035F175CA6F1CD5CE3B53C01AA83E4F086C13085E4FBC1EEFCCB345A9B", + "ledger_index": 4603176, + "validated": true + }, + "status": "success", + "type": "response" +} From bfea7a8ab251576838b9cb85533381158e728ab5 Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa Date: Mon, 11 Dec 2017 09:03:23 -0800 Subject: [PATCH 5/7] removed obsolete escrow code sample files --- .../account_objects-request-receiver.json | 7 ---- .../account_objects-response-receiver.json | 39 ------------------- 2 files changed, 46 deletions(-) delete mode 100644 content/code_samples/escrow/websocket/account_objects-request-receiver.json delete mode 100644 content/code_samples/escrow/websocket/account_objects-response-receiver.json diff --git a/content/code_samples/escrow/websocket/account_objects-request-receiver.json b/content/code_samples/escrow/websocket/account_objects-request-receiver.json deleted file mode 100644 index 609b7c745f..0000000000 --- a/content/code_samples/escrow/websocket/account_objects-request-receiver.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id": 5, - "command": "account_objects", - "account": "rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", - "ledger_index": "validated", - "type": "escrow" -} diff --git a/content/code_samples/escrow/websocket/account_objects-response-receiver.json b/content/code_samples/escrow/websocket/account_objects-response-receiver.json deleted file mode 100644 index b718a9a679..0000000000 --- a/content/code_samples/escrow/websocket/account_objects-response-receiver.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "id":5, - "result":{ - "account":"rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", - "account_objects":[ - { - "Account":"r9yALWi9X6Hz2pQxeXcDbBazvsqEBsukgG", - "Amount":"2500", - "Destination":"rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", - "DestinationNode":"0000000000000000", - "FinishAfter":570672000, - "Flags":0, - "LedgerEntryType":"Escrow", - "OwnerNode":"0000000000000000", - "PreviousTxnID":"F403A36E7A05898C68ADF5DC788FC69AF15C34DD84B6AB5345A34320D2BB5489", - "PreviousTxnLgrSeq":4570102, - "index":"07CFC2B7D9B7E8484B39403D00A851E2FD556CEE410EB682D1E9C912CF4ED6FB" - }, - { - "Account":"rnYL8VxgjkasX9NgM5SeMwgnykpRLw2u2v", - "Amount":"2500", - "Destination":"rLpLGbSaUwEp6RgLCkjBGTHupfKJMkUjiw", - "DestinationNode":"0000000000000000", - "FinishAfter":570672000, - "Flags":0, - "LedgerEntryType":"Escrow", - "OwnerNode":"0000000000000000", - "PreviousTxnID":"2FD4FBF8A4BC65936C2DF1259FAA28BD79E4E0FA89612495B006E9BA7FB28971", - "PreviousTxnLgrSeq":4570913, - "index":"098ECEC65981434E549FC2A47620BBC1CFB9AA8D7DA385538C019B3DFE534B88" - } - ], - "ledger_hash":"AF0DB9E937976ECEE2215D9B77C21076A3E1045836102AB682864EF2F8030A22", - "ledger_index":4571007, - "validated":true - }, - "status":"success", - "type":"response" -} From 5fdc52df10345cd5d6525c35a58c815a8036d54e Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa Date: Mon, 11 Dec 2017 09:45:04 -0800 Subject: [PATCH 6/7] Updated sample names in escrow tut. Rmvd old files. --- .../account_objects-request-sender.json | 7 --- .../account_objects-response-sender.json | 60 ------------------- content/tutorial-escrow.md | 8 +-- 3 files changed, 4 insertions(+), 71 deletions(-) delete mode 100644 content/code_samples/escrow/websocket/account_objects-request-sender.json delete mode 100644 content/code_samples/escrow/websocket/account_objects-response-sender.json diff --git a/content/code_samples/escrow/websocket/account_objects-request-sender.json b/content/code_samples/escrow/websocket/account_objects-request-sender.json deleted file mode 100644 index bbf2c924f4..0000000000 --- a/content/code_samples/escrow/websocket/account_objects-request-sender.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id": 5, - "command": "account_objects", - "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", - "ledger_index": "validated", - "type": "escrow" -} diff --git a/content/code_samples/escrow/websocket/account_objects-response-sender.json b/content/code_samples/escrow/websocket/account_objects-response-sender.json deleted file mode 100644 index 55abd09bc1..0000000000 --- a/content/code_samples/escrow/websocket/account_objects-response-sender.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "id": 5, - "result": { - "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", - "account_objects": [{ - "Account": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG", - "Amount": "250", - "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", - "DestinationNode": "0000000000000000", - "FinishAfter": 570672000, - "Flags": 0, - "LedgerEntryType": "Escrow", - "OwnerNode": "0000000000000000", - "PreviousTxnID": "A0951691DF3BCBEEB3108F2229A702D078BBBF848268BC601E59B68A2E390AAC", - "PreviousTxnLgrSeq": 4602906, - "index": "2BF3226ACCA8FF7ACB7201F20A701F51D8666A2FA2FBFBE6A05C9161F9228A18" - }, { - "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", - "Amount": "250", - "Destination": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX", - "DestinationNode": "0000000000000000", - "FinishAfter": 570672000, - "Flags": 0, - "LedgerEntryType": "Escrow", - "OwnerNode": "0000000000000000", - "PreviousTxnID": "463D5A3CF09F4890B8471027F80414B3B438E6907425B71DC324D7118E90A107", - "PreviousTxnLgrSeq": 4603003, - "index": "35462CDC28AD830B29D101E8307AF5B6BFBC262F1BDCCA7EB45D1CA3F8B44F53" - }, { - "Account": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX", - "Amount": "250", - "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", - "DestinationNode": "0000000000000000", - "FinishAfter": 570672000, - "Flags": 0, - "LedgerEntryType": "Escrow", - "OwnerNode": "0000000000000000", - "PreviousTxnID": "08C9B20AC9EB191238038A108CC4CBBC0243672484B466FB42DED0A7DF6A31A1", - "PreviousTxnLgrSeq": 4602954, - "index": "A7B0983A1B53D92278E21499064A4F8BBE08CB8D14DB6BBBA8F688AB1D3FDA45" - }, { - "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", - "Amount": "250", - "Destination": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG", - "DestinationNode": "0000000000000000", - "FinishAfter": 570672000, - "Flags": 0, - "LedgerEntryType": "Escrow", - "OwnerNode": "0000000000000000", - "PreviousTxnID": "F4778F528AB3CB945BDB88036EF9FE6C0E899F1629D9E51129E3B93CD488395A", - "PreviousTxnLgrSeq": 4602977, - "index": "F99A4DDADDDF623908C9A048170AB107AFF78684AB8F3110E9F00BBBC606ABD2" - }], - "ledger_hash": "1D4850035F175CA6F1CD5CE3B53C01AA83E4F086C13085E4FBC1EEFCCB345A9B", - "ledger_index": 4603176, - "validated": true - }, - "status": "success", - "type": "response" -} diff --git a/content/tutorial-escrow.md b/content/tutorial-escrow.md index 12ec7631f5..c4881ccc1f 100644 --- a/content/tutorial-escrow.md +++ b/content/tutorial-escrow.md @@ -531,7 +531,7 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-request-sender.json' %} +{% include 'code_samples/escrow/websocket/account_objects-request.json' %} ``` @@ -548,7 +548,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-response-sender.json' %} +{% include 'code_samples/escrow/websocket/account_objects-response.json' %} ``` @@ -568,7 +568,7 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-request-sender.json' %} +{% include 'code_samples/escrow/websocket/account_objects-request.json' %} ``` @@ -585,7 +585,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-response-sender.json' %} +{% include 'code_samples/escrow/websocket/account_objects-response.json' %} ``` From e2db74d2029226005fcb249de5f29d376406839d Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa Date: Mon, 11 Dec 2017 16:49:54 -0800 Subject: [PATCH 7/7] addressed feedback from ryangyoung and scottschurr --- content/tutorial-escrow.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/tutorial-escrow.md b/content/tutorial-escrow.md index c4881ccc1f..db3448516d 100644 --- a/content/tutorial-escrow.md +++ b/content/tutorial-escrow.md @@ -516,7 +516,7 @@ In the above example, `r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT` is the sender of the All pending escrows are stored in the ledger as [Escrow objects](reference-ledger-format.html#escrow). -You can look up escrow objects by the [sender's address](#look-up-escrows-by-sender-address) or the [receiver's address](#look-up-escrows-by-receiver-address) using the [`account_objects`](reference-rippled.html#account-objects) method. +You can look up escrow objects by the [sender's address](#look-up-escrows-by-sender-address) or the [destination address](#look-up-escrows-by-destination-address) using the [`account_objects`](reference-rippled.html#account-objects) method. ###Look up escrows by sender address @@ -537,7 +537,7 @@ _Websocket_ -The response resembles the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the sender or receiver address, where the sender address is the `Account` value and the receiver address is the `Destination` value. +The response resembles the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the sender or destination address, where the sender address is the `Account` value and the destination address is the `Destination` value. In this example, the second and fourth escrow objects meet our lookup criteria because their `Account` (sender address) values are set to `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. @@ -553,13 +553,13 @@ _Websocket_ -###Look up escrows by receiver address +###Look up escrows by destination address -You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrow objects by receiver address. +You can use the [`account_objects`](reference-rippled.html#account-objects) method to look up escrow objects by destination address. -You can only look up pending escrow objects by receiver address if those escrows were created after the [fix1523 amendment](concept-amendments.html#fix1523) was enabled on 2017-11-14. +**Note:** You can only look up pending escrow objects by destination address if those escrows were created after the [fix1523 amendment](concept-amendments.html#fix1523) was enabled on 2017-11-14. -Let's say that you want to look up all pending escrow objects with a receiver address of `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. You can do this using the following example request, where the receiver address is the `account` value. +Let's say that you want to look up all pending escrow objects with a destination address of `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. You can do this using the following example request, where the destination address is the `account` value. Request: @@ -574,9 +574,9 @@ _Websocket_ -The response resembles the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the receiver or sender address, where the receiver address is the `Destination` value and the sender address is the `Account` value. +The response resembles the following example. Note that the response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm` as the destination or sender address, where the destination address is the `Destination` value and the sender address is the `Account` value. -In this example, the first and third escrow objects meet our lookup criteria because their `Destination` (receiver address) values are set to `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. +In this example, the first and third escrow objects meet our lookup criteria because their `Destination` (destination address) values are set to `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`. Response: