2#include <test/jtx/utility.h>
4#include <xrpld/rpc/RPCCall.h>
6#include <xrpl/beast/unit_test.h>
7#include <xrpl/json/json_reader.h>
8#include <xrpl/protocol/ApiVersion.h>
9#include <xrpl/protocol/ErrorCodes.h>
11#include <boost/algorithm/string.hpp>
35 char const* description_,
45 char const* description_,
66 {
"account_channels: minimal.",
68 {
"account_channels",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
71 "method" : "account_channels",
74 "api_version" : %API_VER%,
75 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
79 {"account_channels: account and ledger hash.",
82 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
83 "rD5MbavGfiSC5m7mkxy1FANuT7s3HxqpoF"},
86 "method" : "account_channels",
89 "api_version" : %API_VER%,
90 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
91 "destination_account" : "rD5MbavGfiSC5m7mkxy1FANuT7s3HxqpoF"
95 {"account_channels: account and ledger index.",
98 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
99 "r9emE59aTWb85t64dAebKrxYMBTpzK5yR7"},
102 "method" : "account_channels",
105 "api_version" : %API_VER%,
106 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
107 "destination_account" : "r9emE59aTWb85t64dAebKrxYMBTpzK5yR7"
111 {"account_channels: two accounts.",
114 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
115 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"},
118 "method" : "account_channels",
121 "api_version" : %API_VER%,
122 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
123 "destination_account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
127 {"account_channels: two accounts and ledger hash.",
130 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
131 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
132 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
135 "method" : "account_channels",
138 "api_version" : %API_VER%,
139 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
140 "destination_account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
141 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
145 {"account_channels: two accounts and ledger index.",
148 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
149 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
153 "method" : "account_channels",
156 "api_version" : %API_VER%,
157 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
158 "destination_account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
159 "ledger_index" : 90210
163 {"account_channels: too few arguments.",
170 "method" : "account_channels",
173 "error" : "badSyntax",
175 "error_message" : "Syntax error."
179 {"account_channels: too many arguments.",
182 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
183 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
188 "method" : "account_channels",
191 "error" : "badSyntax",
193 "error_message" : "Syntax error."
197 {"account_channels: invalid accountID.",
205 "method" : "account_channels",
208 "error" : "actMalformed",
210 "error_message" : "Account malformed."
217 {
"account_currencies: minimal 1.",
219 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
222 "method" : "account_currencies",
225 "api_version" : %API_VER%,
226 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
230 {"account_currencies: minimal 2.",
232 {
"account_currencies",
"racb4o3DrdYxuCfyVa6vsLb7vgju9RFbBr"},
235 "method" : "account_currencies",
238 "api_version" : %API_VER%,
239 "account" : "racb4o3DrdYxuCfyVa6vsLb7vgju9RFbBr"
243 {"account_currencies: ledger index.",
245 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"42"},
248 "method" : "account_currencies",
251 "api_version" : %API_VER%,
252 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
257 {"account_currencies: validated ledger.",
259 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
262 "method" : "account_currencies",
265 "api_version" : %API_VER%,
266 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
267 "ledger_index" : "validated"
271 {"account_currencies: current ledger.",
273 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current"},
276 "method" : "account_currencies",
279 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
280 "api_version" : %API_VER%,
281 "ledger_index" : "current"
285 {"account_currencies: too few arguments.",
288 "account_currencies",
292 "method" : "account_currencies",
295 "error" : "badSyntax",
297 "error_message" : "Syntax error."
301 {"account_currencies: too many arguments.",
303 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current",
"spare1",
"spare2"},
306 "method" : "account_currencies",
309 "error" : "badSyntax",
311 "error_message" : "Syntax error."
315 {"account_currencies: invalid second argument.",
317 {
"account_currencies",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"yup"},
320 "method" : "account_currencies",
323 "api_version" : %API_VER%,
324 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
330 "account_currencies: invalid accountID.",
333 "account_currencies",
338 "method" : "account_currencies",
341 "error" : "actMalformed",
343 "error_message" : "Account malformed."
351 {
"account_info: minimal.",
353 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
356 "method" : "account_info",
359 "api_version" : %API_VER%,
360 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
364 {"account_info: with numeric ledger index.",
366 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"77777"},
369 "method" : "account_info",
372 "api_version" : %API_VER%,
373 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
374 "ledger_index" : 77777
378 {"account_info: with text ledger index.",
380 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"closed"},
383 "method" : "account_info",
386 "api_version" : %API_VER%,
387 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
388 "ledger_index" : "closed"
392 {"account_info: with ledger hash.",
395 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
396 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
399 "method" : "account_info",
402 "api_version" : %API_VER%,
403 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
404 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
408 {"account_info: with ledger index.",
410 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
413 "method" : "account_info",
416 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
417 "api_version" : %API_VER%,
418 "ledger_index" : "validated"
422 {"account_info: too few arguments.",
429 "method" : "account_info",
432 "error" : "badSyntax",
434 "error_message" : "Syntax error."
438 {"account_info: too many arguments.",
440 {
"account_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current",
"extra1",
"extra2"},
443 "method" : "account_info",
446 "error" : "badSyntax",
448 "error_message" : "Syntax error."
453 "account_info: invalid accountID.",
461 "method" : "account_info",
464 "error" : "actMalformed",
466 "error_message" : "Account malformed."
474 {
"account_lines: minimal.",
476 {
"account_lines",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
479 "method" : "account_lines",
482 "api_version" : %API_VER%,
483 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
487 {"account_lines: peer.",
489 {
"account_lines",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"},
492 "method" : "account_lines",
495 "api_version" : %API_VER%,
496 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
497 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
501 {"account_lines: peer and numeric ledger index.",
504 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
505 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
509 "method" : "account_lines",
512 "api_version" : %API_VER%,
513 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
514 "ledger_index" : 888888888,
515 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
519 {"account_lines: peer and text ledger index.",
522 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
523 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
527 "method" : "account_lines",
530 "api_version" : %API_VER%,
531 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
532 "ledger_index" : "closed",
533 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
537 {"account_lines: peer and ledger hash.",
540 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
541 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
542 "FFFFEEEEDDDDCCCCBBBBAAAA9999888877776666555544443333222211110000"},
545 "method" : "account_lines",
548 "api_version" : %API_VER%,
549 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
550 "ledger_hash" : "FFFFEEEEDDDDCCCCBBBBAAAA9999888877776666555544443333222211110000",
551 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
555 {"account_lines: too few arguments.",
562 "method" : "account_lines",
565 "error" : "badSyntax",
567 "error_message" : "Syntax error."
572 "account_lines: four arguments.",
575 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
576 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
581 "method" : "account_lines",
584 "api_version" : %API_VER%,
585 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
586 "ledger_index" : 12345678,
587 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
592 "account_lines: five arguments.",
595 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
596 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
599 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
602 "method" : "account_lines",
605 "api_version" : %API_VER%,
606 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
607 "ledger_index" : 12345678,
608 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
612 {"account_lines: too many arguments.",
615 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
616 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
619 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
623 "method" : "account_lines",
626 "error" : "badSyntax",
628 "error_message" : "Syntax error."
633 "account_lines: first invalid accountID.",
641 "method" : "account_lines",
644 "error" : "actMalformed",
646 "error_message" : "Account malformed."
652 "account_lines: second invalid accountID.",
656 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
661 "method" : "account_lines",
664 "api_version" : %API_VER%,
665 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
671 "account_lines: invalid ledger selector.",
674 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
675 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
679 "method" : "account_lines",
682 "api_version" : %API_VER%,
683 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
685 "peer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
693 {
"account_objects: minimal.",
695 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
698 "method" : "account_objects",
701 "api_version" : %API_VER%,
702 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
706 {"account_objects: with numeric ledger index.",
708 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"77777"},
711 "method" : "account_objects",
714 "api_version" : %API_VER%,
715 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
716 "ledger_index" : 77777
720 {"account_objects: with text ledger index.",
722 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"closed"},
725 "method" : "account_objects",
728 "api_version" : %API_VER%,
729 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
730 "ledger_index" : "closed"
734 {"account_objects: with ledger hash.",
737 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
738 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
741 "method" : "account_objects",
744 "api_version" : %API_VER%,
745 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
746 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
750 {"account_objects: with ledger index.",
752 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
755 "method" : "account_objects",
758 "api_version" : %API_VER%,
759 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
760 "ledger_index" : "validated"
764 {"account_objects: too few arguments.",
771 "method" : "account_objects",
774 "error" : "badSyntax",
776 "error_message" : "Syntax error."
781 "account_objects: four arguments.",
785 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
792 "method" : "account_objects",
795 "api_version" : %API_VER%,
796 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
801 "account_objects: five arguments.",
805 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
813 "method" : "account_objects",
816 "api_version" : %API_VER%,
817 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
821 {"account_objects: too many arguments.",
825 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
834 "method" : "account_objects",
837 "error" : "badSyntax",
839 "error_message" : "Syntax error."
844 "account_objects: invalid accountID.",
852 "method" : "account_objects",
855 "error" : "actMalformed",
857 "error_message" : "Account malformed."
865 "account_objects: invalid ledger selection 1.",
867 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
870 "method" : "account_objects",
873 "api_version" : %API_VER%,
874 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
883 "account_objects: invalid ledger selection 2.",
885 {
"account_objects",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
888 "method" : "account_objects",
891 "api_version" : %API_VER%,
892 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
901 {
"account_offers: minimal.",
903 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
906 "method" : "account_offers",
909 "api_version" : %API_VER%,
910 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
914 {"account_offers: with numeric ledger index.",
916 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"987654321"},
919 "method" : "account_offers",
922 "api_version" : %API_VER%,
923 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
924 "ledger_index" : 987654321
928 {"account_offers: with text ledger index.",
930 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
933 "method" : "account_offers",
936 "api_version" : %API_VER%,
937 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
938 "ledger_index" : "validated"
942 {"account_offers: with ledger hash.",
945 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
946 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
949 "method" : "account_offers",
952 "api_version" : %API_VER%,
953 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
954 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
958 {"account_offers: with ledger index.",
960 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
963 "method" : "account_offers",
966 "api_version" : %API_VER%,
967 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
968 "ledger_index" : "validated"
972 {"account_offers: too few arguments.",
979 "method" : "account_offers",
982 "error" : "badSyntax",
984 "error_message" : "Syntax error."
989 "account_offers: four arguments.",
991 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"current",
"extra"},
994 "method" : "account_offers",
997 "api_version" : %API_VER%,
998 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1002 {"account_offers: too many arguments.",
1006 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1014 "method" : "account_offers",
1017 "error" : "badSyntax",
1019 "error_message" : "Syntax error."
1024 "account_offers: invalid accountID.",
1032 "method" : "account_offers",
1035 "error" : "actMalformed",
1037 "error_message" : "Account malformed."
1045 "account_offers: invalid ledger selection 1.",
1047 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
1050 "method" : "account_offers",
1053 "api_version" : %API_VER%,
1054 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1063 "account_offers: invalid ledger selection 2.",
1065 {
"account_offers",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
1068 "method" : "account_offers",
1071 "api_version" : %API_VER%,
1072 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1081 {
"account_tx: minimal.",
1083 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
1086 "method" : "account_tx",
1089 "api_version" : %API_VER%,
1090 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1094 {"account_tx: ledger_index .",
1096 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"444"},
1099 "method" : "account_tx",
1102 "api_version" : %API_VER%,
1103 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1104 "ledger_index" : 444
1108 {"account_tx: ledger_index plus trailing params.",
1110 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"707",
"descending",
"binary",
"count"},
1113 "method" : "account_tx",
1116 "api_version" : %API_VER%,
1117 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1120 "descending" : true,
1121 "ledger_index" : 707
1125 {"account_tx: ledger_index_min and _max.",
1127 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"-1"},
1130 "method" : "account_tx",
1133 "api_version" : %API_VER%,
1134 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1135 "ledger_index_max" : -1,
1136 "ledger_index_min" : -1
1140 {"account_tx: ledger_index_min and _max plus trailing params.",
1143 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1151 "method" : "account_tx",
1154 "api_version" : %API_VER%,
1155 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1158 "descending" : true,
1159 "ledger_index_max" : 413,
1160 "ledger_index_min" : -1
1164 {"account_tx: ledger_index_min and _max plus limit.",
1166 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"247",
"-1",
"300"},
1169 "method" : "account_tx",
1172 "api_version" : %API_VER%,
1173 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1174 "ledger_index_max" : -1,
1175 "ledger_index_min" : 247,
1180 {"account_tx: ledger_index_min and _max, limit, trailing args.",
1183 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1192 "method" : "account_tx",
1195 "api_version" : %API_VER%,
1196 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1199 "descending" : true,
1200 "ledger_index_max" : -1,
1201 "ledger_index_min" : 247,
1206 {"account_tx: ledger_index_min and _max plus limit and offset.",
1208 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"589",
"590",
"67",
"45"},
1211 "method" : "account_tx",
1214 "api_version" : %API_VER%,
1215 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1216 "ledger_index_max" : 590,
1217 "ledger_index_min" : 589,
1223 {"account_tx: ledger_index_min and _max, limit, offset, trailing.",
1226 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1235 "method" : "account_tx",
1238 "api_version" : %API_VER%,
1239 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1241 "descending" : true,
1242 "ledger_index_max" : 590,
1243 "ledger_index_min" : 589,
1249 {"account_tx: too few arguments.",
1256 "method" : "account_tx",
1259 "error" : "badSyntax",
1261 "error_message" : "Syntax error."
1265 {"account_tx: too many arguments.",
1268 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1279 "method" : "account_tx",
1282 "error" : "badSyntax",
1284 "error_message" : "Syntax error."
1289 "account_tx: invalid accountID.",
1291 {
"account_tx",
"rHb9CJAWyB4rj9!VRWn96DkukG4bwdtyTh"},
1294 "method" : "account_tx",
1297 "error" : "actMalformed",
1299 "error_message" : "Account malformed."
1306 "account_tx: invalid ledger.",
1308 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-478.7"},
1311 "method" : "account_tx",
1314 "api_version" : %API_VER%,
1315 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1322 "account_tx: max less than min.",
1324 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"580",
"579"},
1328 "method" : "account_tx",
1331 "error" : "lgrIdxsInvalid",
1333 "error_message" : "Ledger indexes invalid."
1338 "method" : "account_tx",
1341 "error" : "notSynced",
1343 "error_message" : "Not synced to the network."
1350 "account_tx: non-integer min.",
1352 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Binary",
"-1"},
1358 "account_tx: non-integer max.",
1360 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"counts"},
1366 "account_tx: non-integer offset.",
1368 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"-1",
"decending"},
1374 "account_tx: non-integer limit.",
1376 {
"account_tx",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"-1",
"-1",
"300",
"false"},
1381 "account_tx: RIPD-1570.",
1384 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1396 {
"book_offers: minimal no issuer.",
1405 "method" : "book_offers",
1408 "api_version" : %API_VER%,
1418 {"book_offers: minimal with currency/issuer",
1422 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1423 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1427 "method" : "book_offers",
1430 "api_version" : %API_VER%,
1433 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1437 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1444 "book_offers: add issuer.",
1446 {
"book_offers",
"USD",
"EUR",
"rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"},
1449 "method" : "book_offers",
1452 "api_version" : %API_VER%,
1453 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1463 {"book_offers: add issuer and numeric ledger index.",
1466 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1468 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1472 "method" : "book_offers",
1475 "api_version" : %API_VER%,
1476 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1477 "ledger_index" : 666,
1483 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1488 {"book_offers: add issuer and text ledger index.",
1492 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1493 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1497 "method" : "book_offers",
1500 "api_version" : %API_VER%,
1501 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1502 "ledger_index" : "current",
1505 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1513 {"book_offers: add issuer and ledger hash.",
1516 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1517 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1518 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1519 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
1522 "method" : "book_offers",
1525 "api_version" : %API_VER%,
1526 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1527 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1530 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1534 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1539 {"book_offers: issuer, ledger hash, and limit.",
1543 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1544 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1545 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1546 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1551 "method" : "book_offers",
1554 "api_version" : %API_VER%,
1555 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1556 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1560 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1564 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1570 "book_offers: issuer, ledger hash, limit, and marker.",
1573 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1574 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1575 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1576 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1582 "method" : "book_offers",
1585 "api_version" : %API_VER%,
1586 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1587 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1589 "marker" : "MyMarker",
1592 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1596 "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
1601 {"book_offers: too few arguments.",
1608 "method" : "book_offers",
1611 "error" : "badSyntax",
1613 "error_message" : "Syntax error."
1617 {"book_offers: too many arguments.",
1620 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1621 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1622 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1623 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1630 "method" : "book_offers",
1633 "error" : "badSyntax",
1635 "error_message" : "Syntax error."
1640 {"book_offers: taker pays no currency.",
1644 "/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1645 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1649 "method" : "book_offers",
1652 "error" : "invalidParams",
1654 "error_message" : "Invalid currency/issuer '/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh'"
1658 {"book_offers: taker gets no currency.",
1662 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1663 "/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1667 "method" : "book_offers",
1670 "error" : "invalidParams",
1672 "error_message" : "Invalid currency/issuer '/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA'"
1676 {"book_offers: invalid issuer.",
1678 {
"book_offers",
"USD",
"EUR",
"not_a_valid_issuer"},
1681 "method" : "book_offers",
1684 "api_version" : %API_VER%,
1685 "issuer" : "not_a_valid_issuer",
1695 {"book_offers: invalid text ledger index.",
1699 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1700 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1704 "method" : "book_offers",
1707 "api_version" : %API_VER%,
1708 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1712 "issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1721 "book_offers: non-numeric limit.",
1725 "USD/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1726 "EUR/rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1727 "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1728 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
1733 "method" : "book_offers",
1736 "error" : "invalidParams",
1738 "error_message" : "Invalid field 'limit'."
1745 {
"can_delete: minimal.",
1752 "method" : "can_delete",
1755 "api_version" : %API_VER%,
1759 {"can_delete: ledger index.",
1767 "method" : "can_delete",
1770 "api_version" : %API_VER%,
1771 "can_delete" : 4294967295
1775 {"can_delete: ledger hash.",
1779 "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210",
1783 "method" : "can_delete",
1786 "api_version" : %API_VER%,
1787 "can_delete" : "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210"
1791 {"can_delete: always.",
1799 "method" : "can_delete",
1802 "api_version" : %API_VER%,
1803 "can_delete" : "always"
1807 {"can_delete: never.",
1815 "method" : "can_delete",
1818 "api_version" : %API_VER%,
1819 "can_delete" : "never"
1823 {"can_delete: now.",
1831 "method" : "can_delete",
1834 "api_version" : %API_VER%,
1835 "can_delete" : "now"
1839 {"can_delete: too many arguments.",
1841 {
"can_delete",
"always",
"never"},
1844 "method" : "can_delete",
1847 "error" : "badSyntax",
1849 "error_message" : "Syntax error."
1853 {"can_delete: invalid argument.",
1855 {
"can_delete",
"invalid"},
1858 "method" : "can_delete",
1861 "api_version" : %API_VER%,
1862 "can_delete" : "invalid"
1867 "can_delete: ledger index > 32 bits.",
1876 "can_delete: ledger hash with no alphas.",
1880 "0123456701234567012345670123456701234567012345670123456701234567",
1887 {
"channel_authorize: minimal.",
1889 {
"channel_authorize",
1890 "secret_can_be_anything",
1891 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1892 "18446744073709551615"},
1895 "method" : "channel_authorize",
1898 "api_version" : %API_VER%,
1899 "amount" : "18446744073709551615",
1900 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1901 "secret" : "secret_can_be_anything"
1905 {"channel_authorize: too few arguments.",
1908 "channel_authorize",
1909 "secret_can_be_anything",
1910 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1914 "method" : "channel_authorize",
1917 "error" : "badSyntax",
1919 "error_message" : "Syntax error."
1923 {"channel_authorize: too many arguments.",
1925 {
"channel_authorize",
1927 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1933 "method" : "channel_authorize",
1936 "error" : "badSyntax",
1938 "error_message" : "Syntax error."
1942 {"channel_authorize: bad key type.",
1944 {
"channel_authorize",
1946 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1951 "method" : "channel_authorize",
1954 "error" : "badKeyType",
1956 "error_message" : "Bad key type."
1960 {"channel_authorize: channel_id too short.",
1962 {
"channel_authorize",
1963 "secret_can_be_anything",
1964 "123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1968 "method" : "channel_authorize",
1971 "error" : "channelMalformed",
1973 "error_message" : "Payment channel is malformed."
1977 {"channel_authorize: channel_id too long.",
1979 {
"channel_authorize",
1980 "secret_can_be_anything",
1981 "10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
1985 "method" : "channel_authorize",
1988 "error" : "channelMalformed",
1990 "error_message" : "Payment channel is malformed."
1994 {"channel_authorize: channel_id not hex.",
1996 {
"channel_authorize",
1997 "secret_can_be_anything",
1998 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEZ",
2002 "method" : "channel_authorize",
2005 "error" : "channelMalformed",
2007 "error_message" : "Payment channel is malformed."
2011 {"channel_authorize: negative amount.",
2013 {
"channel_authorize",
2014 "secret_can_be_anything",
2015 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2019 "method" : "channel_authorize",
2022 "error" : "channelAmtMalformed",
2024 "error_message" : "Payment channel amount is malformed."
2028 {"channel_authorize: amount > 64 bits.",
2030 {
"channel_authorize",
2031 "secret_can_be_anything",
2032 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2033 "18446744073709551616"},
2036 "method" : "channel_authorize",
2039 "error" : "channelAmtMalformed",
2041 "error_message" : "Payment channel amount is malformed."
2048 {
"channel_verify: public key.",
2051 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2052 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2057 "method" : "channel_verify",
2060 "api_version" : %API_VER%,
2062 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2063 "public_key" : "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2064 "signature" : "DEADBEEF"
2068 {"channel_verify: public key hex.",
2071 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2072 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2073 "18446744073709551615",
2077 "method" : "channel_verify",
2080 "api_version" : %API_VER%,
2081 "amount" : "18446744073709551615",
2082 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2083 "public_key" : "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2084 "signature" : "DEADBEEF"
2088 {"channel_verify: too few arguments.",
2091 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2092 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
2095 "method" : "channel_verify",
2098 "error" : "badSyntax",
2100 "error_message" : "Syntax error."
2104 {"channel_verify: too many arguments.",
2107 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2108 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2114 "method" : "channel_verify",
2117 "error" : "badSyntax",
2119 "error_message" : "Syntax error."
2123 {"channel_verify: malformed public key.",
2126 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9GoV",
2127 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2132 "method" : "channel_verify",
2135 "error" : "publicMalformed",
2137 "error_message" : "Public key is malformed."
2141 {"channel_verify: malformed hex public key.",
2144 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F",
2145 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2150 "method" : "channel_verify",
2153 "error" : "publicMalformed",
2155 "error_message" : "Public key is malformed."
2159 {"channel_verify: invalid channel id.",
2162 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2163 "10123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2168 "method" : "channel_verify",
2171 "error" : "channelMalformed",
2173 "error_message" : "Payment channel is malformed."
2177 {"channel_verify: short channel id.",
2180 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2181 "123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2186 "method" : "channel_verify",
2189 "error" : "channelMalformed",
2191 "error_message" : "Payment channel is malformed."
2195 {"channel_verify: amount too small.",
2198 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2199 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2204 "method" : "channel_verify",
2207 "error" : "channelAmtMalformed",
2209 "error_message" : "Payment channel amount is malformed."
2213 {"channel_verify: amount too large.",
2216 "021D93E21C44160A1B3B66DA1F37B86BE39FFEA3FC4B95FAA2063F82EE823599F6",
2217 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2218 "18446744073709551616",
2222 "method" : "channel_verify",
2225 "error" : "channelAmtMalformed",
2227 "error_message" : "Payment channel amount is malformed."
2231 {"channel_verify: non-hex signature.",
2234 "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2235 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2237 "ThisIsNotHexadecimal"},
2240 "method" : "channel_verify",
2243 "api_version" : %API_VER%,
2244 "amount" : "40000000",
2245 "channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
2246 "public_key" : "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
2247 "signature" : "ThisIsNotHexadecimal"
2254 {
"connect: minimal.",
2258 "ThereIsNoCheckingOnTheIPFormat",
2262 "method" : "connect",
2265 "api_version" : %API_VER%,
2266 "ip" : "ThereIsNoCheckingOnTheIPFormat"
2270 {"connect: ip and port.",
2272 {
"connect",
"ThereIsNoCheckingOnTheIPFormat",
"6561"},
2275 "method" : "connect",
2278 "api_version" : %API_VER%,
2279 "ip" : "ThereIsNoCheckingOnTheIPFormat",
2284 {"connect: too few arguments.",
2291 "method" : "connect",
2294 "error" : "badSyntax",
2296 "error_message" : "Syntax error."
2300 {"connect: too many arguments.",
2302 {
"connect",
"ThereIsNoCheckingOnTheIPFormat",
"6561",
"extra"},
2305 "method" : "connect",
2308 "error" : "badSyntax",
2310 "error_message" : "Syntax error."
2315 "connect: port too small.",
2319 "ThereIsNoCheckingOnTheIPFormat",
2325 "connect: port too large.",
2329 "ThereIsNoCheckingOnTheIPFormat",
2337 {
"consensus_info: minimal.",
2344 "method" : "consensus_info",
2347 "api_version" : %API_VER%
2351 {"consensus_info: too many arguments.",
2353 {
"consensus_info",
"whatever"},
2356 "method" : "consensus_info",
2359 "error" : "badSyntax",
2361 "error_message" : "Syntax error."
2368 {
"deposit_authorized: minimal.",
2371 "deposit_authorized",
2372 "source_account_NotValidated",
2373 "destination_account_NotValidated",
2377 "method" : "deposit_authorized",
2380 "api_version" : %API_VER%,
2381 "destination_account" : "destination_account_NotValidated",
2382 "source_account" : "source_account_NotValidated"
2386 {"deposit_authorized: with text ledger index.",
2388 {
"deposit_authorized",
2389 "source_account_NotValidated",
2390 "destination_account_NotValidated",
2394 "method" : "deposit_authorized",
2397 "api_version" : %API_VER%,
2398 "destination_account" : "destination_account_NotValidated",
2399 "ledger_index" : "validated",
2400 "source_account" : "source_account_NotValidated"
2404 {"deposit_authorized: with ledger index.",
2406 {
"deposit_authorized",
2407 "source_account_NotValidated",
2408 "destination_account_NotValidated",
2420 "method" : "deposit_authorized",
2423 "api_version" : %API_VER%,
2424 "destination_account" : "destination_account_NotValidated",
2425 "ledger_index" : 4294967295,
2426 "source_account" : "source_account_NotValidated",
2427 "credentials": ["cred1", "cred2", "cred3", "cred4", "cred5", "cred6", "cred7", "cred8"]
2431 {"deposit_authorized: with ledger hash.",
2433 {
"deposit_authorized",
2434 "source_account_NotValidated",
2435 "destination_account_NotValidated",
2436 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
2439 "method" : "deposit_authorized",
2442 "api_version" : %API_VER%,
2443 "destination_account" : "destination_account_NotValidated",
2444 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
2445 "source_account" : "source_account_NotValidated"
2449 {"deposit_authorized: too few arguments.",
2452 "deposit_authorized",
2453 "source_account_NotValidated",
2457 "method" : "deposit_authorized",
2460 "error" : "badSyntax",
2462 "error_message" : "Syntax error."
2466 {"deposit_authorized: too many arguments.",
2468 {
"deposit_authorized",
2469 "source_account_NotValidated",
2470 "destination_account_NotValidated",
2471 "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789",
2483 "method" : "deposit_authorized",
2486 "error" : "badSyntax",
2488 "error_message" : "Syntax error."
2492 {"deposit_authorized: invalid ledger selection.",
2495 "deposit_authorized",
2496 "source_account_NotValidated",
2497 "destination_account_NotValidated",
2502 "method" : "deposit_authorized",
2505 "api_version" : %API_VER%,
2506 "destination_account" : "destination_account_NotValidated",
2508 "source_account" : "source_account_NotValidated"
2515 {
"feature: minimal.",
2522 "method" : "feature",
2525 "api_version" : %API_VER%,
2529 {"feature: with name.",
2531 {
"feature",
"featureNameOrHexIsNotValidated"},
2534 "method" : "feature",
2537 "api_version" : %API_VER%,
2538 "feature" : "featureNameOrHexIsNotValidated"
2542 {"feature: accept.",
2545 "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA98"
2550 "method" : "feature",
2553 "api_version" : %API_VER%,
2554 "feature" : "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210",
2559 {"feature: reject.",
2561 {
"feature",
"0",
"reject"},
2564 "method" : "feature",
2567 "api_version" : %API_VER%,
2573 {"feature: too many arguments.",
2575 {
"feature",
"featureNameOrHexIsNotValidated",
"accept",
"anotherArg"},
2578 "method" : "feature",
2581 "error" : "badSyntax",
2583 "error_message" : "Syntax error."
2587 {"feature: neither accept nor reject.",
2591 "featureNameOrHexIsNotValidated",
2596 "method" : "feature",
2599 "error" : "invalidParams",
2601 "error_message" : "Invalid parameters."
2608 {
"fetch_info: minimal.",
2615 "method" : "fetch_info",
2618 "api_version" : %API_VER%,
2622 {"fetch_info: clear.",
2624 {
"fetch_info",
"clear"},
2627 "method" : "fetch_info",
2630 "api_version" : %API_VER%,
2635 {"fetch_info: too many arguments.",
2637 {
"fetch_info",
"clear",
"other"},
2640 "method" : "fetch_info",
2643 "error" : "badSyntax",
2645 "error_message" : "Syntax error."
2649 {"fetch_info: other trailing argument.",
2651 {
"fetch_info",
"too"},
2654 "method" : "fetch_info",
2657 "api_version" : %API_VER%,
2665 {
"gateway_balances: minimal.",
2667 {
"gateway_balances",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2670 "method" : "gateway_balances",
2673 "api_version" : %API_VER%,
2674 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2678 {"gateway_balances: with ledger index.",
2680 {
"gateway_balances",
"890765",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2683 "method" : "gateway_balances",
2686 "api_version" : %API_VER%,
2687 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2688 "ledger_index" : "890765"
2692 {"gateway_balances: with text ledger index.",
2694 {
"gateway_balances",
"current",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2697 "method" : "gateway_balances",
2700 "api_version" : %API_VER%,
2701 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2702 "ledger_index" : "current"
2706 {"gateway_balances: with 64 character ledger hash.",
2708 {
"gateway_balances",
2709 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
2710 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
2713 "method" : "gateway_balances",
2716 "api_version" : %API_VER%,
2717 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2718 "ledger_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
2722 {"gateway_balances: 1 hotwallet.",
2724 {
"gateway_balances",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"hotwallet_is_not_validated"},
2727 "method" : "gateway_balances",
2730 "api_version" : %API_VER%,
2731 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2732 "hotwallet" : [ "hotwallet_is_not_validated" ]
2736 {"gateway_balances: 3 hotwallets.",
2740 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
2741 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2742 "hotwallet_is_not_validated_1",
2743 "hotwallet_is_not_validated_2",
2744 "hotwallet_is_not_validated_3",
2748 "method" : "gateway_balances",
2751 "api_version" : %API_VER%,
2752 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2754 "hotwallet_is_not_validated_1",
2755 "hotwallet_is_not_validated_2",
2756 "hotwallet_is_not_validated_3"
2758 "ledger_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
2762 {"gateway_balances: too few arguments.",
2769 "method" : "gateway_balances",
2772 "error" : "badSyntax",
2774 "error_message" : "Syntax error."
2778 {"gateway_balances: empty first argument.",
2780 {
"gateway_balances",
""},
2783 "method" : "gateway_balances",
2786 "error" : "invalidParams",
2788 "error_message" : "Invalid first parameter"
2792 {"gateway_balances: with ledger index but no gateway.",
2800 "method" : "gateway_balances",
2803 "error" : "invalidParams",
2805 "error_message" : "Invalid hotwallet"
2809 {"gateway_balances: with text ledger index but no gateway.",
2817 "method" : "gateway_balances",
2820 "error" : "invalidParams",
2822 "error_message" : "Invalid hotwallet"
2826 {"gateway_balances: with 64 character ledger hash but no gateway.",
2830 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
2834 "method" : "gateway_balances",
2837 "error" : "invalidParams",
2839 "error_message" : "Invalid hotwallet"
2846 {
"get_counts: minimal.",
2853 "method" : "get_counts",
2856 "api_version" : %API_VER%,
2860 {"get_counts: with maximum count.",
2862 {
"get_counts",
"100"},
2865 "method" : "get_counts",
2868 "api_version" : %API_VER%,
2873 {"get_counts: too many arguments.",
2875 {
"get_counts",
"100",
"whatever"},
2878 "method" : "get_counts",
2881 "error" : "badSyntax",
2883 "error_message" : "Syntax error."
2887 {"get_counts: count too small.",
2895 {"get_counts: count too large.",
2897 {
"get_counts",
"4294967296"},
2908 R
"({"json_argument":true})",
2912 "method" : "command",
2915 "api_version" : %API_VER%,
2916 "json_argument" : true,
2917 "method" : "command"
2921 {"json: null object.",
2930 "method" : "command",
2933 "api_version" : %API_VER%,
2934 "method" : "command"
2938 {"json: too few arguments.",
2940 {
"json",
"command"},
2946 "error" : "badSyntax",
2948 "error_message" : "Syntax error."
2952 {"json: too many arguments.",
2954 {
"json",
"command", R
"({"json_argument":true})", "extra"},
2960 "error" : "badSyntax",
2962 "error_message" : "Syntax error."
2966 {"json: array, not object.",
2971 R
"(["arg1","arg2"])",
2978 "error" : "invalidParams",
2980 "error_message" : "Invalid parameters."
2984 {"json: invalid json (note closing comma).",
2989 R
"({"json_argument":true,})",
2996 "error" : "invalidParams",
2998 "error_message" : "Invalid parameters."
3005 {
"json2: minimal object.",
3009 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1"})",
3015 "method" : "call_1",
3018 "api_version" : %API_VER%,
3021 "method" : "call_1",
3027 {"json2: object with nested params.",
3033 "ripplerpc" : "2.0",
3035 "method" : "call_1",
3036 "params" : [{"inner_arg" : "yup"}]
3043 "method" : "call_1",
3046 "api_version" : %API_VER%,
3052 "method" : "call_1",
3058 {"json2: minimal array.",
3062 R
"([{"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1"}])",
3070 "api_version" : %API_VER%,
3073 "method" : "call_1",
3079 {"json2: array with object with nested params.",
3088 "params" : [{"inner_arg" : "yup"}]}
3097 "api_version" : %API_VER%,
3103 "method" : "call_1",
3108 {"json2: too few arguments.",
3118 "error" : "badSyntax",
3120 "error_message" : "Syntax error."
3124 {"json2: too many arguments.",
3126 {
"json2", R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_this"})", "extra"},
3132 "error" : "badSyntax",
3134 "error_message" : "Syntax error."
3138 {"json2: malformed json (note extra comma).",
3142 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1",})",
3151 "error" : "invalidParams",
3153 "error_message" : "Invalid parameters.",
3161 {"json2: omit jsonrpc.",
3165 R
"({"ripplerpc":"2.0","id":"A1","method":"call_1"})",
3173 "error" : "invalidParams",
3175 "error_message" : "Invalid parameters.",
3182 {"json2: wrong jsonrpc version.",
3186 R
"({"jsonrpc":"2.1","ripplerpc":"2.0","id":"A1","method":"call_1"})",
3195 "error" : "invalidParams",
3197 "error_message" : "Invalid parameters.",
3205 {"json2: omit ripplerpc.",
3209 R
"({"jsonrpc":"2.0","id":"A1","method":"call_1"})",
3218 "error" : "invalidParams",
3220 "error_message" : "Invalid parameters.",
3226 {"json2: wrong ripplerpc version.",
3230 R
"({"jsonrpc":"2.0","ripplerpc":"2.00","id":"A1","method":"call_1"})",
3239 "error" : "invalidParams",
3241 "error_message" : "Invalid parameters.",
3244 "ripplerpc" : "2.00"
3247 "ripplerpc" : "2.00"
3253 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","method":"call_1"})",
3261 "error" : "invalidParams",
3263 "error_message" : "Invalid parameters.",
3270 {"json2: omit method.",
3274 R
"({"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1"})",
3283 "error" : "invalidParams",
3285 "error_message" : "Invalid parameters.",
3293 {"json2: empty outer array.",
3304 "error" : "invalidParams",
3306 "error_message" : "Invalid parameters."
3310 {"json2: empty inner array.",
3314 R
"([{"jsonrpc":"2.0","ripplerpc":"2.0","id":"A1","method":"call_1",[]}])",
3321 "error" : "invalidParams",
3323 "error_message" : "Invalid parameters."
3327 {"json2: array with non-json2 object.",
3333 "ripplerpc" : "2.0",
3344 "error" : "invalidParams",
3346 "error_message" : "Invalid parameters."
3350 {"json2: non-object or -array inner params member.",
3356 "ripplerpc" : "2.0",
3358 "method" : "call_1",
3369 "error" : "invalidParams",
3371 "error_message" : "Invalid parameters.",
3382 {
"ledger: minimal.",
3387 "method" : "ledger",
3390 "api_version" : %API_VER%,
3394 {"ledger: ledger index.",
3396 {
"ledger",
"4294967295"},
3399 "method" : "ledger",
3402 "api_version" : %API_VER%,
3403 "ledger_index" : 4294967295
3407 {"ledger: text ledger index.",
3409 {
"ledger",
"validated"},
3412 "method" : "ledger",
3415 "api_version" : %API_VER%,
3416 "ledger_index" : "validated"
3420 {"ledger: ledger hash.",
3422 {
"ledger",
"ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
3425 "method" : "ledger",
3428 "api_version" : %API_VER%,
3429 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"
3435 {
"ledger",
"current",
"full"},
3438 "method" : "ledger",
3441 "api_version" : %API_VER%,
3443 "ledger_index" : "current"
3449 {
"ledger",
"closed",
"tx"},
3452 "method" : "ledger",
3455 "api_version" : %API_VER%,
3457 "ledger_index" : "closed",
3458 "transactions" : true
3462 {"ledger: too many arguments.",
3464 {
"ledger",
"4294967295",
"spare"},
3467 "method" : "ledger",
3470 "api_version" : %API_VER%,
3471 "ledger_index" : 4294967295
3475 {"ledger: ledger index too small.",
3480 "method" : "ledger",
3483 "api_version" : %API_VER%,
3488 {"ledger: ledger index too big.",
3490 {
"ledger",
"4294967296"},
3493 "method" : "ledger",
3496 "api_version" : %API_VER%,
3501 {"ledger: invalid ledger text.",
3503 {
"ledger",
"latest"},
3506 "method" : "ledger",
3509 "api_version" : %API_VER%,
3514 {"ledger: unsupported final argument.",
3516 {
"ledger",
"current",
"expand"},
3519 "method" : "ledger",
3522 "api_version" : %API_VER%,
3523 "ledger_index" : "current"
3530 {
"ledger_closed: minimal.",
3535 "method" : "ledger_closed",
3538 "api_version" : %API_VER%,
3542 {"ledger_closed: too many arguments.",
3544 {
"ledger_closed",
"today"},
3547 "method" : "ledger_closed",
3550 "error" : "badSyntax",
3552 "error_message" : "Syntax error."
3559 {
"ledger_current: minimal.",
3564 "method" : "ledger_current",
3567 "api_version" : %API_VER%,
3571 {"ledger_current: too many arguments.",
3573 {
"ledger_current",
"today"},
3576 "method" : "ledger_current",
3579 "error" : "badSyntax",
3581 "error_message" : "Syntax error."
3588 {
"ledger_header: ledger index.",
3590 {
"ledger_header",
"4294967295"},
3593 "method" : "ledger_header",
3596 "api_version" : %API_VER%,
3597 "ledger_index" : 4294967295
3601 {"ledger_header: ledger hash.",
3603 {
"ledger_header",
"ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
3606 "method" : "ledger_header",
3609 "api_version" : %API_VER%,
3610 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"
3614 {"ledger_header: too few arguments.",
3621 "method" : "ledger_header",
3624 "error" : "badSyntax",
3626 "error_message" : "Syntax error."
3630 {"ledger_header: too many arguments.",
3632 {
"ledger_header",
"4294967295",
"spare"},
3635 "method" : "ledger_header",
3638 "error" : "badSyntax",
3640 "error_message" : "Syntax error."
3644 {"ledger_header: text ledger index.",
3646 {
"ledger_header",
"current"},
3649 "method" : "ledger_header",
3652 "api_version" : %API_VER%,
3657 {"ledger_header: ledger index too small.",
3659 {
"ledger_header",
"-1"},
3662 "method" : "ledger_header",
3665 "api_version" : %API_VER%,
3670 {"ledger_header: ledger index too big.",
3672 {
"ledger_header",
"4294967296"},
3675 "method" : "ledger_header",
3678 "api_version" : %API_VER%,
3686 {
"ledger_request: ledger index.",
3688 {
"ledger_request",
"4294967295"},
3691 "method" : "ledger_request",
3694 "api_version" : %API_VER%,
3695 "ledger_index" : 4294967295
3699 {"ledger_request: ledger hash.",
3701 {
"ledger_request",
"ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"},
3704 "method" : "ledger_request",
3707 "api_version" : %API_VER%,
3708 "ledger_hash" : "ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789"
3712 {"ledger_request: too few arguments.",
3719 "method" : "ledger_request",
3722 "error" : "badSyntax",
3724 "error_message" : "Syntax error."
3728 {"ledger_request: too many arguments.",
3730 {
"ledger_request",
"4294967295",
"spare"},
3733 "method" : "ledger_request",
3736 "error" : "badSyntax",
3738 "error_message" : "Syntax error."
3742 {"ledger_request: text ledger index.",
3744 {
"ledger_request",
"current"},
3747 "method" : "ledger_request",
3750 "api_version" : %API_VER%,
3755 {"ledger_request: ledger index too small.",
3757 {
"ledger_request",
"-1"},
3760 "method" : "ledger_request",
3763 "api_version" : %API_VER%,
3768 {"ledger_request: ledger index too big.",
3770 {
"ledger_request",
"4294967296"},
3773 "method" : "ledger_request",
3776 "api_version" : %API_VER%,
3784 {
"log_level: minimal.",
3791 "method" : "log_level",
3794 "api_version" : %API_VER%,
3798 {"log_level: fatal.",
3800 {
"log_level",
"fatal"},
3803 "method" : "log_level",
3806 "api_version" : %API_VER%,
3807 "severity" : "fatal"
3811 {"log_level: error.",
3813 {
"log_level",
"error"},
3816 "method" : "log_level",
3819 "api_version" : %API_VER%,
3820 "severity" : "error"
3824 {"log_level: warn.",
3826 {
"log_level",
"warn"},
3829 "method" : "log_level",
3832 "api_version" : %API_VER%,
3837 {"log_level: debug.",
3839 {
"log_level",
"debug"},
3842 "method" : "log_level",
3845 "api_version" : %API_VER%,
3846 "severity" : "debug"
3850 {"log_level: trace.",
3852 {
"log_level",
"trace"},
3855 "method" : "log_level",
3858 "api_version" : %API_VER%,
3859 "severity" : "trace"
3863 {"log_level: base partition.",
3865 {
"log_level",
"base",
"trace"},
3868 "method" : "log_level",
3871 "api_version" : %API_VER%,
3872 "partition" : "base",
3873 "severity" : "trace"
3877 {"log_level: partition_name.",
3879 {
"log_level",
"partition_name",
"fatal"},
3882 "method" : "log_level",
3885 "api_version" : %API_VER%,
3886 "partition" : "partition_name",
3887 "severity" : "fatal"
3891 {"log_level: too many arguments.",
3893 {
"log_level",
"partition_name",
"fatal",
"extra"},
3896 "method" : "log_level",
3899 "error" : "badSyntax",
3901 "error_message" : "Syntax error."
3905 {"log_level: invalid severity.",
3907 {
"log_level",
"err"},
3910 "method" : "log_level",
3913 "api_version" : %API_VER%,
3918 {"log_level: swap partition name and severity.",
3927 "method" : "log_level",
3930 "api_version" : %API_VER%,
3931 "partition" : "fatal",
3932 "severity" : "partition_name"
3939 {
"logrotate: minimal.",
3946 "method" : "logrotate",
3949 "api_version" : %API_VER%,
3953 {"logrotate: too many arguments.",
3955 {
"logrotate",
"extra"},
3958 "method" : "logrotate",
3961 "error" : "badSyntax",
3963 "error_message" : "Syntax error."
3970 {
"owner_info: minimal.",
3972 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"},
3975 "method" : "owner_info",
3978 "api_version" : %API_VER%,
3979 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
3983 {"owner_info: with numeric ledger index.",
3985 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"987654321"},
3988 "method" : "owner_info",
3991 "api_version" : %API_VER%,
3992 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
3993 "ledger_index" : 987654321
3997 {"owner_info: with text ledger index.",
3999 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
4002 "method" : "owner_info",
4005 "api_version" : %API_VER%,
4006 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4007 "ledger_index" : "validated"
4011 {"owner_info: with ledger hash.",
4014 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4015 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"},
4018 "method" : "owner_info",
4021 "api_version" : %API_VER%,
4022 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4023 "ledger_hash" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
4027 {"owner_info: with ledger index.",
4029 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"validated"},
4032 "method" : "owner_info",
4035 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4036 "api_version" : %API_VER%,
4037 "ledger_index" : "validated"
4041 {"owner_info: too few arguments.",
4048 "method" : "owner_info",
4051 "error" : "badSyntax",
4053 "error_message" : "Syntax error."
4057 {"owner_info: too many arguments.",
4061 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4068 "method" : "owner_info",
4071 "error" : "badSyntax",
4073 "error_message" : "Syntax error."
4078 "owner_info: invalid accountID.",
4086 "method" : "owner_info",
4089 "error" : "actMalformed",
4091 "error_message" : "Account malformed."
4099 "owner_info: invalid ledger selection.",
4101 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
4104 "method" : "owner_info",
4107 "api_version" : %API_VER%,
4108 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4117 "owner_info: invalid ledger selection.",
4119 {
"owner_info",
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"no_ledger"},
4122 "method" : "owner_info",
4125 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4126 "api_version" : %API_VER%,
4145 "api_version" : %API_VER%,
4149 {"peers: too many arguments.",
4157 "error" : "badSyntax",
4159 "error_message" : "Syntax error."
4166 {
"peer_reservations_add: minimal.",
4168 {
"peer_reservations_add",
"public_key_string"},
4171 "method" : "peer_reservations_add",
4174 "api_version" : %API_VER%,
4175 "public_key" : "public_key_string"
4179 {"peer_reservations_add: with description.",
4181 {
"peer_reservations_add",
"public_key_string",
"public_key_description"},
4184 "method" : "peer_reservations_add",
4187 "api_version" : %API_VER%,
4188 "description" : "public_key_description",
4189 "public_key" : "public_key_string"
4193 {"peer_reservations_add: too few arguments.",
4195 {
"peer_reservations_add"},
4198 "method" : "peer_reservations_add",
4201 "error" : "badSyntax",
4203 "error_message" : "Syntax error."
4207 {"peer_reservations_add: too many arguments.",
4209 {
"peer_reservations_add",
"public_key_string",
"public_key_description",
"spare"},
4212 "method" : "peer_reservations_add",
4215 "error" : "badSyntax",
4217 "error_message" : "Syntax error."
4224 {
"peer_reservations_del: minimal.",
4226 {
"peer_reservations_del",
"public_key_string"},
4229 "method" : "peer_reservations_del",
4232 "api_version" : %API_VER%,
4233 "public_key" : "public_key_string"
4237 {"peer_reservations_del: too few arguments.",
4239 {
"peer_reservations_del"},
4242 "method" : "peer_reservations_del",
4245 "error" : "badSyntax",
4247 "error_message" : "Syntax error."
4251 {"peer_reservations_del: too many arguments.",
4253 {
"peer_reservations_del",
"public_key_string",
"public_key_description",
"spare"},
4256 "method" : "peer_reservations_del",
4259 "error" : "badSyntax",
4261 "error_message" : "Syntax error."
4278 "api_version" : %API_VER%,
4282 {"ping: too many arguments.",
4290 "error" : "badSyntax",
4292 "error_message" : "Syntax error."
4309 "api_version" : %API_VER%,
4314 "print: extra argument.",
4322 "api_version" : %API_VER%,
4323 "params" : [ "extra" ]
4327 {"print: too many arguments.",
4329 {
"print",
"extra1",
"extra2"},
4335 "error" : "badSyntax",
4337 "error_message" : "Syntax error."
4344 {
"random: minimal.",
4351 "method" : "random",
4354 "api_version" : %API_VER%,
4358 {"random: too many arguments.",
4360 {
"random",
"extra"},
4363 "method" : "random",
4366 "error" : "badSyntax",
4368 "error_message" : "Syntax error."
4375 {
"ripple_path_find: minimal.",
4379 R
"({"json_argument":true})",
4383 "method" : "ripple_path_find",
4386 "api_version" : %API_VER%,
4387 "json_argument" : true
4391 {"ripple_path_find: ledger index.",
4393 {
"ripple_path_find", R
"({"json_argument":true})", "4294967295"},
4396 "method" : "ripple_path_find",
4399 "api_version" : %API_VER%,
4400 "json_argument" : true,
4401 "ledger_index" : 4294967295
4405 {"ripple_path_find: text ledger index.",
4407 {
"ripple_path_find", R
"({"json_argument":true})", "closed"},
4410 "method" : "ripple_path_find",
4413 "api_version" : %API_VER%,
4414 "json_argument" : true,
4415 "ledger_index" : "closed"
4419 {"ripple_path_find: ledger hash.",
4421 {
"ripple_path_find",
4422 R
"({"json_argument":true})",
4423 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"},
4426 "method" : "ripple_path_find",
4429 "api_version" : %API_VER%,
4430 "json_argument" : true,
4431 "ledger_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
4436 {"ripple_path_find: too few arguments.",
4443 "method" : "ripple_path_find",
4446 "error" : "badSyntax",
4448 "error_message" : "Syntax error."
4452 {"ripple_path_find: too many arguments.",
4454 {
"ripple_path_find", R
"({"json_argument":true})", "current",
"extra"},
4457 "method" : "ripple_path_find",
4460 "error" : "badSyntax",
4462 "error_message" : "Syntax error."
4466 {"ripple_path_find: invalid json (note extra comma).",
4470 R
"({"json_argument":true,})",
4474 "method" : "ripple_path_find",
4477 "error" : "invalidParams",
4479 "error_message" : "Invalid parameters."
4483 {"ripple_path_find: ledger index too small.",
4485 {
"ripple_path_find", R
"({"json_argument":true})", "-1"},
4488 "method" : "ripple_path_find",
4491 "api_version" : %API_VER%,
4492 "json_argument" : true,
4497 {"ripple_path_find: ledger index too big.",
4499 {
"ripple_path_find", R
"({"json_argument":true})", "4294967296"},
4502 "method" : "ripple_path_find",
4505 "api_version" : %API_VER%,
4506 "json_argument" : true,
4511 {"ripple_path_find: invalid text ledger index.",
4513 {
"ripple_path_find", R
"({"json_argument":true})", "cur"},
4516 "method" : "ripple_path_find",
4519 "api_version" : %API_VER%,
4520 "json_argument" : true,
4533 R
"({"json_argument":true})",
4540 "api_version" : %API_VER%,
4541 "secret" : "my_secret",
4543 "json_argument" : true
4550 {
"sign",
"my_secret", R
"({"json_argument":true})", "offline"},
4556 "api_version" : %API_VER%,
4558 "secret" : "my_secret",
4560 "json_argument" : true
4565 {"sign: too few arguments.",
4567 {
"sign",
"contents_of_blob"},
4573 "error" : "badSyntax",
4575 "error_message" : "Syntax error."
4579 {"sign: offline flag with signature_target.",
4581 {
"sign",
"my_secret", R
"({"json_argument":true})", "offline",
"extra"},
4587 "api_version" : %API_VER%,
4589 "secret" : "my_secret",
4590 "signature_target" : "extra",
4593 "json_argument" : true
4598 {"sign: too many arguments.",
4602 R
"({"json_argument":true})",
4604 "CounterpartySignature",
4611 "error" : "badSyntax",
4613 "error_message" : "Syntax error."
4617 {"sign: invalid JSON (note extra comma).",
4622 R
"({"json_argument":true,})",
4629 "error" : "invalidParams",
4631 "error_message" : "Invalid parameters."
4635 {"sign: misspelled offline flag interpreted as signature_target.",
4637 {
"sign",
"my_secret", R
"({"json_argument":true})", "offlin"},
4643 "api_version" : %API_VER%,
4644 "secret" : "my_secret",
4645 "signature_target" : "offlin",
4648 "json_argument" : true
4656 {
"sign_for: minimal.",
4660 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4662 R
"({"json_argument":true})",
4666 "method" : "sign_for",
4669 "api_version" : %API_VER%,
4670 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4671 "secret" : "my_secret",
4673 "json_argument" : true
4678 {"sign_for: offline.",
4681 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4683 R
"({"json_argument":true})",
4687 "method" : "sign_for",
4690 "api_version" : %API_VER%,
4691 "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4693 "secret" : "my_secret",
4695 "json_argument" : true
4700 {"sign_for: too few arguments.",
4704 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4709 "method" : "sign_for",
4712 "error" : "badSyntax",
4714 "error_message" : "Syntax error."
4718 {"sign_for: too many arguments.",
4721 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4723 R
"({"json_argument":true})",
4728 "method" : "sign_for",
4731 "error" : "badSyntax",
4733 "error_message" : "Syntax error."
4737 {"sign_for: invalid json (note extra comma).",
4741 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4743 R
"({"json_argument":true,})",
4747 "method" : "sign_for",
4750 "error" : "invalidParams",
4752 "error_message" : "Invalid parameters."
4756 {"sign_for: invalid final argument.",
4759 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
4761 R
"({"json_argument":true})",
4765 "method" : "sign_for",
4768 "error" : "invalidParams",
4770 "error_message" : "Invalid parameters."
4779 {
"submit",
"the blob is unvalidated and may be any length..."},
4782 "method" : "submit",
4785 "api_version" : %API_VER%,
4786 "tx_blob" : "the blob is unvalidated and may be any length..."
4795 R
"({"json_argument":true})",
4799 "method" : "submit",
4802 "api_version" : %API_VER%,
4803 "secret" : "my_secret",
4805 "json_argument" : true
4810 {"submit: too few arguments.",
4817 "method" : "submit",
4820 "error" : "badSyntax",
4822 "error_message" : "Syntax error."
4827 "submit: four arguments.",
4829 {
"submit",
"my_secret", R
"({"json_argument":true})", "offline"},
4832 "method" : "submit",
4835 "api_version" : %API_VER%,
4837 "secret" : "my_secret",
4839 "json_argument" : true
4844 {"submit: offline flag with signature_target.",
4846 {
"submit",
"my_secret", R
"({"json_argument":true})", "offline",
"extra"},
4849 "method" : "submit",
4852 "api_version" : %API_VER%,
4854 "secret" : "my_secret",
4855 "signature_target" : "extra",
4858 "json_argument" : true
4863 {"submit: too many arguments.",
4867 R
"({"json_argument":true})",
4869 "CounterpartySignature",
4873 "method" : "submit",
4876 "error" : "badSyntax",
4878 "error_message" : "Syntax error."
4882 {"submit: invalid json (note extra comma).",
4887 R
"({"json_argument":true,})",
4891 "method" : "submit",
4894 "error" : "invalidParams",
4896 "error_message" : "Invalid parameters."
4900 {"submit: misspelled offline flag interpreted as signature_target.",
4902 {
"submit",
"my_secret", R
"({"json_argument":true})", "offlne"},
4905 "method" : "submit",
4908 "api_version" : %API_VER%,
4909 "secret" : "my_secret",
4910 "signature_target" : "offlne",
4913 "json_argument" : true
4921 {
"submit_multisigned: json.",
4924 "submit_multisigned",
4925 R
"({"json_argument":true})",
4929 "method" : "submit_multisigned",
4932 "api_version" : %API_VER%,
4934 "json_argument" : true
4939 {"submit_multisigned: too few arguments.",
4942 "submit_multisigned",
4946 "method" : "submit_multisigned",
4949 "error" : "badSyntax",
4951 "error_message" : "Syntax error."
4955 {"submit_multisigned: too many arguments.",
4957 {
"submit_multisigned", R
"({"json_argument":true})", "extra"},
4960 "method" : "submit_multisigned",
4963 "error" : "badSyntax",
4965 "error_message" : "Syntax error."
4969 {"submit_multisigned: invalid json (note extra comma).",
4972 "submit_multisigned",
4973 R
"({"json_argument":true,})",
4977 "method" : "submit_multisigned",
4980 "error" : "invalidParams",
4982 "error_message" : "Invalid parameters."
4990 {
"server_info: minimal.",
4997 "method" : "server_info",
5000 "api_version" : %API_VER%,
5004 {"server_info: counters.",
5006 {
"server_info",
"counters"},
5009 "method" : "server_info",
5012 "api_version" : %API_VER%,
5017 {"server_info: too many arguments.",
5019 {
"server_info",
"counters",
"extra"},
5022 "method" : "server_info",
5025 "error" : "badSyntax",
5027 "error_message" : "Syntax error."
5031 {"server_info: non-counters argument.",
5033 {
"server_info",
"counter"},
5036 "method" : "server_info",
5039 "api_version" : %API_VER%,
5046 {
"server_state: minimal.",
5053 "method" : "server_state",
5056 "api_version" : %API_VER%,
5060 {"server_state: counters.",
5062 {
"server_state",
"counters"},
5065 "method" : "server_state",
5068 "api_version" : %API_VER%,
5073 {"server_state: too many arguments.",
5075 {
"server_state",
"counters",
"extra"},
5078 "method" : "server_state",
5081 "error" : "badSyntax",
5083 "error_message" : "Syntax error."
5087 {"server_state: non-counters argument.",
5089 {
"server_state",
"counter"},
5092 "method" : "server_state",
5095 "api_version" : %API_VER%,
5112 "api_version" : %API_VER%,
5116 {"stop: too many arguments.",
5124 "error" : "badSyntax",
5126 "error_message" : "Syntax error."
5133 {
"transaction_entry: ledger index.",
5135 {
"transaction_entry",
5136 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5140 "method" : "transaction_entry",
5143 "api_version" : %API_VER%,
5144 "ledger_index" : 4294967295,
5145 "tx_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
5149 {"transaction_entry: text ledger index.",
5151 {
"transaction_entry",
5152 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5156 "method" : "transaction_entry",
5159 "api_version" : %API_VER%,
5160 "ledger_index" : "current",
5161 "tx_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
5165 {"transaction_entry: ledger hash.",
5167 {
"transaction_entry",
5168 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5169 "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA9876543210"},
5172 "method" : "transaction_entry",
5175 "api_version" : %API_VER%,
5176 "ledger_hash" : "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA9876543210",
5177 "tx_hash" : "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV"
5181 {"transaction_entry: too few arguments.",
5184 "transaction_entry",
5185 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5189 "method" : "transaction_entry",
5192 "error" : "badSyntax",
5194 "error_message" : "Syntax error."
5198 {"transaction_entry: too many arguments.",
5200 {
"transaction_entry",
5201 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5206 "method" : "transaction_entry",
5209 "error" : "badSyntax",
5211 "error_message" : "Syntax error."
5215 {"transaction_entry: short tx_hash.",
5218 "transaction_entry",
5219 "123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5224 "method" : "transaction_entry",
5227 "error" : "invalidParams",
5229 "error_message" : "Invalid parameters."
5233 {"transaction_entry: long tx_hash.",
5236 "transaction_entry",
5237 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUVW",
5242 "method" : "transaction_entry",
5245 "error" : "invalidParams",
5247 "error_message" : "Invalid parameters."
5251 {"transaction_entry: small ledger index.",
5254 "transaction_entry",
5255 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5260 "method" : "transaction_entry",
5263 "error" : "invalidParams",
5265 "error_message" : "Invalid parameters."
5269 {"transaction_entry: large ledger index.",
5272 "transaction_entry",
5273 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5278 "method" : "transaction_entry",
5281 "error" : "invalidParams",
5283 "error_message" : "Invalid parameters."
5287 {"transaction_entry: short ledger hash.",
5290 "transaction_entry",
5291 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5292 "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA987654321",
5296 "method" : "transaction_entry",
5299 "error" : "invalidParams",
5301 "error_message" : "Invalid parameters."
5305 {"transaction_entry: long ledger hash.",
5308 "transaction_entry",
5309 "0123456789ABCDEFGHIJKLMNOPQRSTUV0123456789ABCDEFGHIJKLMNOPQRSTUV",
5310 "VUTSRQPONMLKJIHGFEDCBA9876543210VUTSRQPONMLKJIHGFEDCBA9876543210Z",
5314 "method" : "transaction_entry",
5317 "error" : "invalidParams",
5319 "error_message" : "Invalid parameters."
5326 {
"tx: ctid. minimal",
5328 {
"tx",
"FFFFFFFFFFFFFFFF",
"1",
"2"},
5334 "api_version" : %API_VER%,
5335 "ctid" : "FFFFFFFFFFFFFFFF",
5341 {"tx: ctid. binary",
5343 {
"tx",
"FFFFFFFFFFFFFFFF",
"binary",
"1",
"2"},
5349 "api_version" : %API_VER%,
5351 "ctid" : "FFFFFFFFFFFFFFFF",
5359 {
"tx",
"transaction_hash_is_not_validated"},
5365 "api_version" : %API_VER%,
5366 "transaction" : "transaction_hash_is_not_validated"
5372 {
"tx",
"transaction_hash_is_not_validated",
"binary"},
5378 "api_version" : %API_VER%,
5380 "transaction" : "transaction_hash_is_not_validated"
5384 {"tx: too few arguments.",
5394 "error" : "badSyntax",
5396 "error_message" : "Syntax error."
5400 {"tx: too many arguments.",
5402 {
"tx",
"transaction_hash_is_not_validated",
"binary",
"1",
"2",
"extra"},
5408 "error" : "badSyntax",
5410 "error_message" : "Syntax error."
5414 {"tx: invalid final argument is apparently ignored.",
5416 {
"tx",
"transaction_hash_is_not_validated",
"bin"},
5422 "api_version" : %API_VER%,
5423 "transaction" : "transaction_hash_is_not_validated"
5430 {
"tx_history: minimal.",
5432 {
"tx_history",
"0"},
5435 "method" : "tx_history",
5438 "api_version" : %API_VER%,
5443 {"tx_history: too few arguments.",
5450 "method" : "tx_history",
5453 "error" : "badSyntax",
5455 "error_message" : "Syntax error."
5459 {"tx_history: too many arguments.",
5461 {
"tx_history",
"0",
"1"},
5464 "method" : "tx_history",
5467 "error" : "badSyntax",
5469 "error_message" : "Syntax error."
5475 "tx_history: start too small.",
5477 {
"tx_history",
"-1"},
5483 "tx_history: start too big.",
5485 {
"tx_history",
"4294967296"},
5491 "tx_history: start not integer.",
5493 {
"tx_history",
"beginning"},
5500 {
"unl_list: minimal.",
5507 "method" : "unl_list",
5510 "api_version" : %API_VER%,
5514 {"unl_list: too many arguments.",
5516 {
"unl_list",
"extra"},
5519 "method" : "unl_list",
5522 "error" : "badSyntax",
5524 "error_message" : "Syntax error."
5531 {
"validation_create: minimal.",
5534 "validation_create",
5538 "method" : "validation_create",
5541 "api_version" : %API_VER%,
5545 {"validation_create: with secret.",
5547 {
"validation_create",
"the form of the secret is not validated"},
5550 "method" : "validation_create",
5553 "api_version" : %API_VER%,
5554 "secret" : "the form of the secret is not validated"
5558 {"validation_create: too many arguments.",
5560 {
"validation_create",
"the form of the secret is not validated",
"extra"},
5563 "method" : "validation_create",
5566 "error" : "badSyntax",
5568 "error_message" : "Syntax error."
5575 {
"version: minimal.",
5582 "method" : "version",
5585 "api_version" : %API_VER%,
5589 {"version: too many arguments.",
5591 {
"version",
"extra"},
5594 "method" : "version",
5597 "error" : "badSyntax",
5599 "error_message" : "Syntax error."
5606 {
"wallet_propose: minimal.",
5613 "method" : "wallet_propose",
5616 "api_version" : %API_VER%,
5620 {"wallet_propose: with passphrase.",
5622 {
"wallet_propose",
"the form of the passphrase is not validated"},
5625 "method" : "wallet_propose",
5628 "api_version" : %API_VER%,
5629 "passphrase" : "the form of the passphrase is not validated"
5633 {"wallet_propose: too many arguments.",
5635 {
"wallet_propose",
"the form of the passphrase is not validated",
"extra"},
5638 "method" : "wallet_propose",
5641 "error" : "badSyntax",
5643 "error_message" : "Syntax error."
5650 {
"internal: minimal.",
5652 {
"internal",
"command_name"},
5655 "method" : "internal",
5658 "api_version" : %API_VER%,
5659 "internal_command" : "command_name",
5664 {"internal: with parameters.",
5666 {
"internal",
"command_name",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5669 "method" : "internal",
5672 "api_version" : %API_VER%,
5673 "internal_command" : "command_name",
5674 "params" : [ "string_arg", "1", "-1", "4294967296", "3.14159" ]
5678 {"internal: too few arguments.",
5685 "method" : "internal",
5688 "error" : "badSyntax",
5690 "error_message" : "Syntax error."
5697 {
"path_find: minimal.",
5704 "method" : "path_find",
5707 "error" : "noEvents",
5709 "error_message" : "Current transport does not support events."
5713 {"path_find: with arguments.",
5715 {
"path_find",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5718 "method" : "path_find",
5721 "error" : "noEvents",
5723 "error_message" : "Current transport does not support events."
5730 {
"subscribe: minimal.",
5737 "method" : "subscribe",
5740 "error" : "noEvents",
5742 "error_message" : "Current transport does not support events."
5746 {"subscribe: with arguments.",
5748 {
"subscribe",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5751 "method" : "subscribe",
5754 "error" : "noEvents",
5756 "error_message" : "Current transport does not support events."
5763 {
"unsubscribe: minimal.",
5770 "method" : "unsubscribe",
5773 "error" : "noEvents",
5775 "error_message" : "Current transport does not support events."
5779 {"unsubscribe: with arguments.",
5781 {
"unsubscribe",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5784 "method" : "unsubscribe",
5787 "error" : "noEvents",
5789 "error_message" : "Current transport does not support events."
5796 {
"unknown_command: minimal.",
5803 "method" : "unknown_command",
5806 "api_version" : %API_VER%,
5810 {"unknown_command: with arguments.",
5812 {
"unknown_command",
"string_arg",
"1",
"-1",
"4294967296",
"3.14159"},
5815 "method" : "unknown_command",
5818 "api_version" : %API_VER%,
5819 "params" : [ "string_arg", "1", "-1", "4294967296", "3.14159" ]
5829 static auto const place_holder =
"%API_VER%";
5831 boost::replace_all(jr, place_holder, version_str);
5838 using namespace test::jtx;
5840 cfg->NETWORK_ID = networkID;
5851 testcase <<
"RPCCall API version " << apiVersion;
5862 if (!BEAST_EXPECT(!rpcCallTest.exp.empty()))
5867 char const*
const expVersioned =
5870 : rpcCallTest.exp.back();
5888 fail(rpcCallTest.description, __FILE__, rpcCallTest.line);
5900 if (
json.isMember(jss::params) &&
json[jss::params].isArray() &&
5901 json[jss::params].size() > 0 &&
json[jss::params][0u].isObject())
5903 json[jss::params][0u].removeMember(jss::error_code);
5916 fail(rpcCallTest.description, __FILE__, rpcCallTest.line);
Unserialize a JSON document into a Value.
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
void pass()
Record a successful test condition.
testcase_t testcase
Memberspace for declaring test cases.
void fail(String const &reason, char const *file, int line)
Record a failure.
void run() override
Runs the suite.
void testRPCCall(unsigned apiVersion)
A transaction testing environment.
beast::Journal const journal
Set the expected result code for a JTx The test will fail if the code doesn't match.
static constexpr auto apiMinimumSupportedVersion
static constexpr auto apiMaximumValidVersion
Json::Value cmdToJSONRPC(std::vector< std::string > const &args, beast::Journal j, unsigned int apiVersion)
Given a rippled unit test rpc command, return the corresponding JSON.
std::unique_ptr< Config > envconfig()
creates and initializes a default configuration for jtx::Env
std::unique_ptr< Config > makeNetworkConfig(uint32_t networkID)
static RPCCallTestData const rpcCallTestArray[]
std::string updateAPIVersionString(char const *const req, unsigned apiVersion)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void forAllApiVersions(Fn const &fn, Args &&... args)
std::vector< char const * > exp
RPCCallTestData & operator=(RPCCallTestData &&)=delete
RPCCallTestData(char const *description_, int line_, std::initializer_list< char const * > const &args_, Exception throwsWhat_, std::initializer_list< char const * > exp_)
RPCCallTestData(char const *description_, int line_, std::initializer_list< char const * > const &args_, Exception throwsWhat_, 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