From 515add6246a500b40e4e134e4f2f53eab5527dcb Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Thu, 18 Dec 2025 20:27:31 -0800 Subject: [PATCH 1/5] update ledger and tx methods --- _api-examples/ledger/jsonrpc-response.json | 43 ++--- _api-examples/ledger/ws-response.json | 48 ++--- _api-examples/tx/jsonrpc-response-ctid.json | 115 ------------ _api-examples/tx/jsonrpc-response-hash.json | 116 ------------ _api-examples/tx/jsonrpc-response.json | 123 +++++++++++++ _api-examples/tx/ws-response-ctid.json | 127 ------------- _api-examples/tx/ws-response-hash.json | 126 ------------- _api-examples/tx/ws-response.json | 126 +++++++++++++ .../ledger-methods/ledger.md | 11 +- .../transaction-methods/tx.md | 169 +++--------------- .../websocket-api/data/command-list.json | 4 +- 11 files changed, 328 insertions(+), 680 deletions(-) delete mode 100644 _api-examples/tx/jsonrpc-response-ctid.json delete mode 100644 _api-examples/tx/jsonrpc-response-hash.json create mode 100644 _api-examples/tx/jsonrpc-response.json delete mode 100644 _api-examples/tx/ws-response-ctid.json delete mode 100644 _api-examples/tx/ws-response-hash.json create mode 100644 _api-examples/tx/ws-response.json diff --git a/_api-examples/ledger/jsonrpc-response.json b/_api-examples/ledger/jsonrpc-response.json index b8730a95fb..0cdd239bc6 100644 --- a/_api-examples/ledger/jsonrpc-response.json +++ b/_api-examples/ledger/jsonrpc-response.json @@ -1,22 +1,23 @@ { - "result": { - "ledger": { - "account_hash": "23C1C8F8ACCEFACBDD9A1804CC25E652A324F9EABD7D0BEF103DA56D6E0306E7", - "close_flags": 0, - "close_time": 752188801, - "close_time_human": "2023-Nov-01 21:20:01.000000000 UTC", - "close_time_resolution": 10, - "closed": true, - "ledger_hash": "140B769E9ED61FCD675A6EEC1F005084614314C1D675C2CFDD11A1024BBD2C96", - "ledger_index": "83626952", - "parent_close_time": 752188800, - "parent_hash": "7D169A530960AFA8A0E38D036D8EF960BC2C2E02C4A0CE848A4200B9376AC99C", - "total_coins": "99988256304478252", - "transaction_hash": "77226182F58D9B5C798262F0E9D8C575D174E434F0C3C7119FB658BA70004CE9" - }, - "ledger_hash": "140B769E9ED61FCD675A6EEC1F005084614314C1D675C2CFDD11A1024BBD2C96", - "ledger_index": 83626952, - "status": "success", - "validated": true - } -} + "result": { + "ledger_hash": "9DAAAE85FC0D64E95506608FDB48E8B77706EF64FF144F18EEBC2FC4366D9B20", + "ledger_index": 100972465, + "validated": true, + "ledger": { + "account_hash": "6FD2916DDD574886EBCBAA1CE0048D94E5A57E13EA5DD7B0283A7AB63EBF0131", + "close_flags": 0, + "close_time": 819429360, + "close_time_human": "2025-Dec-19 03:16:00.000000000 UTC", + "close_time_resolution": 10, + "close_time_iso": "2025-12-19T03:16:00Z", + "ledger_hash": "9DAAAE85FC0D64E95506608FDB48E8B77706EF64FF144F18EEBC2FC4366D9B20", + "parent_close_time": 819429352, + "parent_hash": "1FB3618846E1201E38FED328BD13A9D62012469193C0B5BA4ECE6C8BDAA2BFC9", + "total_coins": "99985738467416092", + "transaction_hash": "B61C7B94F583DBFEEDA58DE348518D6FC2F397053EA0E3AC4B8F2BD440629F19", + "ledger_index": 100972465, + "closed": true + }, + "status": "success" + } +} \ No newline at end of file diff --git a/_api-examples/ledger/ws-response.json b/_api-examples/ledger/ws-response.json index 129103171b..44b28f8bc3 100644 --- a/_api-examples/ledger/ws-response.json +++ b/_api-examples/ledger/ws-response.json @@ -1,24 +1,26 @@ { - "id": "example_ledger_req", - "result": { - "ledger": { - "account_hash": "B8B2C0C3F9E75E3AEE31D467B2544AB56244E618890BA58679707D6BFC0AF41D", - "close_flags": 0, - "close_time": 752188602, - "close_time_human": "2023-Nov-01 21:16:42.000000000 UTC", - "close_time_resolution": 10, - "closed": true, - "ledger_hash": "1BEECD5D21592EABDEF98D8E4BC038AD10B5700FF7E98011870DF5D6C2A2F39B", - "ledger_index": "83626901", - "parent_close_time": 752188601, - "parent_hash": "6B32CFC42B32C5FB90019AE17F701D96B499A4C8E148A002E18135A434A19D98", - "total_coins": "99988256314388830", - "transaction_hash": "21586C664DC47E12AF34F22EBF1DB55D23F8C98972542BAC0C39B1009CAC84D4" - }, - "ledger_hash": "1BEECD5D21592EABDEF98D8E4BC038AD10B5700FF7E98011870DF5D6C2A2F39B", - "ledger_index": 83626901, - "validated": true - }, - "status": "success", - "type": "response" -} + "result": { + "ledger_hash": "9D346B0C050C6C5C5172BD731063C33A50C4E1D89EB51F47BBE73E4DA340A684", + "ledger_index": 100972403, + "validated": true, + "ledger": { + "account_hash": "3227B0AE820CA0C7B96A761942912785A27CFC5F3407A39AF03DA0BE9C6A4298", + "close_flags": 0, + "close_time": 819429112, + "close_time_human": "2025-Dec-19 03:11:52.000000000 UTC", + "close_time_resolution": 10, + "close_time_iso": "2025-12-19T03:11:52Z", + "ledger_hash": "9D346B0C050C6C5C5172BD731063C33A50C4E1D89EB51F47BBE73E4DA340A684", + "parent_close_time": 819429111, + "parent_hash": "667CE88E45EC7E9C71436A93970437F2F1C14D5A367F24BE3B571A27846C1EF3", + "total_coins": "99985738468528946", + "transaction_hash": "BC2E8BC91AF126D924CD4C43F0A28DF0DF5DE271A11A781516697C56488F03F7", + "ledger_index": 100972403, + "closed": true + } + }, + "id": "example_ledger_req", + "api_version": 2, + "status": "success", + "type": "response" +} \ No newline at end of file diff --git a/_api-examples/tx/jsonrpc-response-ctid.json b/_api-examples/tx/jsonrpc-response-ctid.json deleted file mode 100644 index 2279310ab9..0000000000 --- a/_api-examples/tx/jsonrpc-response-ctid.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "result": { - "tx_json": { - "Account": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "DeliverMax": { - "currency": "USD", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "1" - }, - "Destination": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "Fee": "10", - "Flags": 0, - "Paths": [ - [{ - "account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "currency": "USD", - "issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "type": 49 - }], - [{ - "account": "rD1jovjQeEpvaDwn9wKaYokkXXrqo4D23x", - "currency": "USD", - "issuer": "rD1jovjQeEpvaDwn9wKaYokkXXrqo4D23x", - "type": 49 - }, { - "account": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY", - "currency": "USD", - "issuer": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY", - "type": 49 - }, { - "account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "currency": "USD", - "issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "type": 49 - }] - ], - "SendMax": { - "currency": "USD", - "issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "value": "1.01" - }, - "Sequence": 88, - "SigningPubKey": "02EAE5DAB54DD8E1C49641D848D5B97D1B29149106174322EDF98A1B2CCE5D7F8E", - "TransactionType": "Payment", - "TxnSignature": "30440220791B6A3E036ECEFFE99E8D4957564E8C84D1548C8C3E80A87ED1AA646ECCFB16022037C5CAC97E34E3021EBB426479F2ACF3ACA75DB91DCC48D1BCFB4CF547CFEAA0", - "date": 416445410, - "ledger_index": 348734 - }, - "ctid": "C005523E00000000", - "hash": "E08D6E9754025BA2534A78707605E0601F03ACE063687A0CA1BDDACFCD1698C7", - "meta": { - "AffectedNodes": [{ - "ModifiedNode": { - "FinalFields": { - "Account": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "Balance": "59328999119", - "Flags": 0, - "OwnerCount": 11, - "Sequence": 89 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "E0D7BDE68B468FF0B8D948FD865576517DA987569833A05374ADB9A72E870A06", - "PreviousFields": { - "Balance": "59328999129", - "Sequence": 88 - }, - "PreviousTxnID": "C26AA6B4F7C3B9F55E17CD0D11F12032A1C7AD2757229FFD277C9447A8815E6E", - "PreviousTxnLgrSeq": 348700 - } - }, { - "ModifiedNode": { - "FinalFields": { - "Balance": { - "currency": "USD", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "-1" - }, - "Flags": 131072, - "HighLimit": { - "currency": "USD", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "100" - }, - "HighNode": "0", - "LowLimit": { - "currency": "USD", - "issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "value": "0" - }, - "LowNode": "0" - }, - "LedgerEntryType": "RippleState", - "LedgerIndex": "EA4BF03B4700123CDFFB6EB09DC1D6E28D5CEB7F680FB00FC24BC1C3BB2DB959", - "PreviousFields": { - "Balance": { - "currency": "USD", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "0" - } - }, - "PreviousTxnID": "53354D84BAE8FDFC3F4DA879D984D24B929E7FEB9100D2AD9EFCD2E126BCCDC8", - "PreviousTxnLgrSeq": 343570 - } - }], - "TransactionIndex": 0, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "unavailable" - }, - "validated": true, - "ledger_index": 348734, - "ledger_hash": "195F62F34EB2CCFA4C5888BA20387E82EB353DDB4508BAE6A835AF19FB8B0C09", - "close_time_iso": "2013-03-12T23:16:50Z", - "status": "success" - } -} \ No newline at end of file diff --git a/_api-examples/tx/jsonrpc-response-hash.json b/_api-examples/tx/jsonrpc-response-hash.json deleted file mode 100644 index 4c734a8347..0000000000 --- a/_api-examples/tx/jsonrpc-response-hash.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "result": { - "tx_json": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Fee": "12", - "Flags": 0, - "LastLedgerSequence": 56865248, - "OfferSequence": 5037708, - "Sequence": 5037710, - "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - }, - "TransactionType": "OfferCreate", - "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", - "date": 648248020, - "ledger_index": 56865245 - }, - "ctid": "C363B1DD00000000", - "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "meta": { - "AffectedNodes": [{ - "ModifiedNode": { - "FinalFields": { - "ExchangeRate": "4f04c66806cf7400", - "Flags": 0, - "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "TakerGetsCurrency": "0000000000000000000000000000000000000000", - "TakerGetsIssuer": "0000000000000000000000000000000000000000", - "TakerPaysCurrency": "000000000000000000000000434E590000000000", - "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" - }, - "LedgerEntryType": "DirectoryNode", - "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" - } - }, { - "ModifiedNode": { - "FinalFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Balance": "10404767991", - "Flags": 0, - "OwnerCount": 3, - "Sequence": 5037711 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", - "PreviousFields": { - "Balance": "10404768003", - "Sequence": 5037710 - }, - "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", - "PreviousTxnLgrSeq": 56865244 - } - }, { - "DeletedNode": { - "FinalFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "BookNode": "0", - "Flags": 0, - "OwnerNode": "0", - "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", - "PreviousTxnLgrSeq": 56865244, - "Sequence": 5037708, - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - } - }, - "LedgerEntryType": "Offer", - "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" - } - }, { - "ModifiedNode": { - "FinalFields": { - "Flags": 0, - "IndexNext": "0", - "IndexPrevious": "0", - "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - }, - "LedgerEntryType": "DirectoryNode", - "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - } - }, { - "CreatedNode": { - "LedgerEntryType": "Offer", - "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", - "NewFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "Sequence": 5037710, - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - } - } - } - }], - "TransactionIndex": 0, - "TransactionResult": "tesSUCCESS" - }, - "validated": true, - "ledger_index": 56865245, - "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", - "close_time_iso": "2020-07-16T20:53:40Z", - "status": "success" - } -} \ No newline at end of file diff --git a/_api-examples/tx/jsonrpc-response.json b/_api-examples/tx/jsonrpc-response.json new file mode 100644 index 0000000000..19ff13bad3 --- /dev/null +++ b/_api-examples/tx/jsonrpc-response.json @@ -0,0 +1,123 @@ +{ + "result": { + "tx_json": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Fee": "12", + "Flags": 0, + "LastLedgerSequence": 56865248, + "OfferSequence": 5037708, + "Sequence": 5037710, + "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + }, + "TransactionType": "OfferCreate", + "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", + "ledger_index": 56865245, + "ctid": "C363B1DD00000000", + "date": 648248020 + }, + "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "FinalFields": { + "ExchangeRate": "4f04c66806cf7400", + "Flags": 0, + "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "TakerGetsCurrency": "0000000000000000000000000000000000000000", + "TakerGetsIssuer": "0000000000000000000000000000000000000000", + "TakerPaysCurrency": "000000000000000000000000434E590000000000", + "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Balance": "10404767991", + "Flags": 0, + "OwnerCount": 3, + "Sequence": 5037711 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", + "PreviousFields": { + "Balance": "10404768003", + "Sequence": 5037710 + }, + "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", + "PreviousTxnLgrSeq": 56865244 + } + }, + { + "DeletedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "BookNode": "0", + "Flags": 0, + "OwnerNode": "0", + "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", + "PreviousTxnLgrSeq": 56865244, + "Sequence": 5037708, + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + } + }, + "LedgerEntryType": "Offer", + "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "IndexNext": "0", + "IndexPrevious": "0", + "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + } + }, + { + "CreatedNode": { + "LedgerEntryType": "Offer", + "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", + "NewFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "Sequence": 5037710, + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + } + } + } + } + ], + "TransactionIndex": 0, + "TransactionResult": "tesSUCCESS" + }, + "validated": true, + "ledger_index": 56865245, + "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", + "close_time_iso": "2020-07-16T20:53:40Z", + "ctid": "C363B1DD00000000", + "status": "success" + } +} \ No newline at end of file diff --git a/_api-examples/tx/ws-response-ctid.json b/_api-examples/tx/ws-response-ctid.json deleted file mode 100644 index 9fa395ba20..0000000000 --- a/_api-examples/tx/ws-response-ctid.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "result": { - "tx_json": { - "Account": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "DeliverMax": { - "currency": "USD", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "1" - }, - "Destination": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "Fee": "10", - "Flags": 0, - "Paths": [ - [ - { - "account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "currency": "USD", - "issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "type": 49 - } - ], - [ - { - "account": "rD1jovjQeEpvaDwn9wKaYokkXXrqo4D23x", - "currency": "USD", - "issuer": "rD1jovjQeEpvaDwn9wKaYokkXXrqo4D23x", - "type": 49 - }, - { - "account": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY", - "currency": "USD", - "issuer": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY", - "type": 49 - }, - { - "account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "currency": "USD", - "issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "type": 49 - } - ] - ], - "SendMax": { - "currency": "USD", - "issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "value": "1.01" - }, - "Sequence": 88, - "SigningPubKey": "02EAE5DAB54DD8E1C49641D848D5B97D1B29149106174322EDF98A1B2CCE5D7F8E", - "TransactionType": "Payment", - "TxnSignature": "30440220791B6A3E036ECEFFE99E8D4957564E8C84D1548C8C3E80A87ED1AA646ECCFB16022037C5CAC97E34E3021EBB426479F2ACF3ACA75DB91DCC48D1BCFB4CF547CFEAA0", - "date": 416445410, - "ledger_index": 348734 - }, - "ctid": "C005523E00000000", - "hash": "E08D6E9754025BA2534A78707605E0601F03ACE063687A0CA1BDDACFCD1698C7", - "meta": { - "AffectedNodes": [ - { - "ModifiedNode": { - "FinalFields": { - "Account": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "Balance": "59328999119", - "Flags": 0, - "OwnerCount": 11, - "Sequence": 89 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "E0D7BDE68B468FF0B8D948FD865576517DA987569833A05374ADB9A72E870A06", - "PreviousFields": { - "Balance": "59328999129", - "Sequence": 88 - }, - "PreviousTxnID": "C26AA6B4F7C3B9F55E17CD0D11F12032A1C7AD2757229FFD277C9447A8815E6E", - "PreviousTxnLgrSeq": 348700 - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Balance": { - "currency": "USD", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "-1" - }, - "Flags": 131072, - "HighLimit": { - "currency": "USD", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "100" - }, - "HighNode": "0", - "LowLimit": { - "currency": "USD", - "issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "value": "0" - }, - "LowNode": "0" - }, - "LedgerEntryType": "RippleState", - "LedgerIndex": "EA4BF03B4700123CDFFB6EB09DC1D6E28D5CEB7F680FB00FC24BC1C3BB2DB959", - "PreviousFields": { - "Balance": { - "currency": "USD", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "0" - } - }, - "PreviousTxnID": "53354D84BAE8FDFC3F4DA879D984D24B929E7FEB9100D2AD9EFCD2E126BCCDC8", - "PreviousTxnLgrSeq": 343570 - } - } - ], - "TransactionIndex": 0, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "unavailable" - }, - "validated": true, - "ledger_index": 348734, - "ledger_hash": "195F62F34EB2CCFA4C5888BA20387E82EB353DDB4508BAE6A835AF19FB8B0C09", - "close_time_iso": "2013-03-12T23:16:50Z" - }, - "id": "CTID example", - "api_version": 2, - "status": "success", - "type": "response" -} \ No newline at end of file diff --git a/_api-examples/tx/ws-response-hash.json b/_api-examples/tx/ws-response-hash.json deleted file mode 100644 index f251605b90..0000000000 --- a/_api-examples/tx/ws-response-hash.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "result": { - "tx_json": { - "Account": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "DeliverMax": { - "currency": "USD", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "1" - }, - "Destination": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "Fee": "10", - "Flags": 0, - "Paths": [ - [ - { - "account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "currency": "USD", - "issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "type": 49 - } - ], - [ - { - "account": "rD1jovjQeEpvaDwn9wKaYokkXXrqo4D23x", - "currency": "USD", - "issuer": "rD1jovjQeEpvaDwn9wKaYokkXXrqo4D23x", - "type": 49 - }, - { - "account": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY", - "currency": "USD", - "issuer": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY", - "type": 49 - }, - { - "account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "currency": "USD", - "issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV", - "type": 49 - } - ] - ], - "SendMax": { - "currency": "USD", - "issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "value": "1.01" - }, - "Sequence": 88, - "SigningPubKey": "02EAE5DAB54DD8E1C49641D848D5B97D1B29149106174322EDF98A1B2CCE5D7F8E", - "TransactionType": "Payment", - "TxnSignature": "30440220791B6A3E036ECEFFE99E8D4957564E8C84D1548C8C3E80A87ED1AA646ECCFB16022037C5CAC97E34E3021EBB426479F2ACF3ACA75DB91DCC48D1BCFB4CF547CFEAA0", - "date": 416445410, - "ledger_index": 348734 - }, - "ctid": "C005523E00000000", - "hash": "E08D6E9754025BA2534A78707605E0601F03ACE063687A0CA1BDDACFCD1698C7", - "meta": { - "AffectedNodes": [ - { - "ModifiedNode": { - "FinalFields": { - "Account": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "Balance": "59328999119", - "Flags": 0, - "OwnerCount": 11, - "Sequence": 89 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "E0D7BDE68B468FF0B8D948FD865576517DA987569833A05374ADB9A72E870A06", - "PreviousFields": { - "Balance": "59328999129", - "Sequence": 88 - }, - "PreviousTxnID": "C26AA6B4F7C3B9F55E17CD0D11F12032A1C7AD2757229FFD277C9447A8815E6E", - "PreviousTxnLgrSeq": 348700 - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Balance": { - "currency": "USD", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "-1" - }, - "Flags": 131072, - "HighLimit": { - "currency": "USD", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "100" - }, - "HighNode": "0", - "LowLimit": { - "currency": "USD", - "issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH", - "value": "0" - }, - "LowNode": "0" - }, - "LedgerEntryType": "RippleState", - "LedgerIndex": "EA4BF03B4700123CDFFB6EB09DC1D6E28D5CEB7F680FB00FC24BC1C3BB2DB959", - "PreviousFields": { - "Balance": { - "currency": "USD", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "0" - } - }, - "PreviousTxnID": "53354D84BAE8FDFC3F4DA879D984D24B929E7FEB9100D2AD9EFCD2E126BCCDC8", - "PreviousTxnLgrSeq": 343570 - } - } - ], - "TransactionIndex": 0, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "unavailable" - }, - "validated": true, - "ledger_index": 348734, - "ledger_hash": "195F62F34EB2CCFA4C5888BA20387E82EB353DDB4508BAE6A835AF19FB8B0C09", - "close_time_iso": "2013-03-12T23:16:50Z" - }, - "api_version": 2, - "status": "success", - "type": "response" -} \ No newline at end of file diff --git a/_api-examples/tx/ws-response.json b/_api-examples/tx/ws-response.json new file mode 100644 index 0000000000..dd15e9327f --- /dev/null +++ b/_api-examples/tx/ws-response.json @@ -0,0 +1,126 @@ +{ + "result": { + "tx_json": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Fee": "12", + "Flags": 0, + "LastLedgerSequence": 56865248, + "OfferSequence": 5037708, + "Sequence": 5037710, + "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + }, + "TransactionType": "OfferCreate", + "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", + "ledger_index": 56865245, + "ctid": "C363B1DD00000000", + "date": 648248020 + }, + "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "FinalFields": { + "ExchangeRate": "4f04c66806cf7400", + "Flags": 0, + "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "TakerGetsCurrency": "0000000000000000000000000000000000000000", + "TakerGetsIssuer": "0000000000000000000000000000000000000000", + "TakerPaysCurrency": "000000000000000000000000434E590000000000", + "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Balance": "10404767991", + "Flags": 0, + "OwnerCount": 3, + "Sequence": 5037711 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", + "PreviousFields": { + "Balance": "10404768003", + "Sequence": 5037710 + }, + "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", + "PreviousTxnLgrSeq": 56865244 + } + }, + { + "DeletedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "BookNode": "0", + "Flags": 0, + "OwnerNode": "0", + "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", + "PreviousTxnLgrSeq": 56865244, + "Sequence": 5037708, + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + } + }, + "LedgerEntryType": "Offer", + "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "IndexNext": "0", + "IndexPrevious": "0", + "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + } + }, + { + "CreatedNode": { + "LedgerEntryType": "Offer", + "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", + "NewFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "Sequence": 5037710, + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + } + } + } + } + ], + "TransactionIndex": 0, + "TransactionResult": "tesSUCCESS" + }, + "validated": true, + "ledger_index": 56865245, + "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", + "close_time_iso": "2020-07-16T20:53:40Z", + "ctid": "C363B1DD00000000" + }, + "id": "example_tx_hash", + "api_version": 2, + "status": "success", + "type": "response" +} \ No newline at end of file diff --git a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger.md b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger.md index 6d7c2bbb7e..c506c4bd30 100644 --- a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger.md +++ b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger.md @@ -22,7 +22,8 @@ An example of the request format: "ledger_index": "validated", "transactions": false, "expand": false, - "owner_funds": false + "owner_funds": false, + "api_version": 2 } ``` {% /tab %} @@ -36,7 +37,8 @@ An example of the request format: "ledger_index": "validated", "transactions": false, "expand": false, - "owner_funds": false + "owner_funds": false, + "api_version": 2 } ] } @@ -54,7 +56,7 @@ rippled ledger validated {% /tabs %} -{% try-it method="ledger" server="xrplcluster" /%} +{% try-it method="ledger" /%} The request can contain the following parameters: @@ -86,7 +88,7 @@ An example of a successful response: {% /tab %} {% tab label="Commandline" %} -{% code-snippet file="/_api-examples/ledger/jsonrpc-response.json" language="json" prefix="Loading: \"/etc/opt/ripple/rippled.cfg\"\n2023-Nov-01 21:38:14.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005\n\n" /%} +{% code-snippet file="/_api-examples/ledger/jsonrpc-response.json" language="json" prefix="Loading: \"/etc/opt/ripple/rippled.cfg\"\n2025-Dec-19 03:16:00.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005\n\n" /%} {% /tab %} {% /tabs %} @@ -100,6 +102,7 @@ The response follows the [standard format][], with a successful result containin | `ledger.close_flags` | Number | A bit-map of [flags relating to the closing of this ledger](../../../protocol/ledger-data/ledger-header.md#close-flags). | | `ledger.close_time` | Number | The time this ledger was closed, in [seconds since the Ripple Epoch][]. | | `ledger.close_time_human` | String | The time this ledger was closed, in human-readable format. Always uses the UTC time zone. | +| `ledger.close_time_iso` | String | The time this ledger was closed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | | `ledger.close_time_resolution` | Number | Ledger close times are rounded to within this many seconds. | | `ledger.closed` | Boolean | Whether or not this ledger has been closed. | | `ledger.ledger_hash` | String | Unique identifying hash of the entire ledger. | diff --git a/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md index 307b50d332..9e0df822ba 100644 --- a/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md +++ b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md @@ -20,7 +20,7 @@ An example of the request format: {% tab label="WebSocket (Hash)" %} ```json { - "id": 1, + "id": "example_tx_hash", "command": "tx", "transaction": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", "binary": false, @@ -32,9 +32,9 @@ An example of the request format: {% tab label="WebSocket (CTID)" %} ```json { - "id": "CTID example", + "id": "example_tx_ctid", "command": "tx", - "ctid": "C005523E00000000", + "ctid": "C363B1DD00000000", "binary": false, "api_version": 2 } @@ -62,7 +62,7 @@ An example of the request format: "method": "tx", "params": [ { - "ctid": "C005523E00000000", + "ctid": "C363B1DD00000000", "binary": false, "api_version": 2 } @@ -102,142 +102,16 @@ An example of a successful response: {% tabs %} -{% tab label="WebSocket (Hash)" %} -{% code-snippet file="/_api-examples/tx/ws-response-hash.json" language="json" /%} +{% tab label="WebSocket" %} +{% code-snippet file="/_api-examples/tx/ws-response.json" language="json" /%} {% /tab %} -{% tab label="WebSocket (CTID)" %} -{% code-snippet file="/_api-examples/tx/ws-response-ctid.json" language="json" /%} -{% /tab %} - -{% tab label="JSON-RPC (Hash)" %} -{% code-snippet file="/_api-examples/tx/jsonrpc-response-hash.json" language="json" /%} -{% /tab %} - -{% tab label="JSON-RPC (CTID)" %} -{% code-snippet file="/_api-examples/tx/jsonrpc-response-ctid.json" language="json" /%} +{% tab label="JSON-RPC" %} +{% code-snippet file="/_api-examples/tx/jsonrpc-response.json" language="json" prefix="200 OK\n\n" /%} {% /tab %} {% tab label="Commandline" %} -```json -{ - "result" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Fee" : "12", - "Flags" : 0, - "LastLedgerSequence" : 56865248, - "OfferSequence" : 5037708, - "Sequence" : 5037710, - "SigningPubKey" : "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - }, - "TransactionType" : "OfferCreate", - "TxnSignature" : "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", - "date" : 648248020, - "hash" : "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "inLedger" : 56865245, - "ledger_index" : 56865245, - "meta" : { - "AffectedNodes" : [ - { - "ModifiedNode" : { - "FinalFields" : { - "ExchangeRate" : "4F04C66806CF7400", - "Flags" : 0, - "RootIndex" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "TakerGetsCurrency" : "0000000000000000000000000000000000000000", - "TakerGetsIssuer" : "0000000000000000000000000000000000000000", - "TakerPaysCurrency" : "000000000000000000000000434E590000000000", - "TakerPaysIssuer" : "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" - }, - "LedgerEntryType" : "DirectoryNode", - "LedgerIndex" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" - } - }, - { - "ModifiedNode" : { - "FinalFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Balance" : "10404767991", - "Flags" : 0, - "OwnerCount" : 3, - "Sequence" : 5037711 - }, - "LedgerEntryType" : "AccountRoot", - "LedgerIndex" : "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", - "PreviousFields" : { - "Balance" : "10404768003", - "Sequence" : 5037710 - }, - "PreviousTxnID" : "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", - "PreviousTxnLgrSeq" : 56865244 - } - }, - { - "DeletedNode" : { - "FinalFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "BookNode" : "0000000000000000", - "Flags" : 0, - "OwnerNode" : "0000000000000000", - "PreviousTxnID" : "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", - "PreviousTxnLgrSeq" : 56865244, - "Sequence" : 5037708, - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - } - }, - "LedgerEntryType" : "Offer", - "LedgerIndex" : "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" - } - }, - { - "ModifiedNode" : { - "FinalFields" : { - "Flags" : 0, - "IndexNext" : "0000000000000000", - "IndexPrevious" : "0000000000000000", - "Owner" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "RootIndex" : "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - }, - "LedgerEntryType" : "DirectoryNode", - "LedgerIndex" : "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - } - }, - { - "CreatedNode" : { - "LedgerEntryType" : "Offer", - "LedgerIndex" : "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", - "NewFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "Sequence" : 5037710, - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - } - } - } - } - ], - "TransactionIndex" : 0, - "TransactionResult" : "tesSUCCESS" - }, - "status" : "success", - "validated" : true - } -} -``` +{% code-snippet file="/_api-examples/tx/jsonrpc-response.json" language="json" prefix="Loading: \"/etc/opt/ripple/rippled.cfg\"\n2025-Dec-19 03:16:00.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005\n\n" /%} {% /tab %} {% /tabs %} @@ -248,18 +122,19 @@ An example of a successful response: The response follows the [standard format][], with a successful result containing the fields of the [Transaction object](../../../protocol/transactions/index.md) as well as the following additional fields: -| `Field` | Type | Description | -|:---------------|:---------------------------------|:-------------------------| -| `ctid` | String | The transaction's [compact transaction identifier](../../api-conventions/ctid.md). {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.12.0" %}New in: rippled 1.12.0{% /badge %} _(Not supported in Clio v2.0 and earlier.)_ | -| `date` | Number | The [close time](../../../../concepts/ledgers/ledger-close-times.md) of the ledger in which the transaction was applied, in [seconds since the Ripple Epoch][]. | -| `hash` | String | The unique [identifying hash][] of the transaction | -| `inLedger` | Number | _(Deprecated)_ Alias for `ledger_index`. | -| `ledger_index` | Number | The [ledger index][] of the ledger that includes this transaction. | -| `meta` | Object (JSON) | (JSON mode) [Transaction metadata](../../../protocol/transactions/metadata.md), which describes the results of the transaction. | -| `meta_blob` | String (binary) | (Binary mode) [Transaction metadata](../../../protocol/transactions/metadata.md), which describes the results of the transaction, represented as a hex string. | -| `tx_blob` | String (binary) | (Binary mode) The transaction data represented as a hex string. | -| `tx_json` | Object (JSON) | The transaction data represented in JSON. | -| `validated` | Boolean | If `true`, this data comes from a validated ledger version; if omitted or set to `false`, this data is not final. | +| `Field` | Type | Description | +|:-----------------|:----------------|:-------------------------| +| `ctid` | String | The transaction's [compact transaction identifier](../../api-conventions/ctid.md). {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.12.0" %}New in: rippled 1.12.0{% /badge %} _(Not supported in Clio v2.0 and earlier.)_ | +| `close_time_iso` | String | The time the ledger containing this transaction was closed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | +| `date` | Number | The [close time](../../../../concepts/ledgers/ledger-close-times.md) of the ledger in which the transaction was applied, in [seconds since the Ripple Epoch][]. | +| `hash` | String | The unique [identifying hash][] of the transaction | +| `inLedger` | Number | _(Deprecated)_ Alias for `ledger_index`. | +| `ledger_index` | Number | The [ledger index][] of the ledger that includes this transaction. | +| `meta` | Object (JSON) | (JSON mode) [Transaction metadata](../../../protocol/transactions/metadata.md), which describes the results of the transaction. | +| `meta_blob` | String (binary) | (Binary mode) [Transaction metadata](../../../protocol/transactions/metadata.md), which describes the results of the transaction, represented as a hex string. | +| `tx_blob` | String (binary) | (Binary mode) The transaction data represented as a hex string. | +| `tx_json` | Object (JSON) | The transaction data represented in JSON. | +| `validated` | Boolean | If `true`, this data comes from a validated ledger version; if omitted or set to `false`, this data is not final. | {% /tab %} diff --git a/resources/dev-tools/components/websocket-api/data/command-list.json b/resources/dev-tools/components/websocket-api/data/command-list.json index 14ce313dda..4b0f259520 100644 --- a/resources/dev-tools/components/websocket-api/data/command-list.json +++ b/resources/dev-tools/components/websocket-api/data/command-list.json @@ -128,6 +128,7 @@ "description": "Retrieves information about the public ledger.", "link": "/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger", "body": { + "id": "example_ledger_req", "command": "ledger", "ledger_index": "validated", "transactions": false, @@ -258,8 +259,9 @@ "description": "Retrieves information on a single transaction.", "link": "/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx", "body": { + "id": "example_tx_hash", "command": "tx", - "transaction": "E08D6E9754025BA2534A78707605E0601F03ACE063687A0CA1BDDACFCD1698C7", + "transaction": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", "binary": false, "api_version": 2 } From b0d0212024c70445ecd2b284925fe566f6290f52 Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Thu, 18 Dec 2025 21:01:34 -0800 Subject: [PATCH 2/5] update account_tx --- .../account-methods/account_tx.md | 857 +++++++++++++----- .../transaction-methods/transaction_entry.md | 2 +- .../websocket-api/data/command-list.json | 3 +- 3 files changed, 619 insertions(+), 243 deletions(-) diff --git a/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md b/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md index 1f09102c5e..c1f81f3274 100644 --- a/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md +++ b/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md @@ -19,7 +19,7 @@ An example of the request format: {% tab label="WebSocket" %} ```json { - "id": 2, + "id": "example_account_tx", "command": "account_tx", "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", "ledger_index_min": -1, @@ -97,79 +97,116 @@ An example of a successful response: ```json { "result": { - "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", "ledger_index_min": 32570, - "ledger_index_max": 91824401, + "ledger_index_max": 100973977, "transactions": [ { "meta": { "AffectedNodes": [ { "ModifiedNode": { - "FinalFields": { - "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "AccountTxnID": "932CC7E9BAC1F7B9FA5381679F293EEC0A646E5E7F2F6D14C85FEE2102F0E66C", - "Balance": "1086222646", - "Domain": "6D64756F31332E636F6D", - "EmailHash": "98B4375E1D753E5B91627516F6D70977", - "Flags": 9568256, - "MessageKey": "0000000000000000000000070000000300", - "OwnerCount": 17, - "RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ", - "Sequence": 393, - "TicketCount": 5, - "TransferRate": 4294967295 - }, "LedgerEntryType": "AccountRoot", - "LedgerIndex": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8", - "PreviousFields": { - "Balance": "1086222601" - }, - "PreviousTxnID": "7E50969CDEF8E12B1AD26E64B338935813624A4D1CDDC4C9457832524F0FF74C", - "PreviousTxnLgrSeq": 89353048 + "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", + "PreviousTxnID": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "PreviousTxnLgrSeq": 98918099 } }, { "ModifiedNode": { "FinalFields": { - "Account": "rPJARH5nLWQisdmvDAbvzwS7N32Z1kusTZ", - "Balance": "55022190", "Flags": 0, - "OwnerCount": 0, - "Sequence": 89113341 + "Owner": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "RootIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2", + "PreviousTxnID": "565B7B3D2DBE8EF1206A195965DC82413C7D0EE81CFAA99F79EE419217237F7C", + "PreviousTxnLgrSeq": 98918107 + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "Owner": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "RootIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395", + "PreviousTxnID": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "PreviousTxnLgrSeq": 98918099 + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Balance": "24799961", + "Flags": 0, + "OwnerCount": 4, + "Sequence": 98916980 }, "LedgerEntryType": "AccountRoot", - "LedgerIndex": "C0363F86E070B70E7DA129736C3B05E509261C8668F61A7E958C4C10F17EAB90", + "LedgerIndex": "6221E36CC407593A1E74EC8BDCEF82BFF1C4275B92FC4D6877AA9013214133CA", "PreviousFields": { - "Balance": "55022245", - "Sequence": 89113340 + "Balance": "24799971", + "OwnerCount": 3, + "Sequence": 98916979 }, - "PreviousTxnID": "60D0FE881F9B1457FB1711011C6E490C22532B1D495557D6488BE3A634167CEE", - "PreviousTxnLgrSeq": 90136515 + "PreviousTxnID": "565B7B3D2DBE8EF1206A195965DC82413C7D0EE81CFAA99F79EE419217237F7C", + "PreviousTxnLgrSeq": 98918107 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "RippleState", + "LedgerIndex": "BCDE567C108FB674AA379BCDBEFF705899B38A39535A1EFA23E9906F96403A9F", + "NewFields": { + "Balance": { + "currency": "BTC", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "0" + }, + "Flags": 1179648, + "HighLimit": { + "currency": "BTC", + "issuer": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "value": "10" + }, + "LowLimit": { + "currency": "BTC", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "0" + } + } } } ], - "TransactionIndex": 2, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "45" + "TransactionIndex": 68, + "TransactionResult": "tesSUCCESS" }, "tx_json": { - "Account": "rPJARH5nLWQisdmvDAbvzwS7N32Z1kusTZ", - "DeliverMax": "45", - "Destination": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "DestinationTag": 316562, + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", "Fee": "10", - "Sequence": 89113340, - "SigningPubKey": "EDE21591E615E1D77C8C8A7F95372D001B3DF090AB47B99729CFCBC1E4E07D35F4", - "TransactionType": "Payment", - "TxnSignature": "D229FEB6ED82367102AC12DE5045BE6D548CBB52E0CB8F037A23171910A6158FA3377F5118B6CEAFDB07D6D43F76FE29CC26BE1ACBC7A86C9D86E14043C66104", - "ledger_index": 90136515, - "date": 777284672 + "LastLedgerSequence": 98918129, + "LimitAmount": { + "currency": "BTC", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "10" + }, + "Sequence": 98916979, + "SigningPubKey": "ED954DCBC5CB557C330BEAB71D36A18DEED0CAA5DE5A8FF8C9589A49D3253B50CF", + "TransactionType": "TrustSet", + "TxnSignature": "23EE556A37E6E5A4C16B87489CE7E0A5E0FFDAC5DB4B5DA3A6682FA355A8258025DA0EF6F920116080AB7196C4CF82D37760CBB6EEA6E199B9DCC29BD6BC7A09", + "ledger_index": 98918111, + "ctid": "C5E55EDF00440000", + "date": 811446652 }, - "ledger_index": 90136515, - "hash": "894541402AC968C98C329A88D097170B14BF4DEB8B2A7DF377EE89DDD332E018", - "ledger_hash": "14110F60753176E1F6A71AA084B6AD8663CBB46193CCFCDFAC02561626AA6B75", - "close_time_iso": "2024-08-18T08:24:32Z", + "ledger_index": 98918111, + "hash": "C58EB987B4AC3AE984ADF70DE375AD9B8A180569C30072DE57D6E17EFC69E7F0", + "ledger_hash": "3A134DDA87A60A2531B9B9D504FA6EBDAC99738B0DB20C476BCD6196592B08B2", + "close_time_iso": "2025-09-17T17:50:52Z", "validated": true }, { @@ -177,80 +214,113 @@ An example of a successful response: "AffectedNodes": [ { "ModifiedNode": { - "FinalFields": { - "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "AccountTxnID": "932CC7E9BAC1F7B9FA5381679F293EEC0A646E5E7F2F6D14C85FEE2102F0E66C", - "Balance": "1086222601", - "Domain": "6D64756F31332E636F6D", - "EmailHash": "98B4375E1D753E5B91627516F6D70977", - "Flags": 9568256, - "MessageKey": "0000000000000000000000070000000300", - "OwnerCount": 17, - "RegularKey": "rD9iJmieYHn8jTtPjwwkW2Wm9sVDvPXLoJ", - "Sequence": 393, - "TicketCount": 5, - "TransferRate": 4294967295 - }, "LedgerEntryType": "AccountRoot", - "LedgerIndex": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8", - "PreviousFields": { - "Balance": "1086222552" - }, - "PreviousTxnID": "EED9EB1880B951FAB3EE0DBBEB67B7ABEE3FA77F15782B6BD40342B3C23CFB75", - "PreviousTxnLgrSeq": 89343389 + "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", + "PreviousTxnID": "5E5313BA3C55755ED3FDACB53C53A7143997D997DAF5FB5C24B83C6B995D6363", + "PreviousTxnLgrSeq": 98055207 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2", + "NewFields": { + "Owner": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "RootIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2" + } } }, { "ModifiedNode": { "FinalFields": { - "Account": "rPSDqHdMPsnkmyUX4BvBkY8rycQYwrhUqw", - "Balance": "52611432", "Flags": 0, - "OwnerCount": 0, - "Sequence": 89196186 + "Owner": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "RootIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Balance": "24799991", + "Flags": 0, + "OwnerCount": 1, + "Sequence": 98916977 }, "LedgerEntryType": "AccountRoot", - "LedgerIndex": "20761D2C37004C70318F7A3C5A1C35817A90A0AE56485F6E3281FB2B3F05B0C9", + "LedgerIndex": "6221E36CC407593A1E74EC8BDCEF82BFF1C4275B92FC4D6877AA9013214133CA", "PreviousFields": { - "Balance": "52611491", - "Sequence": 89196185 + "Balance": "24800001", + "OwnerCount": 0, + "Sequence": 98916976 }, - "PreviousTxnID": "BAF86C2776C08407E0FAF42D374874E10430CB8C23AD464D9D9097EA326ABE92", - "PreviousTxnLgrSeq": 89353024 + "PreviousTxnID": "71BBF54C1EABA54B375702085EA089037909B1B2B6F618979131C1ECD4337575", + "PreviousTxnLgrSeq": 98916982 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "RippleState", + "LedgerIndex": "CE8F932A1CA2D2EDEAA1267BAEE88978BAA886034C389B76FB242860A82572A6", + "NewFields": { + "Balance": { + "currency": "USD", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "0" + }, + "Flags": 1179648, + "HighLimit": { + "currency": "USD", + "issuer": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "value": "10000" + }, + "LowLimit": { + "currency": "USD", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "0" + } + } } } ], - "TransactionIndex": 4, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "49" + "TransactionIndex": 20, + "TransactionResult": "tesSUCCESS" }, "tx_json": { - "Account": "rPSDqHdMPsnkmyUX4BvBkY8rycQYwrhUqw", - "DeliverMax": "49", - "Destination": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "DestinationTag": 342662134, + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", "Fee": "10", - "Sequence": 89196185, - "SigningPubKey": "ED7E4A2970ADFCCE93D59D469322745E98CBEB3D7D5388728B3BB2268E71F30B0F", - "TransactionType": "Payment", - "TxnSignature": "8CE14FD18BD186694DED8C204C3FCC2A527CC24AD51C2E0B2B792D035C85D662BC1A1450A8DF04BBEC66821B362056311127C627056AC7779B385517FD3A9202", - "ledger_index": 89353048, - "date": 774249571 + "LastLedgerSequence": 98918117, + "LimitAmount": { + "currency": "USD", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "10000" + }, + "Sequence": 98916976, + "SigningPubKey": "ED954DCBC5CB557C330BEAB71D36A18DEED0CAA5DE5A8FF8C9589A49D3253B50CF", + "TransactionType": "TrustSet", + "TxnSignature": "785C1D134E017F1C0C6168427F208950679DA90D4C90E479DB397DF8E2D3FEEED24466A63B1A18A41AEB6BE1806497E5314AF7B55939B6B8EF20F3E3876CF400", + "ledger_index": 98918099, + "ctid": "C5E55ED300140000", + "date": 811446610 }, - "ledger_index": 89353048, - "hash": "7E50969CDEF8E12B1AD26E64B338935813624A4D1CDDC4C9457832524F0FF74C", - "ledger_hash": "ED54DA98F3E495C36C2B0D9A511565E04454A1F4503B9DEE3FD39301D7625865", - "close_time_iso": "2024-07-14T05:19:31Z", + "ledger_index": 98918099, + "hash": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "ledger_hash": "EBA54645E31446A2A79F60F6241B357EFFEB98A6F43E17B7B2F1EE4E80C132D6", + "close_time_iso": "2025-09-17T17:50:10Z", "validated": true } ], "validated": true, "marker": { - "ledger": 89353048, - "seq": 4 + "ledger": 98918099, + "seq": 20 }, "limit": 2 }, + "id": "example_account_tx", "api_version": 2, "status": "success", "type": "response" @@ -260,164 +330,469 @@ An example of a successful response: {% tab label="JSON-RPC" %} ```json +200 OK + { - "result": { - "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "ledger_index_min": 32570, - "ledger_index_max": 91824423, - "transactions": [{ - "meta": { - "AffectedNodes": [{ - "ModifiedNode": { - "FinalFields": { - "Account": "rLJmawLfNAFNyyYHFbNErTfCrfsbmRzrTc", - "Balance": "77694521", - "Domain": "7872702D6C65646765722D746F6D6C2E68746D6C", - "EmailHash": "CE29D0E8928E95C3FF5BDD8CFE82F445", - "Flags": 8388608, - "MessageKey": "02000000000000000000000000A9E7611C8B9AFE2DEDA42039DBF09F3BFA185F76", - "OwnerCount": 26, - "RegularKey": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "Sequence": 62418073 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "548E97B1F63273FC2F339CBEB8C202FBF9231C4C61BC1BA51A6239501A2F6FB9", - "PreviousFields": { - "Balance": "77694533", - "Sequence": 62418072 - }, - "PreviousTxnID": "5FDB0B2ECE005EEA87DC35B33204424D0766AB37B764F1618A6C69C06BDDD511", - "PreviousTxnLgrSeq": 87319056 - } - }], - "TransactionIndex": 24, - "TransactionResult": "tesSUCCESS" + "result": { + "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "ledger_index_min": 32570, + "ledger_index_max": 100974014, + "transactions": [ + { + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", + "PreviousTxnID": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "PreviousTxnLgrSeq": 98918099 + } }, - "tx_json": { - "Account": "rLJmawLfNAFNyyYHFbNErTfCrfsbmRzrTc", - "Fee": "12", - "Flags": 131072, - "LastLedgerSequence": 88061884, - "LimitAmount": { - "currency": "QNT", - "issuer": "rGPsXnzAkdv1FYKkhC59GRp3M42axDhE1d", - "value": "500000000" + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "Owner": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "RootIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2" }, - "Sequence": 62418072, - "SigningPubKey": "023833AB55CD985EB4F7744DC2B02D34886A71ECC0177EE59749A0113ABEE8D64A", - "TransactionType": "TrustSet", - "TxnSignature": "304402201B00F6D2D9C3B290B8EB3CBAB15612C16C7C06E1D5D8A8B55528D4E1762EB7110220565D2A7369884D84F324FB3CA521BA4EDAFF8F2DDDE48AF8992CF99DF0EEB3F0", - "ledger_index": 88061876, - "date": 769309032 + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2", + "PreviousTxnID": "565B7B3D2DBE8EF1206A195965DC82413C7D0EE81CFAA99F79EE419217237F7C", + "PreviousTxnLgrSeq": 98918107 + } }, - "ledger_index": 88061876, - "hash": "735E296F0F271382FF8FBBBD0058AC7330419B8A1C955388A7384E5E3D5B2FCB", - "ledger_hash": "95B2DA521829572779128884B145DF921B4239CC74057C08EB570DD31641A8F5", - "close_time_iso": "2024-05-18T00:57:12Z", - "validated": true - }, { - "meta": { - "AffectedNodes": [{ - "ModifiedNode": { - "FinalFields": { - "Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "Balance": "8579705270", - "Flags": 131072, - "OwnerCount": 0, - "Sequence": 1152385 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", - "PreviousFields": { - "Balance": "8554705270" - }, - "PreviousTxnID": "DB31B6D0A304777F125CAD069E2D2C60829475BC30A5DB63376C425C10B85752", - "PreviousTxnLgrSeq": 86879421 - } - }, { - "ModifiedNode": { - "FinalFields": { - "Account": "rpKoCafrEz7FxQZ9FfktocuBGNZZyrz4KH", - "Balance": "802086263", - "Flags": 0, - "OwnerCount": 0, - "Sequence": 60818358 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "481C0CDDC838688B61B960A1EE721F657BD8E501F64141A51E9A905A1D87A2C9", - "PreviousFields": { - "Balance": "827086275", - "Sequence": 60818357 - }, - "PreviousTxnID": "7C1671C63D75EBDDD87672D1DE9D5A9EAEAF34C37BDB29D1359301B85ECEF776", - "PreviousTxnLgrSeq": 60818357 - } - }], - "TransactionIndex": 39, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "25000000" + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "Owner": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "RootIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395", + "PreviousTxnID": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "PreviousTxnLgrSeq": 98918099 + } }, - "tx_json": { - "Account": "rpKoCafrEz7FxQZ9FfktocuBGNZZyrz4KH", - "DeliverMax": "25000000", - "Destination": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "DestinationTag": 997786069, - "Fee": "12", - "LastLedgerSequence": 87598991, - "Sequence": 60818357, - "SigningPubKey": "0229DA128237D9A63FBA95666C5B8794F455875D843EDF39F6C02DF07FD5B4720D", - "TransactionType": "Payment", - "TxnSignature": "304402203B0048779085087566AABB4B878EF30EB41D3B29581937111F2708780EE4168702203E2D3B1B73F3F8B86EE009F818B226467E3BFC444B831AE851E0E0B0FB7F49C8", - "ledger_index": 87598983, - "date": 767543720 + { + "ModifiedNode": { + "FinalFields": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Balance": "24799961", + "Flags": 0, + "OwnerCount": 4, + "Sequence": 98916980 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "6221E36CC407593A1E74EC8BDCEF82BFF1C4275B92FC4D6877AA9013214133CA", + "PreviousFields": { + "Balance": "24799971", + "OwnerCount": 3, + "Sequence": 98916979 + }, + "PreviousTxnID": "565B7B3D2DBE8EF1206A195965DC82413C7D0EE81CFAA99F79EE419217237F7C", + "PreviousTxnLgrSeq": 98918107 + } }, - "ledger_index": 87598983, - "hash": "16DFB8551F5301E3B7D1BCEAA8DB92E9AF5D783E6DCA7C0E11FD143D988E904A", - "ledger_hash": "2B363FD30EA376E2662777CEBDDDE22C035A87DA3CD3EA0E6125CBBC9D8A7873", - "close_time_iso": "2024-04-27T14:35:20Z", - "validated": true - }], - "validated": true, - "marker": { - "ledger": 87598983, - "seq": 39 + { + "CreatedNode": { + "LedgerEntryType": "RippleState", + "LedgerIndex": "BCDE567C108FB674AA379BCDBEFF705899B38A39535A1EFA23E9906F96403A9F", + "NewFields": { + "Balance": { + "currency": "BTC", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "0" + }, + "Flags": 1179648, + "HighLimit": { + "currency": "BTC", + "issuer": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "value": "10" + }, + "LowLimit": { + "currency": "BTC", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "0" + } + } + } + } + ], + "TransactionIndex": 68, + "TransactionResult": "tesSUCCESS" }, - "limit": 2, - "status": "success" - } + "tx_json": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Fee": "10", + "LastLedgerSequence": 98918129, + "LimitAmount": { + "currency": "BTC", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "10" + }, + "Sequence": 98916979, + "SigningPubKey": "ED954DCBC5CB557C330BEAB71D36A18DEED0CAA5DE5A8FF8C9589A49D3253B50CF", + "TransactionType": "TrustSet", + "TxnSignature": "23EE556A37E6E5A4C16B87489CE7E0A5E0FFDAC5DB4B5DA3A6682FA355A8258025DA0EF6F920116080AB7196C4CF82D37760CBB6EEA6E199B9DCC29BD6BC7A09", + "ledger_index": 98918111, + "ctid": "C5E55EDF00440000", + "date": 811446652 + }, + "ledger_index": 98918111, + "hash": "C58EB987B4AC3AE984ADF70DE375AD9B8A180569C30072DE57D6E17EFC69E7F0", + "ledger_hash": "3A134DDA87A60A2531B9B9D504FA6EBDAC99738B0DB20C476BCD6196592B08B2", + "close_time_iso": "2025-09-17T17:50:52Z", + "validated": true + }, + { + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", + "PreviousTxnID": "5E5313BA3C55755ED3FDACB53C53A7143997D997DAF5FB5C24B83C6B995D6363", + "PreviousTxnLgrSeq": 98055207 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2", + "NewFields": { + "Owner": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "RootIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2" + } + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "Owner": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "RootIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Balance": "24799991", + "Flags": 0, + "OwnerCount": 1, + "Sequence": 98916977 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "6221E36CC407593A1E74EC8BDCEF82BFF1C4275B92FC4D6877AA9013214133CA", + "PreviousFields": { + "Balance": "24800001", + "OwnerCount": 0, + "Sequence": 98916976 + }, + "PreviousTxnID": "71BBF54C1EABA54B375702085EA089037909B1B2B6F618979131C1ECD4337575", + "PreviousTxnLgrSeq": 98916982 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "RippleState", + "LedgerIndex": "CE8F932A1CA2D2EDEAA1267BAEE88978BAA886034C389B76FB242860A82572A6", + "NewFields": { + "Balance": { + "currency": "USD", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "0" + }, + "Flags": 1179648, + "HighLimit": { + "currency": "USD", + "issuer": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "value": "10000" + }, + "LowLimit": { + "currency": "USD", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "0" + } + } + } + } + ], + "TransactionIndex": 20, + "TransactionResult": "tesSUCCESS" + }, + "tx_json": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Fee": "10", + "LastLedgerSequence": 98918117, + "LimitAmount": { + "currency": "USD", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "10000" + }, + "Sequence": 98916976, + "SigningPubKey": "ED954DCBC5CB557C330BEAB71D36A18DEED0CAA5DE5A8FF8C9589A49D3253B50CF", + "TransactionType": "TrustSet", + "TxnSignature": "785C1D134E017F1C0C6168427F208950679DA90D4C90E479DB397DF8E2D3FEEED24466A63B1A18A41AEB6BE1806497E5314AF7B55939B6B8EF20F3E3876CF400", + "ledger_index": 98918099, + "ctid": "C5E55ED300140000", + "date": 811446610 + }, + "ledger_index": 98918099, + "hash": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "ledger_hash": "EBA54645E31446A2A79F60F6241B357EFFEB98A6F43E17B7B2F1EE4E80C132D6", + "close_time_iso": "2025-09-17T17:50:10Z", + "validated": true + } + ], + "validated": true, + "marker": { + "ledger": 98918099, + "seq": 20 + }, + "limit": 2, + "status": "success" + } } ``` {% /tab %} {% tab label="Commandline" %} ```json +Loading: "/etc/opt/ripple/rippled.cfg" +2025-Dec-19 03:16:00.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005 + { - "result" : { - "account" : "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "ledger_index_max" : 57112094, - "ledger_index_min" : 57105464, - "limit" : 2, - "marker" : { - "ledger" : 57112074, - "seq" : 9 + "result": { + "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "ledger_index_min": 32570, + "ledger_index_max": 100974014, + "transactions": [ + { + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", + "PreviousTxnID": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "PreviousTxnLgrSeq": 98918099 + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "Owner": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "RootIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2", + "PreviousTxnID": "565B7B3D2DBE8EF1206A195965DC82413C7D0EE81CFAA99F79EE419217237F7C", + "PreviousTxnLgrSeq": 98918107 + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "Owner": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "RootIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395", + "PreviousTxnID": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "PreviousTxnLgrSeq": 98918099 + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Balance": "24799961", + "Flags": 0, + "OwnerCount": 4, + "Sequence": 98916980 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "6221E36CC407593A1E74EC8BDCEF82BFF1C4275B92FC4D6877AA9013214133CA", + "PreviousFields": { + "Balance": "24799971", + "OwnerCount": 3, + "Sequence": 98916979 + }, + "PreviousTxnID": "565B7B3D2DBE8EF1206A195965DC82413C7D0EE81CFAA99F79EE419217237F7C", + "PreviousTxnLgrSeq": 98918107 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "RippleState", + "LedgerIndex": "BCDE567C108FB674AA379BCDBEFF705899B38A39535A1EFA23E9906F96403A9F", + "NewFields": { + "Balance": { + "currency": "BTC", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "0" + }, + "Flags": 1179648, + "HighLimit": { + "currency": "BTC", + "issuer": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "value": "10" + }, + "LowLimit": { + "currency": "BTC", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "0" + } + } + } + } + ], + "TransactionIndex": 68, + "TransactionResult": "tesSUCCESS" + }, + "tx_json": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Fee": "10", + "LastLedgerSequence": 98918129, + "LimitAmount": { + "currency": "BTC", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "10" + }, + "Sequence": 98916979, + "SigningPubKey": "ED954DCBC5CB557C330BEAB71D36A18DEED0CAA5DE5A8FF8C9589A49D3253B50CF", + "TransactionType": "TrustSet", + "TxnSignature": "23EE556A37E6E5A4C16B87489CE7E0A5E0FFDAC5DB4B5DA3A6682FA355A8258025DA0EF6F920116080AB7196C4CF82D37760CBB6EEA6E199B9DCC29BD6BC7A09", + "ledger_index": 98918111, + "ctid": "C5E55EDF00440000", + "date": 811446652 + }, + "ledger_index": 98918111, + "hash": "C58EB987B4AC3AE984ADF70DE375AD9B8A180569C30072DE57D6E17EFC69E7F0", + "ledger_hash": "3A134DDA87A60A2531B9B9D504FA6EBDAC99738B0DB20C476BCD6196592B08B2", + "close_time_iso": "2025-09-17T17:50:52Z", + "validated": true }, - "status" : "success", - "transactions" : [ - { - "ledger_index" : 57112090, - "meta" : "201C0000002EF8E51100612503677617551E0297F38EF4FED7004E074D246B4EA3E550D9AE0F61BE40E08D3432091D52CE56140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574E624000AB96E624000037771BFD270E1E7220002000024000AB96F2D0000000062400003776C784A418114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911E1E1E311006156F7D315E0E992B1F1AC66B309C9D68961AA327FE770101B74D4C975F8C5DEC96AE8240367761A624000000005478807811403C95DC0C7CE402E8044A5F13304108013CE9963E1E1F1031000", - "tx_blob" : "120000228000000024000AB96E201B036776306140000000054788076840000000000000287321020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A74463044022054811EEF61ACCFA1B5FC6BB05D2FA49CF5174062740370328382E6EA557C0E6A0220480584D487638C333A87CA37100354BD36209E355E8DB9FE79791A56E24C1F268114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911831403C95DC0C7CE402E8044A5F13304108013CE9963", - "validated" : true - }, - { - "ledger_index" : 57112087, - "meta" : "201C00000026F8E5110061250367760A556B80EE9A9AD3FC40F471F29DCB80C678375137CE36220718902EF1EDCD375E7156140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574E66240000376DEB77118E1E7220002000024000AB96E2D00000000624000037771BFD2708114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911E1E1E511006125036776155591DA498D40AFD90670555F3D719883B48D224B4E4E906C634DEFA21163E8197756CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9E62400071DA26240000001C0D849F8E1E722000200002400071DA32D0000000062400000012DCFE87881146914CB622B8E41E150DE431F48DA244A69809366E1E1F1031000", - "tx_blob" : "12000022800000002400071DA22E00000001201B0367762D61400000009308615868400000000000002873210381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A0174473045022100E592BCCFD85CCE0B39075EFC66D6BCA594EBB451F12AD5AD9EE533A267F1381B02203635AB46AC110848FC44E797BD19D77A19E10A0F463AA5540B1C62E5D48C81F081146914CB622B8E41E150DE431F48DA244A698093668314D2E44C9FAF7BE9C536219800A6E698E4C7D2C911", - "validated" : true - } - ], - "validated" : true - } + { + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", + "PreviousTxnID": "5E5313BA3C55755ED3FDACB53C53A7143997D997DAF5FB5C24B83C6B995D6363", + "PreviousTxnLgrSeq": 98055207 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2", + "NewFields": { + "Owner": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "RootIndex": "31ECB4AC7F3713FB1FD97E07F5F4589FF872D746AB1B8BA604BA40ED8F9F3CD2" + } + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "Owner": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "RootIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "347C7476C61B99D4E7F6BBECDA911220042020C92A3E209282B69290BAE2F395" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Balance": "24799991", + "Flags": 0, + "OwnerCount": 1, + "Sequence": 98916977 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "6221E36CC407593A1E74EC8BDCEF82BFF1C4275B92FC4D6877AA9013214133CA", + "PreviousFields": { + "Balance": "24800001", + "OwnerCount": 0, + "Sequence": 98916976 + }, + "PreviousTxnID": "71BBF54C1EABA54B375702085EA089037909B1B2B6F618979131C1ECD4337575", + "PreviousTxnLgrSeq": 98916982 + } + }, + { + "CreatedNode": { + "LedgerEntryType": "RippleState", + "LedgerIndex": "CE8F932A1CA2D2EDEAA1267BAEE88978BAA886034C389B76FB242860A82572A6", + "NewFields": { + "Balance": { + "currency": "USD", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "0" + }, + "Flags": 1179648, + "HighLimit": { + "currency": "USD", + "issuer": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "value": "10000" + }, + "LowLimit": { + "currency": "USD", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "0" + } + } + } + } + ], + "TransactionIndex": 20, + "TransactionResult": "tesSUCCESS" + }, + "tx_json": { + "Account": "r48QyLLbot7VCfw325LrXAUtP6CRfU3tb4", + "Fee": "10", + "LastLedgerSequence": 98918117, + "LimitAmount": { + "currency": "USD", + "issuer": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", + "value": "10000" + }, + "Sequence": 98916976, + "SigningPubKey": "ED954DCBC5CB557C330BEAB71D36A18DEED0CAA5DE5A8FF8C9589A49D3253B50CF", + "TransactionType": "TrustSet", + "TxnSignature": "785C1D134E017F1C0C6168427F208950679DA90D4C90E479DB397DF8E2D3FEEED24466A63B1A18A41AEB6BE1806497E5314AF7B55939B6B8EF20F3E3876CF400", + "ledger_index": 98918099, + "ctid": "C5E55ED300140000", + "date": 811446610 + }, + "ledger_index": 98918099, + "hash": "33BD699AEFAC9B5CEE05495FE7590F71B58BAC8BCFB70A9E5FAF149EF9D2E116", + "ledger_hash": "EBA54645E31446A2A79F60F6241B357EFFEB98A6F43E17B7B2F1EE4E80C132D6", + "close_time_iso": "2025-09-17T17:50:10Z", + "validated": true + } + ], + "validated": true, + "marker": { + "ledger": 98918099, + "seq": 20 + }, + "limit": 2, + "status": "success" + } } ``` {% /tab %} @@ -446,7 +821,7 @@ Each transaction object includes the following fields, depending on whether it w | `Field` | Type | Description | |:-----------------|:----------------|:-------------------------| -| `close_time_iso` | String | The ledger close time represented in ISO 8601 time format. | +| `close_time_iso` | String | The time the ledger containing this transaction was closed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | | `hash` | String | The unique hash identifier of the transaction. | | `ledger_hash` | String | A hex string of the ledger version that included this transaction. | | `ledger_index` | Integer | The [ledger index][] of the ledger version that included this transaction. | diff --git a/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md index 202ef236d4..b844312ce8 100644 --- a/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md +++ b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md @@ -448,7 +448,7 @@ The response follows the [standard format][], with a successful result containin | `Field` | Type | Description | |:-----------------|:--------------------------|:--------------------------------| -| `close_time_iso` | String | The ledger close time represented in ISO 8601 time format. | +| `close_time_iso` | String | The ledger close time represented in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | | `hash` | String | The unique hash identifier of the transaction. | | `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger version the transaction was found in; this is the same as the one from the request. | | `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version the transaction was found in; this is the same as the one from the request. | diff --git a/resources/dev-tools/components/websocket-api/data/command-list.json b/resources/dev-tools/components/websocket-api/data/command-list.json index 4b0f259520..ba8b72ce8d 100644 --- a/resources/dev-tools/components/websocket-api/data/command-list.json +++ b/resources/dev-tools/components/websocket-api/data/command-list.json @@ -80,8 +80,9 @@ "description": "Retrieves a list of transactions that affected the specified account.", "link": "/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx", "body": { + "id": "example_account_tx", "command": "account_tx", - "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", "ledger_index_min": -1, "ledger_index_max": -1, "binary": false, From 71e2dae458d648110870ef05ce62fe03eb2aeaa6 Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Thu, 18 Dec 2025 21:22:01 -0800 Subject: [PATCH 3/5] update transaction_entry --- .../transaction-methods/tx.md | 136 +---- .../transaction-methods/transaction_entry.md | 481 +++++++++--------- .../websocket-api/data/command-list.json | 5 +- 3 files changed, 254 insertions(+), 368 deletions(-) diff --git a/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md b/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md index 1d9e8cbe6f..af80ea8988 100644 --- a/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md +++ b/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx.md @@ -104,142 +104,16 @@ rippled tx C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9 fals {% tabs %} -{% tab label="WebSocket (Hash)" %} -{% code-snippet file="/_api-examples/tx/ws-response-hash.json" language="json" /%} +{% tab label="WebSocket" %} +{% code-snippet file="/_api-examples/tx/ws-response.json" language="json" /%} {% /tab %} -{% tab label="WebSocket (CTID)" %} -{% code-snippet file="/_api-examples/tx/ws-response-ctid.json" language="json" /%} -{% /tab %} - -{% tab label="JSON-RPC (Hash)" %} -{% code-snippet file="/_api-examples/tx/jsonrpc-response-hash.json" language="json" /%} -{% /tab %} - -{% tab label="JSON-RPC (CTID)" %} -{% code-snippet file="/_api-examples/tx/jsonrpc-response-ctid.json" language="json" /%} +{% tab label="JSON-RPC" %} +{% code-snippet file="/_api-examples/tx/jsonrpc-response.json" language="json" prefix="200 OK\n\n" /%} {% /tab %} {% tab label="Commandline" %} -```json -{ - "result" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Fee" : "12", - "Flags" : 0, - "LastLedgerSequence" : 56865248, - "OfferSequence" : 5037708, - "Sequence" : 5037710, - "SigningPubKey" : "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - }, - "TransactionType" : "OfferCreate", - "TxnSignature" : "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", - "date" : 648248020, - "hash" : "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "inLedger" : 56865245, - "ledger_index" : 56865245, - "meta" : { - "AffectedNodes" : [ - { - "ModifiedNode" : { - "FinalFields" : { - "ExchangeRate" : "4F04C66806CF7400", - "Flags" : 0, - "RootIndex" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "TakerGetsCurrency" : "0000000000000000000000000000000000000000", - "TakerGetsIssuer" : "0000000000000000000000000000000000000000", - "TakerPaysCurrency" : "000000000000000000000000434E590000000000", - "TakerPaysIssuer" : "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" - }, - "LedgerEntryType" : "DirectoryNode", - "LedgerIndex" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" - } - }, - { - "ModifiedNode" : { - "FinalFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Balance" : "10404767991", - "Flags" : 0, - "OwnerCount" : 3, - "Sequence" : 5037711 - }, - "LedgerEntryType" : "AccountRoot", - "LedgerIndex" : "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", - "PreviousFields" : { - "Balance" : "10404768003", - "Sequence" : 5037710 - }, - "PreviousTxnID" : "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", - "PreviousTxnLgrSeq" : 56865244 - } - }, - { - "DeletedNode" : { - "FinalFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "BookNode" : "0000000000000000", - "Flags" : 0, - "OwnerNode" : "0000000000000000", - "PreviousTxnID" : "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", - "PreviousTxnLgrSeq" : 56865244, - "Sequence" : 5037708, - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - } - }, - "LedgerEntryType" : "Offer", - "LedgerIndex" : "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" - } - }, - { - "ModifiedNode" : { - "FinalFields" : { - "Flags" : 0, - "IndexNext" : "0000000000000000", - "IndexPrevious" : "0000000000000000", - "Owner" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "RootIndex" : "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - }, - "LedgerEntryType" : "DirectoryNode", - "LedgerIndex" : "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - } - }, - { - "CreatedNode" : { - "LedgerEntryType" : "Offer", - "LedgerIndex" : "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", - "NewFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "Sequence" : 5037710, - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - } - } - } - } - ], - "TransactionIndex" : 0, - "TransactionResult" : "tesSUCCESS" - }, - "status" : "success", - "validated" : true - } -} -``` +{% code-snippet file="/_api-examples/tx/jsonrpc-response.json" language="json" prefix="Loading: \"/etc/opt/ripple/rippled.cfg\"\n2025-Dec-19 03:16:00.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005\n\n" /%} {% /tab %} {% /tabs %} diff --git a/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md index b844312ce8..e89a5a0fdb 100644 --- a/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md +++ b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md @@ -18,10 +18,11 @@ An example of the request format: {% tab label="WebSocket" %} ```json { - "id": 4, + "id": "example_transaction_entry", "command": "transaction_entry", "tx_hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "ledger_index": 56865245 + "ledger_index": 56865245, + "api_version": 2 } ``` {% /tab %} @@ -33,7 +34,8 @@ An example of the request format: "params": [ { "tx_hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "ledger_index": 56865245 + "ledger_index": 56865245, + "api_version": 2 } ] } @@ -70,16 +72,14 @@ An example of a successful response: {% tab label="WebSocket" %} ```json { - "id": 4, "result": { - "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", - "ledger_index": 56865245, + "validated": true, "meta": { "AffectedNodes": [ { "ModifiedNode": { "FinalFields": { - "ExchangeRate": "4F04C66806CF7400", + "ExchangeRate": "4f04c66806cf7400", "Flags": 0, "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "TakerGetsCurrency": "0000000000000000000000000000000000000000", @@ -115,9 +115,9 @@ An example of a successful response: "FinalFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "BookNode": "0000000000000000", + "BookNode": "0", "Flags": 0, - "OwnerNode": "0000000000000000", + "OwnerNode": "0", "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", "PreviousTxnLgrSeq": 56865244, "Sequence": 5037708, @@ -136,8 +136,8 @@ An example of a successful response: "ModifiedNode": { "FinalFields": { "Flags": 0, - "IndexNext": "0000000000000000", - "IndexPrevious": "0000000000000000", + "IndexNext": "0", + "IndexPrevious": "0", "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" }, @@ -181,11 +181,15 @@ An example of a successful response: "value": "20160.75" }, "TransactionType": "OfferCreate", - "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", - "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9" + "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9" }, - "validated": true + "ledger_index": 56865245, + "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", + "close_time_iso": "2020-07-16T20:53:40Z", + "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9" }, + "id": "example_transaction_entry", + "api_version": 2, "status": "success", "type": "response" } @@ -194,246 +198,253 @@ An example of a successful response: {% tab label="JSON-RPC" %} ```json +200 OK + { - "result": { - "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", - "ledger_index": 56865245, - "meta": { - "AffectedNodes": [ - { - "ModifiedNode": { - "FinalFields": { - "ExchangeRate": "4F04C66806CF7400", - "Flags": 0, - "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "TakerGetsCurrency": "0000000000000000000000000000000000000000", - "TakerGetsIssuer": "0000000000000000000000000000000000000000", - "TakerPaysCurrency": "000000000000000000000000434E590000000000", - "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" - }, - "LedgerEntryType": "DirectoryNode", - "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Balance": "10404767991", - "Flags": 0, - "OwnerCount": 3, - "Sequence": 5037711 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", - "PreviousFields": { - "Balance": "10404768003", - "Sequence": 5037710 - }, - "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", - "PreviousTxnLgrSeq": 56865244 - } - }, - { - "DeletedNode": { - "FinalFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "BookNode": "0000000000000000", - "Flags": 0, - "OwnerNode": "0000000000000000", - "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", - "PreviousTxnLgrSeq": 56865244, - "Sequence": 5037708, - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - } - }, - "LedgerEntryType": "Offer", - "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Flags": 0, - "IndexNext": "0000000000000000", - "IndexPrevious": "0000000000000000", - "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - }, - "LedgerEntryType": "DirectoryNode", - "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - } - }, - { - "CreatedNode": { - "LedgerEntryType": "Offer", - "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", - "NewFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "Sequence": 5037710, - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - } - } - } - } - ], - "TransactionIndex": 0, - "TransactionResult": "tesSUCCESS" + "result": { + "validated": true, + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "FinalFields": { + "ExchangeRate": "4f04c66806cf7400", + "Flags": 0, + "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "TakerGetsCurrency": "0000000000000000000000000000000000000000", + "TakerGetsIssuer": "0000000000000000000000000000000000000000", + "TakerPaysCurrency": "000000000000000000000000434E590000000000", + "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" + } }, - "status": "success", - "tx_json": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Fee": "12", - "Flags": 0, - "LastLedgerSequence": 56865248, - "OfferSequence": 5037708, - "Sequence": 5037710, - "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", - "TakerGets": "15000000000", - "TakerPays": { + { + "ModifiedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Balance": "10404767991", + "Flags": 0, + "OwnerCount": 3, + "Sequence": 5037711 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", + "PreviousFields": { + "Balance": "10404768003", + "Sequence": 5037710 + }, + "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", + "PreviousTxnLgrSeq": 56865244 + } + }, + { + "DeletedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "BookNode": "0", + "Flags": 0, + "OwnerNode": "0", + "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", + "PreviousTxnLgrSeq": 56865244, + "Sequence": 5037708, + "TakerGets": "15000000000", + "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" + } }, - "TransactionType": "OfferCreate", - "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", - "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9" + "LedgerEntryType": "Offer", + "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" + } }, - "validated": true - } + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "IndexNext": "0", + "IndexPrevious": "0", + "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + } + }, + { + "CreatedNode": { + "LedgerEntryType": "Offer", + "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", + "NewFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "Sequence": 5037710, + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + } + } + } + } + ], + "TransactionIndex": 0, + "TransactionResult": "tesSUCCESS" + }, + "tx_json": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Fee": "12", + "Flags": 0, + "LastLedgerSequence": 56865248, + "OfferSequence": 5037708, + "Sequence": 5037710, + "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + }, + "TransactionType": "OfferCreate", + "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9" + }, + "ledger_index": 56865245, + "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", + "close_time_iso": "2020-07-16T20:53:40Z", + "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", + "status": "success" + } } ``` {% /tab %} {% tab label="Commandline" %} ```json +Loading: "/etc/opt/ripple/rippled.cfg" +2025-Dec-19 03:16:00.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005 + { - "result" : { - "ledger_hash" : "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", - "ledger_index" : 56865245, - "meta" : { - "AffectedNodes" : [ - { - "ModifiedNode" : { - "FinalFields" : { - "ExchangeRate" : "4F04C66806CF7400", - "Flags" : 0, - "RootIndex" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "TakerGetsCurrency" : "0000000000000000000000000000000000000000", - "TakerGetsIssuer" : "0000000000000000000000000000000000000000", - "TakerPaysCurrency" : "000000000000000000000000434E590000000000", - "TakerPaysIssuer" : "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" - }, - "LedgerEntryType" : "DirectoryNode", - "LedgerIndex" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" - } + "result": { + "validated": true, + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "FinalFields": { + "ExchangeRate": "4f04c66806cf7400", + "Flags": 0, + "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "TakerGetsCurrency": "0000000000000000000000000000000000000000", + "TakerGetsIssuer": "0000000000000000000000000000000000000000", + "TakerPaysCurrency": "000000000000000000000000434E590000000000", + "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" }, - { - "ModifiedNode" : { - "FinalFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Balance" : "10404767991", - "Flags" : 0, - "OwnerCount" : 3, - "Sequence" : 5037711 - }, - "LedgerEntryType" : "AccountRoot", - "LedgerIndex" : "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", - "PreviousFields" : { - "Balance" : "10404768003", - "Sequence" : 5037710 - }, - "PreviousTxnID" : "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", - "PreviousTxnLgrSeq" : 56865244 - } + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Balance": "10404767991", + "Flags": 0, + "OwnerCount": 3, + "Sequence": 5037711 }, - { - "DeletedNode" : { - "FinalFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "BookNode" : "0000000000000000", - "Flags" : 0, - "OwnerNode" : "0000000000000000", - "PreviousTxnID" : "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", - "PreviousTxnLgrSeq" : 56865244, - "Sequence" : 5037708, - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - } - }, - "LedgerEntryType" : "Offer", - "LedgerIndex" : "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" - } + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", + "PreviousFields": { + "Balance": "10404768003", + "Sequence": 5037710 }, - { - "ModifiedNode" : { - "FinalFields" : { - "Flags" : 0, - "IndexNext" : "0000000000000000", - "IndexPrevious" : "0000000000000000", - "Owner" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "RootIndex" : "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - }, - "LedgerEntryType" : "DirectoryNode", - "LedgerIndex" : "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - } + "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", + "PreviousTxnLgrSeq": 56865244 + } + }, + { + "DeletedNode": { + "FinalFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "BookNode": "0", + "Flags": 0, + "OwnerNode": "0", + "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", + "PreviousTxnLgrSeq": 56865244, + "Sequence": 5037708, + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + } }, - { - "CreatedNode" : { - "LedgerEntryType" : "Offer", - "LedgerIndex" : "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", - "NewFields" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory" : "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "Sequence" : 5037710, - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - } - } - } + "LedgerEntryType": "Offer", + "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "IndexNext": "0", + "IndexPrevious": "0", + "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" + } + }, + { + "CreatedNode": { + "LedgerEntryType": "Offer", + "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", + "NewFields": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", + "Sequence": 5037710, + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" + } } - ], - "TransactionIndex" : 0, - "TransactionResult" : "tesSUCCESS" + } + } + ], + "TransactionIndex": 0, + "TransactionResult": "tesSUCCESS" + }, + "tx_json": { + "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", + "Fee": "12", + "Flags": 0, + "LastLedgerSequence": 56865248, + "OfferSequence": 5037708, + "Sequence": 5037710, + "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", + "TakerGets": "15000000000", + "TakerPays": { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "value": "20160.75" }, - "status" : "success", - "tx_json" : { - "Account" : "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Fee" : "12", - "Flags" : 0, - "LastLedgerSequence" : 56865248, - "OfferSequence" : 5037708, - "Sequence" : 5037710, - "SigningPubKey" : "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", - "TakerGets" : "15000000000", - "TakerPays" : { - "currency" : "CNY", - "issuer" : "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value" : "20160.75" - }, - "TransactionType" : "OfferCreate", - "TxnSignature" : "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", - "hash" : "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9" - }, - "validated" : true - } + "TransactionType": "OfferCreate", + "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9" + }, + "ledger_index": 56865245, + "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", + "close_time_iso": "2020-07-16T20:53:40Z", + "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", + "status": "success" + } } ``` {% /tab %} @@ -448,7 +459,7 @@ The response follows the [standard format][], with a successful result containin | `Field` | Type | Description | |:-----------------|:--------------------------|:--------------------------------| -| `close_time_iso` | String | The ledger close time represented in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | +| `close_time_iso` | String | The time the ledger containing this transaction was closed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | | `hash` | String | The unique hash identifier of the transaction. | | `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger version the transaction was found in; this is the same as the one from the request. | | `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version the transaction was found in; this is the same as the one from the request. | diff --git a/resources/dev-tools/components/websocket-api/data/command-list.json b/resources/dev-tools/components/websocket-api/data/command-list.json index ba8b72ce8d..de072e1aec 100644 --- a/resources/dev-tools/components/websocket-api/data/command-list.json +++ b/resources/dev-tools/components/websocket-api/data/command-list.json @@ -249,9 +249,10 @@ "description": "Retrieves information on a single transaction from a specific ledger version.", "link": "/docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry", "body": { + "id": "example_transaction_entry", "command": "transaction_entry", - "tx_hash": "E08D6E9754025BA2534A78707605E0601F03ACE063687A0CA1BDDACFCD1698C7", - "ledger_index": 348734, + "tx_hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", + "ledger_index": 56865245, "api_version": 2 } }, From 1facb7c2d39f39539df6a02a45208fa89c977b21 Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Thu, 18 Dec 2025 21:35:16 -0800 Subject: [PATCH 4/5] update path_find_ and subscribe --- .../path-and-order-book-methods/path_find.md | 6 +++++- .../public-api-methods/subscription-methods/subscribe.md | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/path_find.md b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/path_find.md index 9a75c19d0c..7a3baabdf9 100644 --- a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/path_find.md +++ b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/path_find.md @@ -8,7 +8,11 @@ labels: # path_find [[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/PathFind.cpp "Source") -*WebSocket API only!* The `path_find` method searches for a [path](../../../../concepts/tokens/fungible-tokens/paths.md) along which a transaction can possibly be made, and periodically sends updates when the path changes over time. For a simpler version that is supported by JSON-RPC, see the [ripple_path_find method][]. For payments occurring strictly in XRP, it is not necessary to find a path, because XRP can be sent directly to any account. +{% admonition type="warning" name="Caution" %} +WebSocket API only! +{% /admonition %} + +The `path_find` method searches for a [path](../../../../concepts/tokens/fungible-tokens/paths.md) along which a transaction can possibly be made, and periodically sends updates when the path changes over time. For a simpler version that is supported by JSON-RPC, see the [ripple_path_find method][]. For payments occurring strictly in XRP, it is not necessary to find a path, because XRP can be sent directly to any account. There are three different modes, or sub-commands, of the path_find command. Specify which one you want with the `subcommand` parameter: diff --git a/docs/references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md b/docs/references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md index e5ebdb8ee7..a4d649afc3 100644 --- a/docs/references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md +++ b/docs/references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md @@ -344,7 +344,7 @@ Transaction stream messages have the following fields: | Field | Type | Description | |:------------------------|:--------------------------|:-----------------------| -| `close_time_iso` | String | The ledger close time represented in ISO 8601 time format. | +| `close_time_iso` | String | The time the ledger containing this transaction was closed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | | `type` | String | `transaction` indicates this is the notification of a transaction, which could come from several possible streams. | | `engine_result` | String | String [Transaction result code](../../../protocol/transactions/transaction-results/index.md) | | `engine_result_code` | Number | Numeric [transaction response code](../../../protocol/transactions/transaction-results/index.md), if applicable. | From 60c583d5fe498913c47551f90b648d9d6db42401 Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Thu, 18 Dec 2025 22:31:51 -0800 Subject: [PATCH 5/5] update ledger-clio method --- .../ledger-clio/jsonrpc-diff-response.json | 102 +++++++++--------- .../ledger-clio/jsonrpc-request.json | 5 +- .../ledger-clio/jsonrpc-response.json | 27 ++--- _api-examples/ledger-clio/wsrpc-request.json | 6 +- _api-examples/ledger-clio/wsrpc-response.json | 11 +- .../clio-methods/ledger-clio.md | 3 +- 6 files changed, 83 insertions(+), 71 deletions(-) diff --git a/_api-examples/ledger-clio/jsonrpc-diff-response.json b/_api-examples/ledger-clio/jsonrpc-diff-response.json index e7b13dfa13..f29208b491 100644 --- a/_api-examples/ledger-clio/jsonrpc-diff-response.json +++ b/_api-examples/ledger-clio/jsonrpc-diff-response.json @@ -1,80 +1,87 @@ { "result": { - "ledger_hash": "0C445F6F348AA5FF25A631C904F7277980F7FD2A6BACBB3A74FCF95F671D4884", - "ledger_index": 82681558, + "ledger_hash": "3787026448652A36491493C1202A443B2A6CC6022599BB0B25DDB0802DD7F1E7", + "ledger_index": 82681623, "validated": true, "ledger": { - "account_hash": "60BF81E9BCA5CEDB629B8D19DE0791F13318B4C6B6886E35A211824F9EB04DE5", + "account_hash": "39D34D858A0FD652143ED84B67A09193772DE0CCEBD2D63619E679293B7A3388", "close_flags": 0, - "close_time": 748569330, - "close_time_human": "2023-Sep-20 23:55:30.000000000 UTC", + "close_time": 748569571, + "close_time_human": "2023-Sep-20 23:59:31.000000000 UTC", "close_time_resolution": 10, + "close_time_iso": "2023-09-20T23:59:31Z", + "ledger_hash": "3787026448652A36491493C1202A443B2A6CC6022599BB0B25DDB0802DD7F1E7", + "parent_close_time": 748569570, + "parent_hash": "674FF6C68956E06CB9628833677C3DD71824C87C0AEFB487984CF98C3964DAEE", + "total_coins": "99988406188847858", + "transaction_hash": "11EE9C448D6B07B88A80B4FC7935B485E513816B3B47D0976CE9F51E7CF10A85", + "ledger_index": 82681623, "closed": true, - "ledger_hash": "0C445F6F348AA5FF25A631C904F7277980F7FD2A6BACBB3A74FCF95F671D4884", - "ledger_index": "82681558", - "parent_close_time": 748569321, - "parent_hash": "817E4F1791BE34C1214E78E02CAB794C54615F69E765D140D0BD820EA81BF0E9", - "total_coins": "99988406204421588", - "transaction_hash": "2D7808600F9CF57E263EC1EC4AA7357586AE949908EA7DBF023D241812CDC9B5", "diff": [ { - "object_id": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F0E155AF07E5400", + "object_id": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F0E134815E74400", "object": { - "ExchangeRate": "4f0e155af07e5400", + "ExchangeRate": "4f0e134815e74400", "Flags": 0, "Indexes": [ - "4CF31E76F470F4CBE7E7EDD1973CDFA564A59672D14C577C51517A1E3469E53A" + "AA0B31FB7FEF4A2546DA2BD0C44E9EC0D3A173EDE92DA1D50F78E61024BAFE4F" ], "LedgerEntryType": "DirectoryNode", - "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F0E155AF07E5400", + "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F0E134815E74400", "TakerGetsCurrency": "0000000000000000000000000000000000000000", "TakerGetsIssuer": "0000000000000000000000000000000000000000", "TakerPaysCurrency": "000000000000000000000000434E590000000000", "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A", - "index": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F0E155AF07E5400" + "index": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F0E134815E74400" } }, # ... (trimmed for length) ... { - "object_id": "F0B9A528CE25FE77C51C38040A7FEC016C2C841E74C1418D5B0A3845AE4FF3FC", + "object_id": "F65CCB13C33A1739BE63CBF6C77636429B0F4F506766D5E427A7CCC6C102037D", "object": { - "ExchangeRate": "5b0a3845ae4ff3fc", - "Flags": 0, - "Indexes": [ - "7C085618D0A2BC3A8919A032699A2219C08D112CC4020E615CE37C4ABE31A13C" - ], - "LedgerEntryType": "DirectoryNode", - "RootIndex": "F0B9A528CE25FE77C51C38040A7FEC016C2C841E74C1418D5B0A3845AE4FF3FC", - "TakerGetsCurrency": "0000000000000000000000005553440000000000", - "TakerGetsIssuer": "2ADB0B3959D60A6E6991F729E1918B7163925230", - "TakerPaysCurrency": "0000000000000000000000000000000000000000", - "TakerPaysIssuer": "0000000000000000000000000000000000000000", - "index": "F0B9A528CE25FE77C51C38040A7FEC016C2C841E74C1418D5B0A3845AE4FF3FC" + "Balance": { + "currency": "MAG", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "-0.0157136905" + }, + "Flags": 2228224, + "HighLimit": { + "currency": "MAG", + "issuer": "rwED3Kn7qu2og2nhCiDun5gKfWBDZ1YzfM", + "value": "45999776.589682" + }, + "HighNode": "0", + "LedgerEntryType": "RippleState", + "LowLimit": { + "currency": "MAG", + "issuer": "rXmagwMmnFtVet3uL26Q2iwk287SRvVMJ", + "value": "0" + }, + "LowNode": "8d", + "PreviousTxnID": "82783FBAE34A01C1AFA580F105FD716FA083B572BCE91254FD1B93B580E6DD3C", + "PreviousTxnLgrSeq": 82681623, + "index": "F65CCB13C33A1739BE63CBF6C77636429B0F4F506766D5E427A7CCC6C102037D" } }, { - "object_id": "F0B9A528CE25FE77C51C38040A7FEC016C2C841E74C1418D5B0A395385B74F22", + "object_id": "F7F1E123DC7B155F93DA6E122C4ED86B7032DFB6C399A5514A422635A8459821", "object": "" }, { - "object_id": "F97B88D103742E8C7CBDB982FF8843DC9E128E968668837B9468B1DB47EABBDC", + "object_id": "FA295451E29A37C8BDEC209DB56B2E7D35F714492A1CBD20258FD8E806906E1F", "object": { - "Account": "r4AZpDKVoBxVcYUJCWMcqZzyWsHTteC4ZE", - "BookDirectory": "623C4C4AD65873DA787AC85A0A1385FE6233B6DE100799474F12ED4BF0EFEAD9", - "BookNode": "0", + "Account": "rff9KstNpP3eFWDp81uv3vizh5dreQRVZv", + "Balance": "11720167", + "Domain": "6D61726B6574696E67", + "EmailHash": "A5EC2C95531D608F0DB6369F8097A16E", "Flags": 0, - "LedgerEntryType": "Offer", - "OwnerNode": "0", - "PreviousTxnID": "15D26953F0CE5216DC8BC7123E3DB8C8EC210D6127A7F34E182318206E0F2DFE", - "PreviousTxnLgrSeq": 82681558, - "Sequence": 132450778, - "TakerGets": "3677818937", - "TakerPays": { - "currency": "CNY", - "issuer": "rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK", - "value": "19593.43327917432" - }, - "index": "F97B88D103742E8C7CBDB982FF8843DC9E128E968668837B9468B1DB47EABBDC" + "LedgerEntryType": "AccountRoot", + "OwnerCount": 1, + "PreviousTxnID": "295A3AE6C90436F80EABB833B716DB52EC234C3D148622C2E5A449539C9FB0EE", + "PreviousTxnLgrSeq": 82681623, + "Sequence": 68507056, + "index": "FA295451E29A37C8BDEC209DB56B2E7D35F714492A1CBD20258FD8E806906E1F", + "urlgravatar": "http://www.gravatar.com/avatar/a5ec2c95531d608f0db6369f8097a16e" } } ] @@ -87,5 +94,4 @@ "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request" } ] -} - +} \ No newline at end of file diff --git a/_api-examples/ledger-clio/jsonrpc-request.json b/_api-examples/ledger-clio/jsonrpc-request.json index ba101ea50f..cd0def019a 100644 --- a/_api-examples/ledger-clio/jsonrpc-request.json +++ b/_api-examples/ledger-clio/jsonrpc-request.json @@ -6,7 +6,8 @@ "transactions": false, "expand": false, "owner_funds": false, - "diff": false + "diff": false, + "api_version": 2 } ] -} +} \ No newline at end of file diff --git a/_api-examples/ledger-clio/jsonrpc-response.json b/_api-examples/ledger-clio/jsonrpc-response.json index 03c08937f6..08ad9bfd0e 100644 --- a/_api-examples/ledger-clio/jsonrpc-response.json +++ b/_api-examples/ledger-clio/jsonrpc-response.json @@ -1,21 +1,22 @@ { "result": { - "ledger_hash": "4E2F27F997943EAF522FB0D6AE4B25B1F54FDDE531E0469EF436B18391CFC7D9", - "ledger_index": 82681548, + "ledger_hash": "3787026448652A36491493C1202A443B2A6CC6022599BB0B25DDB0802DD7F1E7", + "ledger_index": 82681623, "validated": true, "ledger": { - "account_hash": "608FCCDB3261FEF57B6EB76C89E3FE11B7C8D198DF443831BABF33D08FC8C12A", + "account_hash": "39D34D858A0FD652143ED84B67A09193772DE0CCEBD2D63619E679293B7A3388", "close_flags": 0, - "close_time": 748569290, - "close_time_human": "2023-Sep-20 23:54:50.000000000 UTC", + "close_time": 748569571, + "close_time_human": "2023-Sep-20 23:59:31.000000000 UTC", "close_time_resolution": 10, - "closed": true, - "ledger_hash": "4E2F27F997943EAF522FB0D6AE4B25B1F54FDDE531E0469EF436B18391CFC7D9", - "ledger_index": "82681548", - "parent_close_time": 748569282, - "parent_hash": "DCECE701AE72CD9E3C1161EC6C98048DFF5797045CD49AD6038BE6D4610EED93", - "total_coins": "99988406204467365", - "transaction_hash": "95491C538DC25D4980AADC5E2ABAB90E1D4E20A02E772EA6A1C514BFC19987E4" + "close_time_iso": "2023-09-20T23:59:31Z", + "ledger_hash": "3787026448652A36491493C1202A443B2A6CC6022599BB0B25DDB0802DD7F1E7", + "parent_close_time": 748569570, + "parent_hash": "674FF6C68956E06CB9628833677C3DD71824C87C0AEFB487984CF98C3964DAEE", + "total_coins": "99988406188847858", + "transaction_hash": "11EE9C448D6B07B88A80B4FC7935B485E513816B3B47D0976CE9F51E7CF10A85", + "ledger_index": 82681623, + "closed": true }, "status": "success" }, @@ -25,4 +26,4 @@ "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request" } ] -} +} \ No newline at end of file diff --git a/_api-examples/ledger-clio/wsrpc-request.json b/_api-examples/ledger-clio/wsrpc-request.json index 1229e0d357..1598695ab3 100644 --- a/_api-examples/ledger-clio/wsrpc-request.json +++ b/_api-examples/ledger-clio/wsrpc-request.json @@ -1,9 +1,9 @@ { - "id": 14, + "id": "example_ledger_req", "command": "ledger", "ledger_index": "validated", "transactions": false, "expand": false, "owner_funds": false, - "diff": false -} + "api_version": 2 +} \ No newline at end of file diff --git a/_api-examples/ledger-clio/wsrpc-response.json b/_api-examples/ledger-clio/wsrpc-response.json index f7897a7863..f1375a59ba 100644 --- a/_api-examples/ledger-clio/wsrpc-response.json +++ b/_api-examples/ledger-clio/wsrpc-response.json @@ -9,15 +9,18 @@ "close_time": 748569571, "close_time_human": "2023-Sep-20 23:59:31.000000000 UTC", "close_time_resolution": 10, - "closed": true, + "close_time_iso": "2023-09-20T23:59:31Z", "ledger_hash": "3787026448652A36491493C1202A443B2A6CC6022599BB0B25DDB0802DD7F1E7", - "ledger_index": "82681623", "parent_close_time": 748569570, "parent_hash": "674FF6C68956E06CB9628833677C3DD71824C87C0AEFB487984CF98C3964DAEE", "total_coins": "99988406188847858", - "transaction_hash": "11EE9C448D6B07B88A80B4FC7935B485E513816B3B47D0976CE9F51E7CF10A85" + "transaction_hash": "11EE9C448D6B07B88A80B4FC7935B485E513816B3B47D0976CE9F51E7CF10A85", + "ledger_index": 82681623, + "closed": true } }, + "id": "example_ledger_req", + "api_version": 2, "status": "success", "type": "response", "warnings": [ @@ -26,4 +29,4 @@ "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request" } ] -} +} \ No newline at end of file diff --git a/docs/references/http-websocket-apis/public-api-methods/clio-methods/ledger-clio.md b/docs/references/http-websocket-apis/public-api-methods/clio-methods/ledger-clio.md index bd2789cda6..da87a0c630 100644 --- a/docs/references/http-websocket-apis/public-api-methods/clio-methods/ledger-clio.md +++ b/docs/references/http-websocket-apis/public-api-methods/clio-methods/ledger-clio.md @@ -69,7 +69,7 @@ An example of a successful response: {% /tab %} {% tab label="JSON-RPC (with diff)" %} -{% code-snippet file="/_api-examples/ledger-clio/jsonrpc-diff-response.json" language="json" /%} +{% code-snippet file="/_api-examples/ledger-clio/jsonrpc-diff-response.json" language="json" prefix="200 OK\n\n" /%} {% /tab %} {% /tabs %} @@ -84,6 +84,7 @@ The response follows the [standard format][], with a successful result containin | `ledger.close_flags` | Integer | A bit-map of [flags relating to the closing of this ledger](../../../protocol/ledger-data/ledger-header.md#close-flags). | | `ledger.close_time` | Integer | The time this ledger was closed, in [seconds since the Ripple Epoch][]. | | `ledger.close_time_human` | String | The time this ledger was closed, in human-readable format. Always uses the UTC time zone. | +| `ledger.close_time_iso` | String | The time this ledger was closed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | | `ledger.close_time_resolution` | Integer | Ledger close times are rounded to within this many seconds. | | `ledger.closed` | Boolean | Whether or not this ledger has been closed. | | `ledger.ledger_hash` | String | Unique identifying hash of the entire ledger. |