1#include <test/jtx/Env.h>
2#include <test/jtx/envconfig.h>
3#include <test/jtx/utility.h>
5#include <xrpld/core/Config.h>
6#include <xrpld/rpc/MethodNames.h>
7#include <xrpld/rpc/RPCCall.h>
8#include <xrpld/rpc/detail/Handler.h>
10#include <xrpl/beast/unit_test/suite.h>
11#include <xrpl/json/json_reader.h>
12#include <xrpl/json/json_value.h>
13#include <xrpl/protocol/ApiVersion.h>
14#include <xrpl/protocol/jss.h>
16#include <boost/algorithm/string/replace.hpp>
77 {
"account_channels: minimal.",
79 {
"account_channels",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
82 "method" : "account_channels",
85 "api_version" : %API_VER%,
86 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
90 {"account_channels: account and ledger hash.",
93 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
94 "rD5MbavGfiSC5m7mkxy1FANuT7s3HxqpoF"},
97 "method" : "account_channels",
100 "api_version" : %API_VER%,
101 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
102 "destination_account" : "rD5MbavGfiSC5m7mkxy1FANuT7s3HxqpoF"
106 {"account_channels: account and ledger index.",
109 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
110 "r9emE59aTWb85t64dAebKrxYMBTpzK5yR7"},
113 "method" : "account_channels",
116 "api_version" : %API_VER%,
117 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
118 "destination_account" : "r9emE59aTWb85t64dAebKrxYMBTpzK5yR7"
122 {"account_channels: two accounts.",
125 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
126 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"},
129 "method" : "account_channels",
132 "api_version" : %API_VER%,
133 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
134 "destination_account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
138 {"account_channels: two accounts and ledger hash.",
141 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
142 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
143 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
146 "method" : "account_channels",
149 "api_version" : %API_VER%,
150 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
151 "destination_account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
152 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
156 {"account_channels: two accounts and ledger index.",
159 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
160 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
164 "method" : "account_channels",
167 "api_version" : %API_VER%,
168 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
169 "destination_account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
170 "ledger_index" : 90210
174 {"account_channels: too few arguments.",
181 "method" : "account_channels",
184 "error" : "badSyntax",
186 "error_message" : "Syntax error."
190 {"account_channels: too many arguments.",
193 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
194 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
199 "method" : "account_channels",
202 "error" : "badSyntax",
204 "error_message" : "Syntax error."
208 {"account_channels: invalid accountID.",
216 "method" : "account_channels",
219 "error" : "actMalformed",
221 "error_message" : "Account malformed."
228 {
"account_currencies: minimal 1.",
230 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
233 "method" : "account_currencies",
236 "api_version" : %API_VER%,
237 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
241 {"account_currencies: minimal 2.",
243 {
"account_currencies",
"racb4o3DrdYxuCfyVa6vsLb7vgju9RFbBr"},
246 "method" : "account_currencies",
249 "api_version" : %API_VER%,
250 "account" : "racb4o3DrdYxuCfyVa6vsLb7vgju9RFbBr"
254 {"account_currencies: ledger index.",
256 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"42"},
259 "method" : "account_currencies",
262 "api_version" : %API_VER%,
263 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
268 {"account_currencies: validated ledger.",
270 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
273 "method" : "account_currencies",
276 "api_version" : %API_VER%,
277 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
278 "ledger_index" : "validated"
282 {"account_currencies: current ledger.",
284 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current"},
287 "method" : "account_currencies",
290 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
291 "api_version" : %API_VER%,
292 "ledger_index" : "current"
296 {"account_currencies: too few arguments.",
299 "account_currencies",
303 "method" : "account_currencies",
306 "error" : "badSyntax",
308 "error_message" : "Syntax error."
312 {"account_currencies: too many arguments.",
314 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current",
"spare1",
"spare2"},
317 "method" : "account_currencies",
320 "error" : "badSyntax",
322 "error_message" : "Syntax error."
326 {"account_currencies: invalid second argument.",
328 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"yup"},
331 "method" : "account_currencies",
334 "api_version" : %API_VER%,
335 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
341 "account_currencies: invalid accountID.",
344 "account_currencies",
349 "method" : "account_currencies",
352 "error" : "actMalformed",
354 "error_message" : "Account malformed."
362 {
"account_info: minimal.",
364 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
367 "method" : "account_info",
370 "api_version" : %API_VER%,
371 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
375 {"account_info: with numeric ledger index.",
377 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"77777"},
380 "method" : "account_info",
383 "api_version" : %API_VER%,
384 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
385 "ledger_index" : 77777
389 {"account_info: with text ledger index.",
391 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"closed"},
394 "method" : "account_info",
397 "api_version" : %API_VER%,
398 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
399 "ledger_index" : "closed"
403 {"account_info: with ledger hash.",
406 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
407 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
410 "method" : "account_info",
413 "api_version" : %API_VER%,
414 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
415 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
419 {"account_info: with ledger index.",
421 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
424 "method" : "account_info",
427 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
428 "api_version" : %API_VER%,
429 "ledger_index" : "validated"
433 {"account_info: too few arguments.",
440 "method" : "account_info",
443 "error" : "badSyntax",
445 "error_message" : "Syntax error."
449 {"account_info: too many arguments.",
451 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current",
"extra1",
"extra2"},
454 "method" : "account_info",
457 "error" : "badSyntax",
459 "error_message" : "Syntax error."
464 "account_info: invalid accountID.",
472 "method" : "account_info",
475 "error" : "actMalformed",
477 "error_message" : "Account malformed."
485 {
"account_lines: minimal.",
487 {
"account_lines",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
490 "method" : "account_lines",
493 "api_version" : %API_VER%,
494 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
498 {"account_lines: peer.",
500 {
"account_lines",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"},
503 "method" : "account_lines",
506 "api_version" : %API_VER%,
507 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
508 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
512 {"account_lines: peer and numeric ledger index.",
515 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
516 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
520 "method" : "account_lines",
523 "api_version" : %API_VER%,
524 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
525 "ledger_index" : 888888888,
526 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
530 {"account_lines: peer and text ledger index.",
533 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
534 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
538 "method" : "account_lines",
541 "api_version" : %API_VER%,
542 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
543 "ledger_index" : "closed",
544 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
548 {"account_lines: peer and ledger hash.",
551 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
552 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
553 "FFFFEEEEDDDDCCCCBBBBAAAA9999888877776666555544443333222211110000"},
556 "method" : "account_lines",
559 "api_version" : %API_VER%,
560 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
561 "ledger_hash" : "FFFFEEEEDDDDCCCCBBBBAAAA9999888877776666555544443333222211110000",
562 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
566 {"account_lines: too few arguments.",
573 "method" : "account_lines",
576 "error" : "badSyntax",
578 "error_message" : "Syntax error."
583 "account_lines: four arguments.",
586 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
587 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
592 "method" : "account_lines",
595 "api_version" : %API_VER%,
596 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
597 "ledger_index" : 12345678,
598 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
603 "account_lines: five arguments.",
606 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
607 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
610 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
613 "method" : "account_lines",
616 "api_version" : %API_VER%,
617 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
618 "ledger_index" : 12345678,
619 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
623 {"account_lines: too many arguments.",
626 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
627 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
630 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
634 "method" : "account_lines",
637 "error" : "badSyntax",
639 "error_message" : "Syntax error."
644 "account_lines: first invalid accountID.",
652 "method" : "account_lines",
655 "error" : "actMalformed",
657 "error_message" : "Account malformed."
663 "account_lines: second invalid accountID.",
667 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
672 "method" : "account_lines",
675 "api_version" : %API_VER%,
676 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
682 "account_lines: invalid ledger selector.",
685 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
686 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
690 "method" : "account_lines",
693 "api_version" : %API_VER%,
694 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
696 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
704 {
"account_objects: minimal.",
706 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
709 "method" : "account_objects",
712 "api_version" : %API_VER%,
713 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
717 {"account_objects: with numeric ledger index.",
719 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"77777"},
722 "method" : "account_objects",
725 "api_version" : %API_VER%,
726 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
727 "ledger_index" : 77777
731 {"account_objects: with text ledger index.",
733 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"closed"},
736 "method" : "account_objects",
739 "api_version" : %API_VER%,
740 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
741 "ledger_index" : "closed"
745 {"account_objects: with ledger hash.",
748 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
749 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
752 "method" : "account_objects",
755 "api_version" : %API_VER%,
756 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
757 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
761 {"account_objects: with ledger index.",
763 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
766 "method" : "account_objects",
769 "api_version" : %API_VER%,
770 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
771 "ledger_index" : "validated"
775 {"account_objects: too few arguments.",
782 "method" : "account_objects",
785 "error" : "badSyntax",
787 "error_message" : "Syntax error."
792 "account_objects: four arguments.",
796 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
803 "method" : "account_objects",
806 "api_version" : %API_VER%,
807 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
812 "account_objects: five arguments.",
816 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
824 "method" : "account_objects",
827 "api_version" : %API_VER%,
828 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
832 {"account_objects: too many arguments.",
836 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
845 "method" : "account_objects",
848 "error" : "badSyntax",
850 "error_message" : "Syntax error."
855 "account_objects: invalid accountID.",
863 "method" : "account_objects",
866 "error" : "actMalformed",
868 "error_message" : "Account malformed."
876 "account_objects: invalid ledger selection 1.",
878 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
881 "method" : "account_objects",
884 "api_version" : %API_VER%,
885 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
894 "account_objects: invalid ledger selection 2.",
896 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
899 "method" : "account_objects",
902 "api_version" : %API_VER%,
903 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
912 {
"account_offers: minimal.",
914 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
917 "method" : "account_offers",
920 "api_version" : %API_VER%,
921 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
925 {"account_offers: with numeric ledger index.",
927 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"987654321"},
930 "method" : "account_offers",
933 "api_version" : %API_VER%,
934 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
935 "ledger_index" : 987654321
939 {"account_offers: with text ledger index.",
941 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
944 "method" : "account_offers",
947 "api_version" : %API_VER%,
948 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
949 "ledger_index" : "validated"
953 {"account_offers: with ledger hash.",
956 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
957 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
960 "method" : "account_offers",
963 "api_version" : %API_VER%,
964 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
965 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
969 {"account_offers: with ledger index.",
971 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
974 "method" : "account_offers",
977 "api_version" : %API_VER%,
978 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
979 "ledger_index" : "validated"
983 {"account_offers: too few arguments.",
990 "method" : "account_offers",
993 "error" : "badSyntax",
995 "error_message" : "Syntax error."
1000 "account_offers: four arguments.",
1002 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current",
"extra"},
1005 "method" : "account_offers",
1008 "api_version" : %API_VER%,
1009 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1013 {"account_offers: too many arguments.",
1017 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1025 "method" : "account_offers",
1028 "error" : "badSyntax",
1030 "error_message" : "Syntax error."
1035 "account_offers: invalid accountID.",
1043 "method" : "account_offers",
1046 "error" : "actMalformed",
1048 "error_message" : "Account malformed."
1056 "account_offers: invalid ledger selection 1.",
1058 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
1061 "method" : "account_offers",
1064 "api_version" : %API_VER%,
1065 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1074 "account_offers: invalid ledger selection 2.",
1076 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
1079 "method" : "account_offers",
1082 "api_version" : %API_VER%,
1083 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1092 {
"account_tx: minimal.",
1094 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
1097 "method" : "account_tx",
1100 "api_version" : %API_VER%,
1101 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1105 {"account_tx: ledger_index .",
1107 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"444"},
1110 "method" : "account_tx",
1113 "api_version" : %API_VER%,
1114 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1115 "ledger_index" : 444
1119 {"account_tx: ledger_index plus trailing params.",
1121 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"707",
"descending",
"binary",
"count"},
1124 "method" : "account_tx",
1127 "api_version" : %API_VER%,
1128 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1131 "descending" : true,
1132 "ledger_index" : 707
1136 {"account_tx: ledger_index_min and _max.",
1138 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"-1"},
1141 "method" : "account_tx",
1144 "api_version" : %API_VER%,
1145 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1146 "ledger_index_max" : -1,
1147 "ledger_index_min" : -1
1151 {"account_tx: ledger_index_min and _max plus trailing params.",
1154 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1162 "method" : "account_tx",
1165 "api_version" : %API_VER%,
1166 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1169 "descending" : true,
1170 "ledger_index_max" : 413,
1171 "ledger_index_min" : -1
1175 {"account_tx: ledger_index_min and _max plus limit.",
1177 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"247",
"-1",
"300"},
1180 "method" : "account_tx",
1183 "api_version" : %API_VER%,
1184 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1185 "ledger_index_max" : -1,
1186 "ledger_index_min" : 247,
1191 {"account_tx: ledger_index_min and _max, limit, trailing args.",
1194 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1203 "method" : "account_tx",
1206 "api_version" : %API_VER%,
1207 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1210 "descending" : true,
1211 "ledger_index_max" : -1,
1212 "ledger_index_min" : 247,
1217 {"account_tx: ledger_index_min and _max plus limit and offset.",
1219 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"589",
"590",
"67",
"45"},
1222 "method" : "account_tx",
1225 "api_version" : %API_VER%,
1226 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1227 "ledger_index_max" : 590,
1228 "ledger_index_min" : 589,
1234 {"account_tx: ledger_index_min and _max, limit, offset, trailing.",
1237 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1246 "method" : "account_tx",
1249 "api_version" : %API_VER%,
1250 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1252 "descending" : true,
1253 "ledger_index_max" : 590,
1254 "ledger_index_min" : 589,
1260 {"account_tx: too few arguments.",
1267 "method" : "account_tx",
1270 "error" : "badSyntax",
1272 "error_message" : "Syntax error."
1276 {"account_tx: too many arguments.",
1279 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1290 "method" : "account_tx",
1293 "error" : "badSyntax",
1295 "error_message" : "Syntax error."
1300 "account_tx: invalid accountID.",
1302 {
"account_tx",
"rHb9CJAWyB4rj9!VRWn96DkukG4bwdtyTh"},
1305 "method" : "account_tx",
1308 "error" : "actMalformed",
1310 "error_message" : "Account malformed."
1317 "account_tx: invalid ledger.",
1319 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-478.7"},
1322 "method" : "account_tx",
1325 "api_version" : %API_VER%,
1326 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1333 "account_tx: max less than min.",
1335 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"580",
"579"},
1339 "method" : "account_tx",
1342 "error" : "lgrIdxsInvalid",
1344 "error_message" : "Ledger indexes invalid."
1349 "method" : "account_tx",
1352 "error" : "notSynced",
1354 "error_message" : "Not synced to the network."
1361 "account_tx: non-integer min.",
1363 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Binary",
"-1"},
1369 "account_tx: non-integer max.",
1371 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"counts"},
1377 "account_tx: non-integer offset.",
1379 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"-1",
"decending"},
1385 "account_tx: non-integer limit.",
1387 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"-1",
"300",
"false"},
1392 "account_tx: RIPD-1570.",
1395 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1407 {
"book_offers: minimal no issuer.",
1416 "method" : "book_offers",
1419 "api_version" : %API_VER%,
1429 {"book_offers: minimal with currency/issuer",
1433 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1434 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1438 "method" : "book_offers",
1441 "api_version" : %API_VER%,
1444 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1448 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1455 "book_offers: add issuer.",
1457 {
"book_offers",
"USD",
"EUR",
"rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"},
1460 "method" : "book_offers",
1463 "api_version" : %API_VER%,
1464 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1474 {"book_offers: add issuer and numeric ledger index.",
1477 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1479 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1483 "method" : "book_offers",
1486 "api_version" : %API_VER%,
1487 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1488 "ledger_index" : 666,
1494 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1499 {"book_offers: add issuer and text ledger index.",
1503 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1504 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1508 "method" : "book_offers",
1511 "api_version" : %API_VER%,
1512 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1513 "ledger_index" : "current",
1516 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1524 {"book_offers: add issuer and ledger hash.",
1527 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1528 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1529 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1530 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
1533 "method" : "book_offers",
1536 "api_version" : %API_VER%,
1537 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1538 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1541 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1545 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1550 {"book_offers: issuer, ledger hash, and limit.",
1554 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1555 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1556 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1557 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1562 "method" : "book_offers",
1565 "api_version" : %API_VER%,
1566 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1567 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1571 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1575 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1581 "book_offers: issuer, ledger hash, limit, and marker.",
1584 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1585 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1586 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1587 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1593 "method" : "book_offers",
1596 "api_version" : %API_VER%,
1597 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1598 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1600 "marker" : "MyMarker",
1603 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1607 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1612 {"book_offers: too few arguments.",
1619 "method" : "book_offers",
1622 "error" : "badSyntax",
1624 "error_message" : "Syntax error."
1628 {"book_offers: too many arguments.",
1631 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1632 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1633 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1634 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1641 "method" : "book_offers",
1644 "error" : "badSyntax",
1646 "error_message" : "Syntax error."
1651 {"book_offers: taker pays no currency.",
1655 "/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1656 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1660 "method" : "book_offers",
1663 "error" : "invalidParams",
1665 "error_message" : "Invalid currency/issuer '/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh'"
1669 {"book_offers: taker gets no currency.",
1673 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1674 "/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1678 "method" : "book_offers",
1681 "error" : "invalidParams",
1683 "error_message" : "Invalid currency/issuer '/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA'"
1687 {"book_offers: invalid issuer.",
1689 {
"book_offers",
"USD",
"EUR",
"not_a_valid_issuer"},
1692 "method" : "book_offers",
1695 "api_version" : %API_VER%,
1696 "issuer" : "not_a_valid_issuer",
1706 {"book_offers: invalid text ledger index.",
1710 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1711 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1715 "method" : "book_offers",
1718 "api_version" : %API_VER%,
1719 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1723 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1732 "book_offers: non-numeric limit.",
1736 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1737 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1738 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1739 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1744 "method" : "book_offers",
1747 "error" : "invalidParams",
1749 "error_message" : "Invalid field 'limit'."
1756 {
"can_delete: minimal.",
1763 "method" : "can_delete",
1766 "api_version" : %API_VER%,
1770 {"can_delete: ledger index.",
1778 "method" : "can_delete",
1781 "api_version" : %API_VER%,
1782 "can_delete" : 4294967295
1786 {"can_delete: ledger hash.",
1790 "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210",
1794 "method" : "can_delete",
1797 "api_version" : %API_VER%,
1798 "can_delete" : "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210"
1802 {"can_delete: always.",
1810 "method" : "can_delete",
1813 "api_version" : %API_VER%,
1814 "can_delete" : "always"
1818 {"can_delete: never.",
1826 "method" : "can_delete",
1829 "api_version" : %API_VER%,
1830 "can_delete" : "never"
1834 {"can_delete: now.",
1842 "method" : "can_delete",
1845 "api_version" : %API_VER%,
1846 "can_delete" : "now"
1850 {"can_delete: too many arguments.",
1852 {
"can_delete",
"always",
"never"},
1855 "method" : "can_delete",
1858 "error" : "badSyntax",
1860 "error_message" : "Syntax error."
1864 {"can_delete: invalid argument.",
1866 {
"can_delete",
"invalid"},
1869 "method" : "can_delete",
1872 "api_version" : %API_VER%,
1873 "can_delete" : "invalid"
1878 "can_delete: ledger index > 32 bits.",
1887 "can_delete: ledger hash with no alphas.",
1891 "0123456701234567012345670123456701234567012345670123456701234567",
1898 {
"channel_authorize: minimal.",
1900 {
"channel_authorize",
1901 "secret_can_be_anything",
1902 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1903 "18446744073709551615"},
1906 "method" : "channel_authorize",
1909 "api_version" : %API_VER%,
1910 "amount" : "18446744073709551615",
1911 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1912 "secret" : "secret_can_be_anything"
1916 {"channel_authorize: too few arguments.",
1919 "channel_authorize",
1920 "secret_can_be_anything",
1921 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1925 "method" : "channel_authorize",
1928 "error" : "badSyntax",
1930 "error_message" : "Syntax error."
1934 {"channel_authorize: too many arguments.",
1936 {
"channel_authorize",
1938 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1944 "method" : "channel_authorize",
1947 "error" : "badSyntax",
1949 "error_message" : "Syntax error."
1953 {"channel_authorize: bad key type.",
1955 {
"channel_authorize",
1957 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1962 "method" : "channel_authorize",
1965 "error" : "badKeyType",
1967 "error_message" : "Bad key type."
1971 {"channel_authorize: channel_id too short.",
1973 {
"channel_authorize",
1974 "secret_can_be_anything",
1975 "123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1979 "method" : "channel_authorize",
1982 "error" : "channelMalformed",
1984 "error_message" : "Payment channel is malformed."
1988 {"channel_authorize: channel_id too long.",
1990 {
"channel_authorize",
1991 "secret_can_be_anything",
1992 "10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1996 "method" : "channel_authorize",
1999 "error" : "channelMalformed",
2001 "error_message" : "Payment channel is malformed."
2005 {"channel_authorize: channel_id not hex.",
2007 {
"channel_authorize",
2008 "secret_can_be_anything",
2009 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEZ",
2013 "method" : "channel_authorize",
2016 "error" : "channelMalformed",
2018 "error_message" : "Payment channel is malformed."
2022 {"channel_authorize: negative amount.",
2024 {
"channel_authorize",
2025 "secret_can_be_anything",
2026 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2030 "method" : "channel_authorize",
2033 "error" : "channelAmtMalformed",
2035 "error_message" : "Payment channel amount is malformed."
2039 {"channel_authorize: amount > 64 bits.",
2041 {
"channel_authorize",
2042 "secret_can_be_anything",
2043 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2044 "18446744073709551616"},
2047 "method" : "channel_authorize",
2050 "error" : "channelAmtMalformed",
2052 "error_message" : "Payment channel amount is malformed."
2059 {
"channel_verify: public key.",
2062 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2063 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2068 "method" : "channel_verify",
2071 "api_version" : %API_VER%,
2073 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2074 "public_key" : "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2075 "signature" : "DEADBEEF"
2079 {"channel_verify: public key hex.",
2082 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2083 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2084 "18446744073709551615",
2088 "method" : "channel_verify",
2091 "api_version" : %API_VER%,
2092 "amount" : "18446744073709551615",
2093 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2094 "public_key" : "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2095 "signature" : "DEADBEEF"
2099 {"channel_verify: too few arguments.",
2102 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2103 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
2106 "method" : "channel_verify",
2109 "error" : "badSyntax",
2111 "error_message" : "Syntax error."
2115 {"channel_verify: too many arguments.",
2118 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2119 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2125 "method" : "channel_verify",
2128 "error" : "badSyntax",
2130 "error_message" : "Syntax error."
2134 {"channel_verify: malformed public key.",
2137 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9GoV",
2138 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2143 "method" : "channel_verify",
2146 "error" : "publicMalformed",
2148 "error_message" : "Public key is malformed."
2152 {"channel_verify: malformed hex public key.",
2155 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F",
2156 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2161 "method" : "channel_verify",
2164 "error" : "publicMalformed",
2166 "error_message" : "Public key is malformed."
2170 {"channel_verify: invalid channel id.",
2173 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2174 "10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2179 "method" : "channel_verify",
2182 "error" : "channelMalformed",
2184 "error_message" : "Payment channel is malformed."
2188 {"channel_verify: short channel id.",
2191 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2192 "123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2197 "method" : "channel_verify",
2200 "error" : "channelMalformed",
2202 "error_message" : "Payment channel is malformed."
2206 {"channel_verify: amount too small.",
2209 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2210 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2215 "method" : "channel_verify",
2218 "error" : "channelAmtMalformed",
2220 "error_message" : "Payment channel amount is malformed."
2224 {"channel_verify: amount too large.",
2227 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2228 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2229 "18446744073709551616",
2233 "method" : "channel_verify",
2236 "error" : "channelAmtMalformed",
2238 "error_message" : "Payment channel amount is malformed."
2242 {"channel_verify: non-hex signature.",
2245 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2246 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2248 "ThisIsNotHexadecimal"},
2251 "method" : "channel_verify",
2254 "api_version" : %API_VER%,
2255 "amount" : "40000000",
2256 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2257 "public_key" : "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2258 "signature" : "ThisIsNotHexadecimal"
2265 {
"connect: minimal.",
2269 "ThereIsNoCheckingOnTheIPFormat",
2273 "method" : "connect",
2276 "api_version" : %API_VER%,
2277 "ip" : "ThereIsNoCheckingOnTheIPFormat"
2281 {"connect: ip and port.",
2283 {
"connect",
"ThereIsNoCheckingOnTheIPFormat",
"6561"},
2286 "method" : "connect",
2289 "api_version" : %API_VER%,
2290 "ip" : "ThereIsNoCheckingOnTheIPFormat",
2295 {"connect: too few arguments.",
2302 "method" : "connect",
2305 "error" : "badSyntax",
2307 "error_message" : "Syntax error."
2311 {"connect: too many arguments.",
2313 {
"connect",
"ThereIsNoCheckingOnTheIPFormat",
"6561",
"extra"},
2316 "method" : "connect",
2319 "error" : "badSyntax",
2321 "error_message" : "Syntax error."
2326 "connect: port too small.",
2330 "ThereIsNoCheckingOnTheIPFormat",
2336 "connect: port too large.",
2340 "ThereIsNoCheckingOnTheIPFormat",
2348 {
"consensus_info: minimal.",
2355 "method" : "consensus_info",
2358 "api_version" : %API_VER%
2362 {"consensus_info: too many arguments.",
2364 {
"consensus_info",
"whatever"},
2367 "method" : "consensus_info",
2370 "error" : "badSyntax",
2372 "error_message" : "Syntax error."
2379 {
"deposit_authorized: minimal.",
2382 "deposit_authorized",
2383 "source_account_NotValidated",
2384 "destination_account_NotValidated",
2388 "method" : "deposit_authorized",
2391 "api_version" : %API_VER%,
2392 "destination_account" : "destination_account_NotValidated",
2393 "source_account" : "source_account_NotValidated"
2397 {"deposit_authorized: with text ledger index.",
2399 {
"deposit_authorized",
2400 "source_account_NotValidated",
2401 "destination_account_NotValidated",
2405 "method" : "deposit_authorized",
2408 "api_version" : %API_VER%,
2409 "destination_account" : "destination_account_NotValidated",
2410 "ledger_index" : "validated",
2411 "source_account" : "source_account_NotValidated"
2415 {"deposit_authorized: with ledger index.",
2417 {
"deposit_authorized",
2418 "source_account_NotValidated",
2419 "destination_account_NotValidated",
2431 "method" : "deposit_authorized",
2434 "api_version" : %API_VER%,
2435 "destination_account" : "destination_account_NotValidated",
2436 "ledger_index" : 4294967295,
2437 "source_account" : "source_account_NotValidated",
2438 "credentials": ["cred1", "cred2", "cred3", "cred4", "cred5", "cred6", "cred7", "cred8"]
2442 {"deposit_authorized: with ledger hash.",
2444 {
"deposit_authorized",
2445 "source_account_NotValidated",
2446 "destination_account_NotValidated",
2447 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
2450 "method" : "deposit_authorized",
2453 "api_version" : %API_VER%,
2454 "destination_account" : "destination_account_NotValidated",
2455 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
2456 "source_account" : "source_account_NotValidated"
2460 {"deposit_authorized: too few arguments.",
2463 "deposit_authorized",
2464 "source_account_NotValidated",
2468 "method" : "deposit_authorized",
2471 "error" : "badSyntax",
2473 "error_message" : "Syntax error."
2477 {"deposit_authorized: too many arguments.",
2479 {
"deposit_authorized",
2480 "source_account_NotValidated",
2481 "destination_account_NotValidated",
2482 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
2494 "method" : "deposit_authorized",
2497 "error" : "badSyntax",
2499 "error_message" : "Syntax error."
2503 {"deposit_authorized: invalid ledger selection.",
2506 "deposit_authorized",
2507 "source_account_NotValidated",
2508 "destination_account_NotValidated",
2513 "method" : "deposit_authorized",
2516 "api_version" : %API_VER%,
2517 "destination_account" : "destination_account_NotValidated",
2519 "source_account" : "source_account_NotValidated"
2526 {
"feature: minimal.",
2533 "method" : "feature",
2536 "api_version" : %API_VER%,
2540 {"feature: with name.",
2542 {
"feature",
"featureNameOrHexIsNotValidated"},
2545 "method" : "feature",
2548 "api_version" : %API_VER%,
2549 "feature" : "featureNameOrHexIsNotValidated"
2553 {"feature: accept.",
2556 "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA98"
2561 "method" : "feature",
2564 "api_version" : %API_VER%,
2565 "feature" : "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210",
2570 {"feature: reject.",
2572 {
"feature",
"0",
"reject"},
2575 "method" : "feature",
2578 "api_version" : %API_VER%,
2584 {"feature: too many arguments.",
2586 {
"feature",
"featureNameOrHexIsNotValidated",
"accept",
"anotherArg"},
2589 "method" : "feature",
2592 "error" : "badSyntax",
2594 "error_message" : "Syntax error."
2598 {"feature: neither accept nor reject.",
2602 "featureNameOrHexIsNotValidated",
2607 "method" : "feature",
2610 "error" : "invalidParams",
2612 "error_message" : "Invalid parameters."
2619 {
"fetch_info: minimal.",
2626 "method" : "fetch_info",
2629 "api_version" : %API_VER%,
2633 {"fetch_info: clear.",
2635 {
"fetch_info",
"clear"},
2638 "method" : "fetch_info",
2641 "api_version" : %API_VER%,
2646 {"fetch_info: too many arguments.",
2648 {
"fetch_info",
"clear",
"other"},
2651 "method" : "fetch_info",
2654 "error" : "badSyntax",
2656 "error_message" : "Syntax error."
2660 {"fetch_info: other trailing argument.",
2662 {
"fetch_info",
"too"},
2665 "method" : "fetch_info",
2668 "api_version" : %API_VER%,
2676 {
"gateway_balances: minimal.",
2678 {
"gateway_balances",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2681 "method" : "gateway_balances",
2684 "api_version" : %API_VER%,
2685 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2689 {"gateway_balances: with ledger index.",
2691 {
"gateway_balances",
"890765",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2694 "method" : "gateway_balances",
2697 "api_version" : %API_VER%,
2698 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2699 "ledger_index" : "890765"
2703 {"gateway_balances: with text ledger index.",
2705 {
"gateway_balances",
"current",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2708 "method" : "gateway_balances",
2711 "api_version" : %API_VER%,
2712 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2713 "ledger_index" : "current"
2717 {"gateway_balances: with 64 character ledger hash.",
2719 {
"gateway_balances",
2720 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
2721 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2724 "method" : "gateway_balances",
2727 "api_version" : %API_VER%,
2728 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2729 "ledger_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
2733 {"gateway_balances: 1 hotwallet.",
2735 {
"gateway_balances",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"hotwallet_is_not_validated"},
2738 "method" : "gateway_balances",
2741 "api_version" : %API_VER%,
2742 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2743 "hotwallet" : [ "hotwallet_is_not_validated" ]
2747 {"gateway_balances: 3 hotwallets.",
2751 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
2752 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2753 "hotwallet_is_not_validated_1",
2754 "hotwallet_is_not_validated_2",
2755 "hotwallet_is_not_validated_3",
2759 "method" : "gateway_balances",
2762 "api_version" : %API_VER%,
2763 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2765 "hotwallet_is_not_validated_1",
2766 "hotwallet_is_not_validated_2",
2767 "hotwallet_is_not_validated_3"
2769 "ledger_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
2773 {"gateway_balances: too few arguments.",
2780 "method" : "gateway_balances",
2783 "error" : "badSyntax",
2785 "error_message" : "Syntax error."
2789 {"gateway_balances: empty first argument.",
2791 {
"gateway_balances",
""},
2794 "method" : "gateway_balances",
2797 "error" : "invalidParams",
2799 "error_message" : "Invalid first parameter"
2803 {"gateway_balances: with ledger index but no gateway.",
2811 "method" : "gateway_balances",
2814 "error" : "invalidParams",
2816 "error_message" : "Invalid hotwallet"
2820 {"gateway_balances: with text ledger index but no gateway.",
2828 "method" : "gateway_balances",
2831 "error" : "invalidParams",
2833 "error_message" : "Invalid hotwallet"
2837 {"gateway_balances: with 64 character ledger hash but no gateway.",
2841 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
2845 "method" : "gateway_balances",
2848 "error" : "invalidParams",
2850 "error_message" : "Invalid hotwallet"
2857 {
"get_counts: minimal.",
2864 "method" : "get_counts",
2867 "api_version" : %API_VER%,
2871 {"get_counts: with maximum count.",
2873 {
"get_counts",
"100"},
2876 "method" : "get_counts",
2879 "api_version" : %API_VER%,
2884 {"get_counts: too many arguments.",
2886 {
"get_counts",
"100",
"whatever"},
2889 "method" : "get_counts",
2892 "error" : "badSyntax",
2894 "error_message" : "Syntax error."
2898 {"get_counts: count too small.",
2906 {"get_counts: count too large.",
2908 {
"get_counts",
"4294967296"},
2919 R
"({"json_argument":true})",
2923 "method" : "command",
2926 "api_version" : %API_VER%,
2927 "json_argument" : true,
2928 "method" : "command"
2932 {"json: null object.",
2941 "method" : "command",
2944 "api_version" : %API_VER%,
2945 "method" : "command"
2949 {"json: too few arguments.",
2951 {
"json",
"command"},
2957 "error" : "badSyntax",
2959 "error_message" : "Syntax error."
2963 {"json: too many arguments.",
2965 {
"json",
"command", R
"({"json_argument":true})", "extra"},
2971 "error" : "badSyntax",
2973 "error_message" : "Syntax error."
2977 {"json: array, not object.",
2982 R
"(["arg1","arg2"])",
2989 "error" : "invalidParams",
2991 "error_message" : "Invalid parameters."
2995 {"json: invalid json (note closing comma).",
3000 R
"({"json_argument":true,})",
3007 "error" : "invalidParams",
3009 "error_message" : "Invalid parameters."
3016 {
"json2: minimal object.",
3020 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1"})",
3026 "method" : "call_1",
3029 "api_version" : %API_VER%,
3032 "method" : "call_1",
3038 {"json2: object with nested params.",
3044 "ripplerpc" : "2.0",
3046 "method" : "call_1",
3047 "params" : [{"inner_arg" : "yup"}]
3054 "method" : "call_1",
3057 "api_version" : %API_VER%,
3063 "method" : "call_1",
3069 {"json2: minimal array.",
3073 R
"([{"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1"}])",
3081 "api_version" : %API_VER%,
3084 "method" : "call_1",
3090 {"json2: array with object with nested params.",
3099 "params" : [{"inner_arg" : "yup"}]}
3108 "api_version" : %API_VER%,
3114 "method" : "call_1",
3119 {"json2: too few arguments.",
3129 "error" : "badSyntax",
3131 "error_message" : "Syntax error."
3135 {"json2: too many arguments.",
3137 {
"json2", R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_this"})", "extra"},
3143 "error" : "badSyntax",
3145 "error_message" : "Syntax error."
3149 {"json2: malformed json (note extra comma).",
3153 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1",})",
3162 "error" : "invalidParams",
3164 "error_message" : "Invalid parameters.",
3172 {"json2: omit jsonrpc.",
3176 R
"({"ripplerpc":"2.0","id":"A1","method":"call_1"})",
3184 "error" : "invalidParams",
3186 "error_message" : "Invalid parameters.",
3193 {"json2: wrong jsonrpc version.",
3197 R
"({"jsonrpc":"2.1","ripplerpc":"2.0","id":"A1","method":"call_1"})",
3206 "error" : "invalidParams",
3208 "error_message" : "Invalid parameters.",
3216 {"json2: omit ripplerpc.",
3220 R
"({"jsonrpc":"2.0","id":"A1","method":"call_1"})",
3229 "error" : "invalidParams",
3231 "error_message" : "Invalid parameters.",
3237 {"json2: wrong ripplerpc version.",
3241 R
"({"jsonrpc":"2.0","ripplerpc":"2.00","id":"A1","method":"call_1"})",
3250 "error" : "invalidParams",
3252 "error_message" : "Invalid parameters.",
3255 "ripplerpc" : "2.00"
3258 "ripplerpc" : "2.00"
3264 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","method":"call_1"})",
3272 "error" : "invalidParams",
3274 "error_message" : "Invalid parameters.",
3281 {"json2: omit method.",
3285 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1"})",
3294 "error" : "invalidParams",
3296 "error_message" : "Invalid parameters.",
3304 {"json2: empty outer array.",
3315 "error" : "invalidParams",
3317 "error_message" : "Invalid parameters."
3321 {"json2: empty inner array.",
3325 R
"([{"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1",[]}])",
3332 "error" : "invalidParams",
3334 "error_message" : "Invalid parameters."
3338 {"json2: array with non-json2 object.",
3344 "ripplerpc" : "2.0",
3355 "error" : "invalidParams",
3357 "error_message" : "Invalid parameters."
3361 {"json2: non-object or -array inner params member.",
3367 "ripplerpc" : "2.0",
3369 "method" : "call_1",
3380 "error" : "invalidParams",
3382 "error_message" : "Invalid parameters.",
3393 {
"ledger: minimal.",
3398 "method" : "ledger",
3401 "api_version" : %API_VER%,
3405 {"ledger: ledger index.",
3407 {
"ledger",
"4294967295"},
3410 "method" : "ledger",
3413 "api_version" : %API_VER%,
3414 "ledger_index" : 4294967295
3418 {"ledger: text ledger index.",
3420 {
"ledger",
"validated"},
3423 "method" : "ledger",
3426 "api_version" : %API_VER%,
3427 "ledger_index" : "validated"
3431 {"ledger: ledger hash.",
3433 {
"ledger",
"ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
3436 "method" : "ledger",
3439 "api_version" : %API_VER%,
3440 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"
3446 {
"ledger",
"current",
"full"},
3449 "method" : "ledger",
3452 "api_version" : %API_VER%,
3454 "ledger_index" : "current"
3460 {
"ledger",
"closed",
"tx"},
3463 "method" : "ledger",
3466 "api_version" : %API_VER%,
3468 "ledger_index" : "closed",
3469 "transactions" : true
3473 {"ledger: too many arguments.",
3475 {
"ledger",
"4294967295",
"spare"},
3478 "method" : "ledger",
3481 "api_version" : %API_VER%,
3482 "ledger_index" : 4294967295
3486 {"ledger: ledger index too small.",
3491 "method" : "ledger",
3494 "api_version" : %API_VER%,
3499 {"ledger: ledger index too big.",
3501 {
"ledger",
"4294967296"},
3504 "method" : "ledger",
3507 "api_version" : %API_VER%,
3512 {"ledger: invalid ledger text.",
3514 {
"ledger",
"latest"},
3517 "method" : "ledger",
3520 "api_version" : %API_VER%,
3525 {"ledger: unsupported final argument.",
3527 {
"ledger",
"current",
"expand"},
3530 "method" : "ledger",
3533 "api_version" : %API_VER%,
3534 "ledger_index" : "current"
3541 {
"ledger_closed: minimal.",
3546 "method" : "ledger_closed",
3549 "api_version" : %API_VER%,
3553 {"ledger_closed: too many arguments.",
3555 {
"ledger_closed",
"today"},
3558 "method" : "ledger_closed",
3561 "error" : "badSyntax",
3563 "error_message" : "Syntax error."
3570 {
"ledger_current: minimal.",
3575 "method" : "ledger_current",
3578 "api_version" : %API_VER%,
3582 {"ledger_current: too many arguments.",
3584 {
"ledger_current",
"today"},
3587 "method" : "ledger_current",
3590 "error" : "badSyntax",
3592 "error_message" : "Syntax error."
3599 {
"ledger_header: ledger index.",
3601 {
"ledger_header",
"4294967295"},
3604 "method" : "ledger_header",
3607 "api_version" : %API_VER%,
3608 "ledger_index" : 4294967295
3612 {"ledger_header: ledger hash.",
3614 {
"ledger_header",
"ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
3617 "method" : "ledger_header",
3620 "api_version" : %API_VER%,
3621 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"
3625 {"ledger_header: too few arguments.",
3632 "method" : "ledger_header",
3635 "error" : "badSyntax",
3637 "error_message" : "Syntax error."
3641 {"ledger_header: too many arguments.",
3643 {
"ledger_header",
"4294967295",
"spare"},
3646 "method" : "ledger_header",
3649 "error" : "badSyntax",
3651 "error_message" : "Syntax error."
3655 {"ledger_header: text ledger index.",
3657 {
"ledger_header",
"current"},
3660 "method" : "ledger_header",
3663 "api_version" : %API_VER%,
3668 {"ledger_header: ledger index too small.",
3670 {
"ledger_header",
"-1"},
3673 "method" : "ledger_header",
3676 "api_version" : %API_VER%,
3681 {"ledger_header: ledger index too big.",
3683 {
"ledger_header",
"4294967296"},
3686 "method" : "ledger_header",
3689 "api_version" : %API_VER%,
3697 {
"ledger_request: ledger index.",
3699 {
"ledger_request",
"4294967295"},
3702 "method" : "ledger_request",
3705 "api_version" : %API_VER%,
3706 "ledger_index" : 4294967295
3710 {"ledger_request: ledger hash.",
3712 {
"ledger_request",
"ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
3715 "method" : "ledger_request",
3718 "api_version" : %API_VER%,
3719 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"
3723 {"ledger_request: too few arguments.",
3730 "method" : "ledger_request",
3733 "error" : "badSyntax",
3735 "error_message" : "Syntax error."
3739 {"ledger_request: too many arguments.",
3741 {
"ledger_request",
"4294967295",
"spare"},
3744 "method" : "ledger_request",
3747 "error" : "badSyntax",
3749 "error_message" : "Syntax error."
3753 {"ledger_request: text ledger index.",
3755 {
"ledger_request",
"current"},
3758 "method" : "ledger_request",
3761 "api_version" : %API_VER%,
3766 {"ledger_request: ledger index too small.",
3768 {
"ledger_request",
"-1"},
3771 "method" : "ledger_request",
3774 "api_version" : %API_VER%,
3779 {"ledger_request: ledger index too big.",
3781 {
"ledger_request",
"4294967296"},
3784 "method" : "ledger_request",
3787 "api_version" : %API_VER%,
3795 {
"log_level: minimal.",
3802 "method" : "log_level",
3805 "api_version" : %API_VER%,
3809 {"log_level: fatal.",
3811 {
"log_level",
"fatal"},
3814 "method" : "log_level",
3817 "api_version" : %API_VER%,
3818 "severity" : "fatal"
3822 {"log_level: error.",
3824 {
"log_level",
"error"},
3827 "method" : "log_level",
3830 "api_version" : %API_VER%,
3831 "severity" : "error"
3835 {"log_level: warn.",
3837 {
"log_level",
"warn"},
3840 "method" : "log_level",
3843 "api_version" : %API_VER%,
3848 {"log_level: debug.",
3850 {
"log_level",
"debug"},
3853 "method" : "log_level",
3856 "api_version" : %API_VER%,
3857 "severity" : "debug"
3861 {"log_level: trace.",
3863 {
"log_level",
"trace"},
3866 "method" : "log_level",
3869 "api_version" : %API_VER%,
3870 "severity" : "trace"
3874 {"log_level: base partition.",
3876 {
"log_level",
"base",
"trace"},
3879 "method" : "log_level",
3882 "api_version" : %API_VER%,
3883 "partition" : "base",
3884 "severity" : "trace"
3888 {"log_level: partition_name.",
3890 {
"log_level",
"partition_name",
"fatal"},
3893 "method" : "log_level",
3896 "api_version" : %API_VER%,
3897 "partition" : "partition_name",
3898 "severity" : "fatal"
3902 {"log_level: too many arguments.",
3904 {
"log_level",
"partition_name",
"fatal",
"extra"},
3907 "method" : "log_level",
3910 "error" : "badSyntax",
3912 "error_message" : "Syntax error."
3916 {"log_level: invalid severity.",
3918 {
"log_level",
"err"},
3921 "method" : "log_level",
3924 "api_version" : %API_VER%,
3929 {"log_level: swap partition name and severity.",
3938 "method" : "log_level",
3941 "api_version" : %API_VER%,
3942 "partition" : "fatal",
3943 "severity" : "partition_name"
3950 {
"logrotate: minimal.",
3957 "method" : "logrotate",
3960 "api_version" : %API_VER%,
3964 {"logrotate: too many arguments.",
3966 {
"logrotate",
"extra"},
3969 "method" : "logrotate",
3972 "error" : "badSyntax",
3974 "error_message" : "Syntax error."
3981 {
"owner_info: minimal.",
3983 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
3986 "method" : "owner_info",
3989 "api_version" : %API_VER%,
3990 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
3994 {"owner_info: with numeric ledger index.",
3996 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"987654321"},
3999 "method" : "owner_info",
4002 "api_version" : %API_VER%,
4003 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4004 "ledger_index" : 987654321
4008 {"owner_info: with text ledger index.",
4010 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
4013 "method" : "owner_info",
4016 "api_version" : %API_VER%,
4017 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4018 "ledger_index" : "validated"
4022 {"owner_info: with ledger hash.",
4025 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4026 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
4029 "method" : "owner_info",
4032 "api_version" : %API_VER%,
4033 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4034 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
4038 {"owner_info: with ledger index.",
4040 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
4043 "method" : "owner_info",
4046 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4047 "api_version" : %API_VER%,
4048 "ledger_index" : "validated"
4052 {"owner_info: too few arguments.",
4059 "method" : "owner_info",
4062 "error" : "badSyntax",
4064 "error_message" : "Syntax error."
4068 {"owner_info: too many arguments.",
4072 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4079 "method" : "owner_info",
4082 "error" : "badSyntax",
4084 "error_message" : "Syntax error."
4089 "owner_info: invalid accountID.",
4097 "method" : "owner_info",
4100 "error" : "actMalformed",
4102 "error_message" : "Account malformed."
4110 "owner_info: invalid ledger selection.",
4112 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
4115 "method" : "owner_info",
4118 "api_version" : %API_VER%,
4119 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4128 "owner_info: invalid ledger selection.",
4130 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
4133 "method" : "owner_info",
4136 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4137 "api_version" : %API_VER%,
4156 "api_version" : %API_VER%,
4160 {"peers: too many arguments.",
4168 "error" : "badSyntax",
4170 "error_message" : "Syntax error."
4177 {
"peer_reservations_add: minimal.",
4179 {
"peer_reservations_add",
"public_key_string"},
4182 "method" : "peer_reservations_add",
4185 "api_version" : %API_VER%,
4186 "public_key" : "public_key_string"
4190 {"peer_reservations_add: with description.",
4192 {
"peer_reservations_add",
"public_key_string",
"public_key_description"},
4195 "method" : "peer_reservations_add",
4198 "api_version" : %API_VER%,
4199 "description" : "public_key_description",
4200 "public_key" : "public_key_string"
4204 {"peer_reservations_add: too few arguments.",
4206 {
"peer_reservations_add"},
4209 "method" : "peer_reservations_add",
4212 "error" : "badSyntax",
4214 "error_message" : "Syntax error."
4218 {"peer_reservations_add: too many arguments.",
4220 {
"peer_reservations_add",
"public_key_string",
"public_key_description",
"spare"},
4223 "method" : "peer_reservations_add",
4226 "error" : "badSyntax",
4228 "error_message" : "Syntax error."
4235 {
"peer_reservations_del: minimal.",
4237 {
"peer_reservations_del",
"public_key_string"},
4240 "method" : "peer_reservations_del",
4243 "api_version" : %API_VER%,
4244 "public_key" : "public_key_string"
4248 {"peer_reservations_del: too few arguments.",
4250 {
"peer_reservations_del"},
4253 "method" : "peer_reservations_del",
4256 "error" : "badSyntax",
4258 "error_message" : "Syntax error."
4262 {"peer_reservations_del: too many arguments.",
4264 {
"peer_reservations_del",
"public_key_string",
"public_key_description",
"spare"},
4267 "method" : "peer_reservations_del",
4270 "error" : "badSyntax",
4272 "error_message" : "Syntax error."
4289 "api_version" : %API_VER%,
4293 {"ping: too many arguments.",
4301 "error" : "badSyntax",
4303 "error_message" : "Syntax error."
4320 "api_version" : %API_VER%,
4325 "print: extra argument.",
4333 "api_version" : %API_VER%,
4334 "params" : [ "extra" ]
4338 {"print: too many arguments.",
4340 {
"print",
"extra1",
"extra2"},
4346 "error" : "badSyntax",
4348 "error_message" : "Syntax error."
4355 {
"random: minimal.",
4362 "method" : "random",
4365 "api_version" : %API_VER%,
4369 {"random: too many arguments.",
4371 {
"random",
"extra"},
4374 "method" : "random",
4377 "error" : "badSyntax",
4379 "error_message" : "Syntax error."
4386 {
"ripple_path_find: minimal.",
4390 R
"({"json_argument":true})",
4394 "method" : "ripple_path_find",
4397 "api_version" : %API_VER%,
4398 "json_argument" : true
4402 {"ripple_path_find: ledger index.",
4404 {
"ripple_path_find", R
"({"json_argument":true})", "4294967295"},
4407 "method" : "ripple_path_find",
4410 "api_version" : %API_VER%,
4411 "json_argument" : true,
4412 "ledger_index" : 4294967295
4416 {"ripple_path_find: text ledger index.",
4418 {
"ripple_path_find", R
"({"json_argument":true})", "closed"},
4421 "method" : "ripple_path_find",
4424 "api_version" : %API_VER%,
4425 "json_argument" : true,
4426 "ledger_index" : "closed"
4430 {"ripple_path_find: ledger hash.",
4432 {
"ripple_path_find",
4433 R
"({"json_argument":true})",
4434 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"},
4437 "method" : "ripple_path_find",
4440 "api_version" : %API_VER%,
4441 "json_argument" : true,
4442 "ledger_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
4447 {"ripple_path_find: too few arguments.",
4454 "method" : "ripple_path_find",
4457 "error" : "badSyntax",
4459 "error_message" : "Syntax error."
4463 {"ripple_path_find: too many arguments.",
4465 {
"ripple_path_find", R
"({"json_argument":true})", "current",
"extra"},
4468 "method" : "ripple_path_find",
4471 "error" : "badSyntax",
4473 "error_message" : "Syntax error."
4477 {"ripple_path_find: invalid json (note extra comma).",
4481 R
"({"json_argument":true,})",
4485 "method" : "ripple_path_find",
4488 "error" : "invalidParams",
4490 "error_message" : "Invalid parameters."
4494 {"ripple_path_find: ledger index too small.",
4496 {
"ripple_path_find", R
"({"json_argument":true})", "-1"},
4499 "method" : "ripple_path_find",
4502 "api_version" : %API_VER%,
4503 "json_argument" : true,
4508 {"ripple_path_find: ledger index too big.",
4510 {
"ripple_path_find", R
"({"json_argument":true})", "4294967296"},
4513 "method" : "ripple_path_find",
4516 "api_version" : %API_VER%,
4517 "json_argument" : true,
4522 {"ripple_path_find: invalid text ledger index.",
4524 {
"ripple_path_find", R
"({"json_argument":true})", "cur"},
4527 "method" : "ripple_path_find",
4530 "api_version" : %API_VER%,
4531 "json_argument" : true,
4544 R
"({"json_argument":true})",
4551 "api_version" : %API_VER%,
4552 "secret" : "my_secret",
4554 "json_argument" : true
4561 {
"sign",
"my_secret", R
"({"json_argument":true})", "offline"},
4567 "api_version" : %API_VER%,
4569 "secret" : "my_secret",
4571 "json_argument" : true
4576 {"sign: too few arguments.",
4578 {
"sign",
"contents_of_blob"},
4584 "error" : "badSyntax",
4586 "error_message" : "Syntax error."
4590 {"sign: offline flag with signature_target.",
4592 {
"sign",
"my_secret", R
"({"json_argument":true})", "offline",
"extra"},
4598 "api_version" : %API_VER%,
4600 "secret" : "my_secret",
4601 "signature_target" : "extra",
4604 "json_argument" : true
4609 {"sign: too many arguments.",
4613 R
"({"json_argument":true})",
4615 "CounterpartySignature",
4622 "error" : "badSyntax",
4624 "error_message" : "Syntax error."
4628 {"sign: invalid JSON (note extra comma).",
4633 R
"({"json_argument":true,})",
4640 "error" : "invalidParams",
4642 "error_message" : "Invalid parameters."
4646 {"sign: misspelled offline flag interpreted as signature_target.",
4648 {
"sign",
"my_secret", R
"({"json_argument":true})", "offlin"},
4654 "api_version" : %API_VER%,
4655 "secret" : "my_secret",
4656 "signature_target" : "offlin",
4659 "json_argument" : true
4667 {
"sign_for: minimal.",
4671 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4673 R
"({"json_argument":true})",
4677 "method" : "sign_for",
4680 "api_version" : %API_VER%,
4681 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4682 "secret" : "my_secret",
4684 "json_argument" : true
4689 {"sign_for: offline.",
4692 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4694 R
"({"json_argument":true})",
4698 "method" : "sign_for",
4701 "api_version" : %API_VER%,
4702 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4704 "secret" : "my_secret",
4706 "json_argument" : true
4711 {"sign_for: too few arguments.",
4715 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4720 "method" : "sign_for",
4723 "error" : "badSyntax",
4725 "error_message" : "Syntax error."
4729 {"sign_for: too many arguments.",
4732 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4734 R
"({"json_argument":true})",
4739 "method" : "sign_for",
4742 "error" : "badSyntax",
4744 "error_message" : "Syntax error."
4748 {"sign_for: invalid json (note extra comma).",
4752 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4754 R
"({"json_argument":true,})",
4758 "method" : "sign_for",
4761 "error" : "invalidParams",
4763 "error_message" : "Invalid parameters."
4767 {"sign_for: invalid final argument.",
4770 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4772 R
"({"json_argument":true})",
4776 "method" : "sign_for",
4779 "error" : "invalidParams",
4781 "error_message" : "Invalid parameters."
4790 {
"submit",
"the blob is unvalidated and may be any length..."},
4793 "method" : "submit",
4796 "api_version" : %API_VER%,
4797 "tx_blob" : "the blob is unvalidated and may be any length..."
4806 R
"({"json_argument":true})",
4810 "method" : "submit",
4813 "api_version" : %API_VER%,
4814 "secret" : "my_secret",
4816 "json_argument" : true
4821 {"submit: too few arguments.",
4828 "method" : "submit",
4831 "error" : "badSyntax",
4833 "error_message" : "Syntax error."
4838 "submit: four arguments.",
4840 {
"submit",
"my_secret", R
"({"json_argument":true})", "offline"},
4843 "method" : "submit",
4846 "api_version" : %API_VER%,
4848 "secret" : "my_secret",
4850 "json_argument" : true
4855 {"submit: offline flag with signature_target.",
4857 {
"submit",
"my_secret", R
"({"json_argument":true})", "offline",
"extra"},
4860 "method" : "submit",
4863 "api_version" : %API_VER%,
4865 "secret" : "my_secret",
4866 "signature_target" : "extra",
4869 "json_argument" : true
4874 {"submit: too many arguments.",
4878 R
"({"json_argument":true})",
4880 "CounterpartySignature",
4884 "method" : "submit",
4887 "error" : "badSyntax",
4889 "error_message" : "Syntax error."
4893 {"submit: invalid json (note extra comma).",
4898 R
"({"json_argument":true,})",
4902 "method" : "submit",
4905 "error" : "invalidParams",
4907 "error_message" : "Invalid parameters."
4911 {"submit: misspelled offline flag interpreted as signature_target.",
4913 {
"submit",
"my_secret", R
"({"json_argument":true})", "offlne"},
4916 "method" : "submit",
4919 "api_version" : %API_VER%,
4920 "secret" : "my_secret",
4921 "signature_target" : "offlne",
4924 "json_argument" : true
4932 {
"submit_multisigned: json.",
4935 "submit_multisigned",
4936 R
"({"json_argument":true})",
4940 "method" : "submit_multisigned",
4943 "api_version" : %API_VER%,
4945 "json_argument" : true
4950 {"submit_multisigned: too few arguments.",
4953 "submit_multisigned",
4957 "method" : "submit_multisigned",
4960 "error" : "badSyntax",
4962 "error_message" : "Syntax error."
4966 {"submit_multisigned: too many arguments.",
4968 {
"submit_multisigned", R
"({"json_argument":true})", "extra"},
4971 "method" : "submit_multisigned",
4974 "error" : "badSyntax",
4976 "error_message" : "Syntax error."
4980 {"submit_multisigned: invalid json (note extra comma).",
4983 "submit_multisigned",
4984 R
"({"json_argument":true,})",
4988 "method" : "submit_multisigned",
4991 "error" : "invalidParams",
4993 "error_message" : "Invalid parameters."
5001 {
"server_info: minimal.",
5008 "method" : "server_info",
5011 "api_version" : %API_VER%,
5015 {"server_info: counters.",
5017 {
"server_info",
"counters"},
5020 "method" : "server_info",
5023 "api_version" : %API_VER%,
5028 {"server_info: too many arguments.",
5030 {
"server_info",
"counters",
"extra"},
5033 "method" : "server_info",
5036 "error" : "badSyntax",
5038 "error_message" : "Syntax error."
5042 {"server_info: non-counters argument.",
5044 {
"server_info",
"counter"},
5047 "method" : "server_info",
5050 "api_version" : %API_VER%,
5057 {
"server_state: minimal.",
5064 "method" : "server_state",
5067 "api_version" : %API_VER%,
5071 {"server_state: counters.",
5073 {
"server_state",
"counters"},
5076 "method" : "server_state",
5079 "api_version" : %API_VER%,
5084 {"server_state: too many arguments.",
5086 {
"server_state",
"counters",
"extra"},
5089 "method" : "server_state",
5092 "error" : "badSyntax",
5094 "error_message" : "Syntax error."
5098 {"server_state: non-counters argument.",
5100 {
"server_state",
"counter"},
5103 "method" : "server_state",
5106 "api_version" : %API_VER%,
5123 "api_version" : %API_VER%,
5127 {"stop: too many arguments.",
5135 "error" : "badSyntax",
5137 "error_message" : "Syntax error."
5144 {
"transaction_entry: ledger index.",
5146 {
"transaction_entry",
5147 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5151 "method" : "transaction_entry",
5154 "api_version" : %API_VER%,
5155 "ledger_index" : 4294967295,
5156 "tx_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
5160 {"transaction_entry: text ledger index.",
5162 {
"transaction_entry",
5163 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5167 "method" : "transaction_entry",
5170 "api_version" : %API_VER%,
5171 "ledger_index" : "current",
5172 "tx_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
5176 {"transaction_entry: ledger hash.",
5178 {
"transaction_entry",
5179 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5180 "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA9876543210"},
5183 "method" : "transaction_entry",
5186 "api_version" : %API_VER%,
5187 "ledger_hash" : "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA9876543210",
5188 "tx_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
5192 {"transaction_entry: too few arguments.",
5195 "transaction_entry",
5196 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5200 "method" : "transaction_entry",
5203 "error" : "badSyntax",
5205 "error_message" : "Syntax error."
5209 {"transaction_entry: too many arguments.",
5211 {
"transaction_entry",
5212 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5217 "method" : "transaction_entry",
5220 "error" : "badSyntax",
5222 "error_message" : "Syntax error."
5226 {"transaction_entry: short tx_hash.",
5229 "transaction_entry",
5230 "123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5235 "method" : "transaction_entry",
5238 "error" : "invalidParams",
5240 "error_message" : "Invalid parameters."
5244 {"transaction_entry: long tx_hash.",
5247 "transaction_entry",
5248 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUVW",
5253 "method" : "transaction_entry",
5256 "error" : "invalidParams",
5258 "error_message" : "Invalid parameters."
5262 {"transaction_entry: small ledger index.",
5265 "transaction_entry",
5266 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5271 "method" : "transaction_entry",
5274 "error" : "invalidParams",
5276 "error_message" : "Invalid parameters."
5280 {"transaction_entry: large ledger index.",
5283 "transaction_entry",
5284 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5289 "method" : "transaction_entry",
5292 "error" : "invalidParams",
5294 "error_message" : "Invalid parameters."
5298 {"transaction_entry: short ledger hash.",
5301 "transaction_entry",
5302 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5303 "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA987654321",
5307 "method" : "transaction_entry",
5310 "error" : "invalidParams",
5312 "error_message" : "Invalid parameters."
5316 {"transaction_entry: long ledger hash.",
5319 "transaction_entry",
5320 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5321 "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA9876543210Z",
5325 "method" : "transaction_entry",
5328 "error" : "invalidParams",
5330 "error_message" : "Invalid parameters."
5337 {
"tx: ctid. minimal",
5339 {
"tx",
"FFFFFFFFFFFFFFFF",
"1",
"2"},
5345 "api_version" : %API_VER%,
5346 "ctid" : "FFFFFFFFFFFFFFFF",
5352 {"tx: ctid. binary",
5354 {
"tx",
"FFFFFFFFFFFFFFFF",
"binary",
"1",
"2"},
5360 "api_version" : %API_VER%,
5362 "ctid" : "FFFFFFFFFFFFFFFF",
5370 {
"tx",
"transaction_hash_is_not_validated"},
5376 "api_version" : %API_VER%,
5377 "transaction" : "transaction_hash_is_not_validated"
5383 {
"tx",
"transaction_hash_is_not_validated",
"binary"},
5389 "api_version" : %API_VER%,
5391 "transaction" : "transaction_hash_is_not_validated"
5395 {"tx: too few arguments.",
5405 "error" : "badSyntax",
5407 "error_message" : "Syntax error."
5411 {"tx: too many arguments.",
5413 {
"tx",
"transaction_hash_is_not_validated",
"binary",
"1",
"2",
"extra"},
5419 "error" : "badSyntax",
5421 "error_message" : "Syntax error."
5425 {"tx: invalid final argument is apparently ignored.",
5427 {
"tx",
"transaction_hash_is_not_validated",
"bin"},
5433 "api_version" : %API_VER%,
5434 "transaction" : "transaction_hash_is_not_validated"
5441 {
"tx_history: minimal.",
5443 {
"tx_history",
"0"},
5446 "method" : "tx_history",
5449 "api_version" : %API_VER%,
5454 {"tx_history: too few arguments.",
5461 "method" : "tx_history",
5464 "error" : "badSyntax",
5466 "error_message" : "Syntax error."
5470 {"tx_history: too many arguments.",
5472 {
"tx_history",
"0",
"1"},
5475 "method" : "tx_history",
5478 "error" : "badSyntax",
5480 "error_message" : "Syntax error."
5486 "tx_history: start too small.",
5488 {
"tx_history",
"-1"},
5494 "tx_history: start too big.",
5496 {
"tx_history",
"4294967296"},
5502 "tx_history: start not integer.",
5504 {
"tx_history",
"beginning"},
5511 {
"unl_list: minimal.",
5518 "method" : "unl_list",
5521 "api_version" : %API_VER%,
5525 {"unl_list: too many arguments.",
5527 {
"unl_list",
"extra"},
5530 "method" : "unl_list",
5533 "error" : "badSyntax",
5535 "error_message" : "Syntax error."
5542 {
"validation_create: minimal.",
5545 "validation_create",
5549 "method" : "validation_create",
5552 "api_version" : %API_VER%,
5556 {"validation_create: with secret.",
5558 {
"validation_create",
"the form of the secret is not validated"},
5561 "method" : "validation_create",
5564 "api_version" : %API_VER%,
5565 "secret" : "the form of the secret is not validated"
5569 {"validation_create: too many arguments.",
5571 {
"validation_create",
"the form of the secret is not validated",
"extra"},
5574 "method" : "validation_create",
5577 "error" : "badSyntax",
5579 "error_message" : "Syntax error."
5586 {
"version: minimal.",
5593 "method" : "version",
5596 "api_version" : %API_VER%,
5600 {"version: too many arguments.",
5602 {
"version",
"extra"},
5605 "method" : "version",
5608 "error" : "badSyntax",
5610 "error_message" : "Syntax error."
5617 {
"wallet_propose: minimal.",
5624 "method" : "wallet_propose",
5627 "api_version" : %API_VER%,
5631 {"wallet_propose: with passphrase.",
5633 {
"wallet_propose",
"the form of the passphrase is not validated"},
5636 "method" : "wallet_propose",
5639 "api_version" : %API_VER%,
5640 "passphrase" : "the form of the passphrase is not validated"
5644 {"wallet_propose: too many arguments.",
5646 {
"wallet_propose",
"the form of the passphrase is not validated",
"extra"},
5649 "method" : "wallet_propose",
5652 "error" : "badSyntax",
5654 "error_message" : "Syntax error."
5661 {
"internal: minimal.",
5663 {
"internal",
"command_name"},
5666 "method" : "internal",
5669 "api_version" : %API_VER%,
5670 "internal_command" : "command_name",
5675 {"internal: with parameters.",
5677 {
"internal",
"command_name",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5680 "method" : "internal",
5683 "api_version" : %API_VER%,
5684 "internal_command" : "command_name",
5685 "params" : [ "string_arg", "1", "-1", "4294967296", "3.14159" ]
5689 {"internal: too few arguments.",
5696 "method" : "internal",
5699 "error" : "badSyntax",
5701 "error_message" : "Syntax error."
5708 {
"path_find: minimal.",
5715 "method" : "path_find",
5718 "error" : "noEvents",
5720 "error_message" : "Current transport does not support events."
5724 {"path_find: with arguments.",
5726 {
"path_find",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5729 "method" : "path_find",
5732 "error" : "noEvents",
5734 "error_message" : "Current transport does not support events."
5741 {
"subscribe: minimal.",
5748 "method" : "subscribe",
5751 "error" : "noEvents",
5753 "error_message" : "Current transport does not support events."
5757 {"subscribe: with arguments.",
5759 {
"subscribe",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5762 "method" : "subscribe",
5765 "error" : "noEvents",
5767 "error_message" : "Current transport does not support events."
5774 {
"unsubscribe: minimal.",
5781 "method" : "unsubscribe",
5784 "error" : "noEvents",
5786 "error_message" : "Current transport does not support events."
5790 {"unsubscribe: with arguments.",
5792 {
"unsubscribe",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5795 "method" : "unsubscribe",
5798 "error" : "noEvents",
5800 "error_message" : "Current transport does not support events."
5807 {
"unknown_command: minimal.",
5814 "method" : "unknown_command",
5817 "api_version" : %API_VER%,
5821 {"unknown_command: with arguments.",
5823 {
"unknown_command",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5826 "method" : "unknown_command",
5829 "api_version" : %API_VER%,
5830 "params" : [ "string_arg", "1", "-1", "4294967296", "3.14159" ]
5840 static auto const kPlaceHolder =
"%API_VER%";
5842 boost::replace_all(jr, kPlaceHolder, versionStr);
5851 cfg->networkId = networkID;
5862 testcase <<
"RPCCall API version " << apiVersion;
5873 if (!BEAST_EXPECT(!rpcCallTest.exp.empty()))
5878 char const*
const expVersioned =
5881 : rpcCallTest.exp.back();
5899 fail(rpcCallTest.description, __FILE__, rpcCallTest.line);
5911 if (
json.isMember(jss::params) &&
json[jss::params].isArray() &&
5912 json[jss::params].size() > 0 &&
json[jss::params][0u].isObject())
5914 json[jss::params][0u].removeMember(jss::error_code);
5927 fail(rpcCallTest.description, __FILE__, rpcCallTest.line);
5949 testcase(
"Command-line and dispatch tables agree");
5956 BEAST_EXPECT(!commandLine.empty());
5957 BEAST_EXPECT(!handlers.empty());
5966 for (
auto const& name : commandLine)
5971 auto const* handler = handlerFor(name);
5972 if (BEAST_EXPECTS(handler !=
nullptr,
std::string{name}))
5973 BEAST_EXPECTS(handler->hasCommandLineForm,
std::string{name});
5976 for (
auto const& name : handlers)
5978 auto const* handler = handlerFor(name);
5979 bool const claimsCommandLine = handler !=
nullptr && handler->hasCommandLineForm;
T binary_search(T... args)
void pass()
Record a successful test condition.
void fail(String const &reason, char const *file, int line)
Record a failure.
TestcaseT testcase
Memberspace for declaring test cases.
Unserialize a JSON document into a Value.
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
void run() override
Runs the suite.
void testCommandLineTableMatchesHandlers()
void testRPCCall(unsigned apiVersion)
A transaction testing environment.
beast::Journal const journal
JSON (JavaScript Object Notation).
constexpr std::string_view kInternal
constexpr std::string_view kJson2
constexpr std::string_view kJson
API version numbers used in later API versions.
std::span< NullTerminatedView const > getHandlerNames()
Return the names of all methods, sorted and without duplicates.
Handler const * getHandler(unsigned version, bool betaEnabled, std::string_view name)
static constexpr auto kApiMaximumValidVersion
static constexpr auto kApiMinimumSupportedVersion
static constexpr auto kApiCommandLineVersion
std::unique_ptr< Config > envconfig()
creates and initializes a default configuration for jtx::Env
json::Value cmdToJSONRPC(std::vector< std::string > const &args, beast::Journal j, unsigned int apiVersion)
Given an xrpld unit test rpc command, return the corresponding JSON.
BEAST_DEFINE_TESTSUITE(AMMClawback, app, xrpl)
std::unique_ptr< Config > makeNetworkConfig(uint32_t networkID)
std::string updateAPIVersionString(char const *const req, unsigned apiVersion)
static RPCCallTestData const kRpcCallTestArray[]
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void forAllApiVersions(Fn const &fn, Args &&... args)
std::span< std::string_view const > commandLineMethodNames()
Return the names of all methods accepted on the command line.
std::vector< char const * > exp
RPCCallTestData & operator=(RPCCallTestData &&)=delete
RPCCallTestData(char const *description, int line, std::initializer_list< char const * > const &args, Exception throwsWhat, char const *exp)
RPCCallTestData(char const *description, int line, std::initializer_list< char const * > const &args, Exception throwsWhat, std::initializer_list< char const * > exp)
char const *const description
std::vector< char const * > const args
RPCCallTestData(RPCCallTestData &&)=delete
RPCCallTestData & operator=(RPCCallTestData const &)=delete
RPCCallTestData(RPCCallTestData const &)=delete
Exception const throwsWhat