2#include <test/jtx/envconfig.h>
4#include <xrpld/app/misc/LoadFeeTrack.h>
5#include <xrpld/app/misc/TxQ.h>
6#include <xrpld/core/ConfigSections.h>
7#include <xrpld/rpc/detail/TransactionSign.h>
9#include <xrpl/basics/contract.h>
10#include <xrpl/beast/unit_test.h>
11#include <xrpl/json/json_reader.h>
12#include <xrpl/protocol/ErrorCodes.h>
35 char const* description_,
54 {
"Minimal payment, no Amount only DeliverMax",
57 "command": "doesnt_matter",
58 "secret": "masterpassphrase",
60 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
61 "DeliverMax": "1000000000",
62 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
63 "TransactionType": "Payment"
68 "Missing field 'account'.",
69 "Missing field 'tx_json.Sequence'."}}},
71 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
74 "command": "doesnt_matter",
75 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
76 "secret": "masterpassphrase",
79 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
80 "Amount": "1000000000",
81 "DeliverMax": "1000000000",
82 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
83 "TransactionType": "Payment"
88 "Missing field 'tx_json.Sequence'.",
89 "Missing field 'tx_json.Sequence'."}}},
91 {
"Pass in Sequence, no Amount only DeliverMax",
94 "command": "doesnt_matter",
95 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
96 "secret": "masterpassphrase",
99 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
100 "DeliverMax": "1000000000",
101 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
102 "TransactionType": "Payment"
107 "Missing field 'tx_json.Fee'.",
108 "Missing field 'tx_json.SigningPubKey'."}}},
110 {
"Pass in Sequence and Fee with minimal payment, both Amount and "
114 "command": "doesnt_matter",
115 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
116 "secret": "masterpassphrase",
120 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
121 "Amount": "1000000000",
122 "DeliverMax": "1000000000",
123 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
124 "TransactionType": "Payment"
129 "A Signer may not be the transaction's Account "
130 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
131 "Missing field 'tx_json.SigningPubKey'."}}},
133 {
"Add 'fee_mult_max' field.",
136 "command": "doesnt_matter",
137 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
138 "secret": "masterpassphrase",
142 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
143 "Amount": "1000000000",
144 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
145 "TransactionType": "Payment"
150 "Missing field 'tx_json.Fee'.",
151 "Missing field 'tx_json.SigningPubKey'."}}},
153 {
"Add 'fee_mult_max' and 'fee_div_max' field.",
156 "command": "doesnt_matter",
157 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
158 "secret": "masterpassphrase",
163 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
164 "Amount": "1000000000",
165 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
166 "TransactionType": "Payment"
171 "Missing field 'tx_json.Fee'.",
172 "Missing field 'tx_json.SigningPubKey'."}}},
174 {
"fee_mult_max is ignored if 'Fee' is present.",
177 "command": "doesnt_matter",
178 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
179 "secret": "masterpassphrase",
184 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
185 "Amount": "1000000000",
186 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
187 "TransactionType": "Payment"
192 "A Signer may not be the transaction's Account "
193 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
194 "Missing field 'tx_json.SigningPubKey'."}}},
196 {
"fee_div_max is ignored if 'Fee' is present.",
199 "command": "doesnt_matter",
200 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
201 "secret": "masterpassphrase",
207 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
208 "Amount": "1000000000",
209 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
210 "TransactionType": "Payment"
215 "A Signer may not be the transaction's Account "
216 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
217 "Missing field 'tx_json.SigningPubKey'."}}},
219 {
"Invalid 'fee_mult_max' field.",
222 "command": "doesnt_matter",
223 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
224 "secret": "masterpassphrase",
225 "fee_mult_max": "NotAFeeMultiplier",
228 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
229 "Amount": "1000000000",
230 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
231 "TransactionType": "Payment"
234 {{"Invalid field 'fee_mult_max', not a positive integer.",
235 "Invalid field 'fee_mult_max', not a positive integer.",
236 "Missing field 'tx_json.Fee'.",
237 "Missing field 'tx_json.SigningPubKey'."}}},
239 {
"Invalid 'fee_div_max' field.",
242 "command": "doesnt_matter",
243 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
244 "secret": "masterpassphrase",
246 "fee_div_max": "NotAFeeMultiplier",
249 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
250 "Amount": "1000000000",
251 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
252 "TransactionType": "Payment"
255 {{"Invalid field 'fee_div_max', not a positive integer.",
256 "Invalid field 'fee_div_max', not a positive integer.",
257 "Missing field 'tx_json.Fee'.",
258 "Missing field 'tx_json.SigningPubKey'."}}},
260 {
"Invalid value for 'fee_mult_max' field.",
263 "command": "doesnt_matter",
264 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
265 "secret": "masterpassphrase",
269 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
270 "Amount": "1000000000",
271 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
272 "TransactionType": "Payment"
275 {{"Fee of 10 exceeds the requested tx limit of 0",
276 "Fee of 10 exceeds the requested tx limit of 0",
277 "Missing field 'tx_json.Fee'.",
278 "Missing field 'tx_json.SigningPubKey'."}}},
280 {
"Invalid value for 'fee_div_max' field.",
283 "command": "doesnt_matter",
284 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
285 "secret": "masterpassphrase",
290 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
291 "Amount": "1000000000",
292 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
293 "TransactionType": "Payment"
296 {{"Fee of 10 exceeds the requested tx limit of 5",
297 "Fee of 10 exceeds the requested tx limit of 5",
298 "Missing field 'tx_json.Fee'.",
299 "Missing field 'tx_json.SigningPubKey'."}}},
301 {
"Invalid zero value for 'fee_div_max' field.",
304 "command": "doesnt_matter",
305 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
306 "secret": "masterpassphrase",
311 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
312 "Amount": "1000000000",
313 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
314 "TransactionType": "Payment"
317 {{"Invalid field 'fee_div_max', not a positive integer.",
318 "Invalid field 'fee_div_max', not a positive integer.",
319 "Missing field 'tx_json.Fee'.",
320 "Missing field 'tx_json.SigningPubKey'."}}},
322 {
"Missing 'Amount'.",
325 "command": "doesnt_matter",
326 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
327 "secret": "masterpassphrase",
329 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
330 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
331 "TransactionType": "Payment"
334 {{"Missing field 'tx_json.Amount'.",
335 "Missing field 'tx_json.Amount'.",
336 "Missing field 'tx_json.Sequence'.",
337 "Missing field 'tx_json.Sequence'."}}},
339 {
"Invalid 'Amount'.",
342 "command": "doesnt_matter",
343 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
344 "secret": "masterpassphrase",
346 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
347 "Amount": "NotAnAmount",
348 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
349 "TransactionType": "Payment"
352 {{"Invalid field 'tx_json.Amount'.",
353 "Invalid field 'tx_json.Amount'.",
354 "Missing field 'tx_json.Sequence'.",
355 "Missing field 'tx_json.Sequence'."}}},
357 {
"Missing 'Destination'.",
360 "command": "doesnt_matter",
361 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
362 "secret": "masterpassphrase",
364 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
365 "Amount": "1000000000",
366 "TransactionType": "Payment"
369 {{"Missing field 'tx_json.Destination'.",
370 "Missing field 'tx_json.Destination'.",
371 "Missing field 'tx_json.Sequence'.",
372 "Missing field 'tx_json.Sequence'."}}},
374 {
"Invalid 'Destination'.",
377 "command": "doesnt_matter",
378 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
379 "secret": "masterpassphrase",
381 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
382 "Amount": "1000000000",
383 "Destination": "NotADestination",
384 "TransactionType": "Payment"
387 {{"Invalid field 'tx_json.Destination'.",
388 "Invalid field 'tx_json.Destination'.",
389 "Missing field 'tx_json.Sequence'.",
390 "Missing field 'tx_json.Sequence'."}}},
392 {
"Cannot create XRP to XRP paths.",
395 "command": "doesnt_matter",
396 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
397 "secret": "masterpassphrase",
400 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
401 "Amount": "1000000000",
402 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
403 "TransactionType": "Payment"
406 {{"Cannot build XRP to XRP paths.",
407 "Cannot build XRP to XRP paths.",
408 "Missing field 'tx_json.Sequence'.",
409 "Missing field 'tx_json.Sequence'."}}},
411 {
"Successful 'build_path'.",
414 "command": "doesnt_matter",
415 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
416 "secret": "masterpassphrase",
419 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
423 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
425 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
426 "TransactionType": "Payment"
431 "Missing field 'tx_json.Sequence'.",
432 "Missing field 'tx_json.Sequence'."}}},
434 {
"Not valid to include both 'Paths' and 'build_path'.",
437 "command": "doesnt_matter",
438 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
439 "secret": "masterpassphrase",
442 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
446 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
448 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
450 "TransactionType": "Payment"
453 {{"Cannot specify both 'tx_json.Paths' and 'build_path'",
454 "Cannot specify both 'tx_json.Paths' and 'build_path'",
455 "Missing field 'tx_json.Sequence'.",
456 "Missing field 'tx_json.Sequence'."}}},
458 {
"Successful 'SendMax'.",
461 "command": "doesnt_matter",
462 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
463 "secret": "masterpassphrase",
466 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
470 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
475 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
477 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
478 "TransactionType": "Payment"
483 "Missing field 'tx_json.Sequence'.",
484 "Missing field 'tx_json.Sequence'."}}},
486 {
"'Amount' may not be XRP for pathfinding, but 'SendMax' may be XRP.",
489 "command": "doesnt_matter",
490 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
491 "secret": "masterpassphrase",
494 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
498 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
501 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
502 "TransactionType": "Payment"
507 "Missing field 'tx_json.Sequence'.",
508 "Missing field 'tx_json.Sequence'."}}},
510 {
"'secret' must be present.",
513 "command": "doesnt_matter",
514 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
516 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
517 "Amount": "1000000000",
518 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
519 "TransactionType": "Payment"
522 {{"Missing field 'secret'.",
523 "Missing field 'secret'.",
524 "Missing field 'tx_json.Sequence'.",
525 "Missing field 'tx_json.Sequence'."}}},
527 {
"'secret' must be non-empty.",
530 "command": "doesnt_matter",
531 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
534 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
535 "Amount": "1000000000",
536 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
537 "TransactionType": "Payment"
540 {{"Invalid field 'secret'.",
541 "Invalid field 'secret'.",
542 "Missing field 'tx_json.Sequence'.",
543 "Missing field 'tx_json.Sequence'."}}},
545 {
"Use 'seed' instead of 'secret'.",
548 "command": "doesnt_matter",
549 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
550 "key_type": "ed25519",
551 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
553 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
554 "Amount": "1000000000",
555 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
556 "TransactionType": "Payment"
561 "Missing field 'tx_json.Sequence'.",
562 "Missing field 'tx_json.Sequence'."}}},
564 {
"Malformed 'seed'.",
567 "command": "doesnt_matter",
568 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
569 "key_type": "ed25519",
570 "seed": "not a seed",
572 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
573 "Amount": "1000000000",
574 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
575 "TransactionType": "Payment"
578 {{"Disallowed seed.",
580 "Missing field 'tx_json.Sequence'.",
581 "Missing field 'tx_json.Sequence'."}}},
583 {
"'tx_json' must be present.",
586 "command": "doesnt_matter",
587 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
588 "secret": "masterpassphrase",
590 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
591 "Amount": "1000000000",
592 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
593 "TransactionType": "Payment"
596 {{"Missing field 'tx_json'.",
597 "Missing field 'tx_json'.",
598 "Missing field 'tx_json'.",
599 "Missing field 'tx_json'."}}},
601 {
"'TransactionType' must be present.",
604 "command": "doesnt_matter",
605 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
606 "secret": "masterpassphrase",
608 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
609 "Amount": "1000000000",
610 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
613 {{"Missing field 'tx_json.TransactionType'.",
614 "Missing field 'tx_json.TransactionType'.",
615 "Missing field 'tx_json.Sequence'.",
616 "Missing field 'tx_json.Sequence'."}}},
618 {
"The 'TransactionType' must be a pre-established transaction type.",
621 "command": "doesnt_matter",
622 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
623 "secret": "masterpassphrase",
625 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
626 "Amount": "1000000000",
627 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
628 "TransactionType": "tt"
631 {{"Field 'tx_json.TransactionType' has invalid data.",
632 "Field 'tx_json.TransactionType' has invalid data.",
633 "Missing field 'tx_json.Sequence'.",
634 "Missing field 'tx_json.Sequence'."}}},
636 {
"The 'TransactionType' may be represented with an integer.",
639 "command": "doesnt_matter",
640 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
641 "secret": "masterpassphrase",
643 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
644 "Amount": "1000000000",
645 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
651 "Missing field 'tx_json.Sequence'.",
652 "Missing field 'tx_json.Sequence'."}}},
654 {
"'Account' must be present.",
657 "command": "doesnt_matter",
658 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
659 "secret": "masterpassphrase",
661 "Amount": "1000000000",
662 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
663 "TransactionType": "Payment"
666 {{"Missing field 'tx_json.Account'.",
667 "Missing field 'tx_json.Account'.",
668 "Missing field 'tx_json.Sequence'.",
669 "Missing field 'tx_json.Sequence'."}}},
671 {
"'Account' must be well formed.",
674 "command": "doesnt_matter",
675 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
676 "secret": "masterpassphrase",
678 "Account": "NotAnAccount",
679 "Amount": "1000000000",
680 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
681 "TransactionType": "Payment"
684 {{"Invalid field 'tx_json.Account'.",
685 "Invalid field 'tx_json.Account'.",
686 "Missing field 'tx_json.Sequence'.",
687 "Missing field 'tx_json.Sequence'."}}},
689 {
"The 'offline' tag may be added to the transaction.",
692 "command": "doesnt_matter",
693 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
694 "secret": "masterpassphrase",
697 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
698 "Amount": "1000000000",
699 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
700 "TransactionType": "Payment"
705 "Missing field 'tx_json.Sequence'.",
706 "Missing field 'tx_json.Sequence'."}}},
708 {
"If 'offline' is true then a 'Sequence' field must be supplied.",
711 "command": "doesnt_matter",
712 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
713 "secret": "masterpassphrase",
717 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
718 "Amount": "1000000000",
719 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
720 "TransactionType": "Payment"
723 {{"Missing field 'tx_json.Sequence'.",
724 "Missing field 'tx_json.Sequence'.",
725 "Missing field 'tx_json.Sequence'.",
726 "Missing field 'tx_json.Sequence'."}}},
728 {
"If 'offline' is true then a 'Fee' field must be supplied.",
731 "command": "doesnt_matter",
732 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
733 "secret": "masterpassphrase",
737 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
738 "Amount": "1000000000",
739 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
740 "TransactionType": "Payment"
743 {{"Missing field 'tx_json.Fee'.",
744 "Missing field 'tx_json.Fee'.",
745 "Missing field 'tx_json.Fee'.",
746 "Missing field 'tx_json.SigningPubKey'."}}},
748 {
"Valid transaction if 'offline' is true.",
751 "command": "doesnt_matter",
752 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
753 "secret": "masterpassphrase",
758 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
759 "Amount": "1000000000",
760 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
761 "TransactionType": "Payment"
766 "A Signer may not be the transaction's Account "
767 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
768 "Missing field 'tx_json.SigningPubKey'."}}},
770 {
"'offline' and 'build_path' are mutually exclusive.",
773 "command": "doesnt_matter",
774 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
775 "secret": "masterpassphrase",
781 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
782 "Amount": "1000000000",
783 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
784 "TransactionType": "Payment"
787 {{"Field 'build_path' not allowed in this context.",
788 "Field 'build_path' not allowed in this context.",
789 "Field 'build_path' not allowed in this context.",
790 "Missing field 'tx_json.SigningPubKey'."}}},
792 {
"A 'Flags' field may be specified.",
795 "command": "doesnt_matter",
796 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
797 "secret": "masterpassphrase",
800 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
801 "Amount": "1000000000",
802 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
803 "TransactionType": "Payment"
808 "Missing field 'tx_json.Sequence'.",
809 "Missing field 'tx_json.Sequence'."}}},
811 {
"The 'Flags' field must be numeric.",
814 "command": "doesnt_matter",
815 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
816 "secret": "masterpassphrase",
818 "Flags": "NotGoodFlags",
819 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
820 "Amount": "1000000000",
821 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
822 "TransactionType": "Payment"
825 {{"Field 'tx_json.Flags' has invalid data.",
826 "Field 'tx_json.Flags' has invalid data.",
827 "Missing field 'tx_json.Sequence'.",
828 "Missing field 'tx_json.Sequence'."}}},
830 {
"It's okay to add a 'debug_signing' field.",
833 "command": "doesnt_matter",
834 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
835 "secret": "masterpassphrase",
838 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
839 "Amount": "1000000000",
840 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
841 "TransactionType": "Payment"
846 "Missing field 'tx_json.Sequence'.",
847 "Missing field 'tx_json.Sequence'."}}},
849 {
"Single-sign a multisigned transaction.",
852 "command": "doesnt_matter",
853 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
856 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
857 "Amount" : "1000000000",
858 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
864 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
865 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
866 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
870 "SigningPubKey" : "",
871 "TransactionType" : "Payment"
874 {{"Already multisigned.",
875 "Already multisigned.",
876 "Secret does not match account.",
879 {
"Minimal sign_for.",
882 "command": "doesnt_matter",
883 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
884 "secret": "masterpassphrase",
886 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
887 "Amount": "1000000000",
888 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
892 "TransactionType": "Payment"
895 {{"Secret does not match account.",
896 "Secret does not match account.",
898 "Missing field 'tx_json.Signers'."}}},
900 {
"Minimal offline sign_for.",
903 "command": "doesnt_matter",
904 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
905 "secret": "masterpassphrase",
908 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
909 "Amount": "1000000000",
910 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
914 "TransactionType": "Payment"
917 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
919 {
"Offline sign_for using 'seed' instead of 'secret'.",
922 "command": "doesnt_matter",
923 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
924 "key_type": "ed25519",
925 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
928 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
929 "Amount": "1000000000",
930 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
934 "TransactionType": "Payment"
937 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
939 {
"Malformed seed in sign_for.",
942 "command": "doesnt_matter",
943 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
944 "key_type": "ed25519",
945 "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd",
948 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
949 "Amount": "1000000000",
950 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
954 "TransactionType": "Payment"
957 {{"Disallowed seed.",
960 "Missing field 'tx_json.Signers'."}}},
962 {
"Missing 'Account' in sign_for.",
965 "command": "doesnt_matter",
966 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
967 "secret": "masterpassphrase",
969 "Amount": "1000000000",
970 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
974 "TransactionType": "Payment"
977 {{"Missing field 'tx_json.Account'.",
978 "Missing field 'tx_json.Account'.",
979 "Missing field 'tx_json.Account'.",
980 "Missing field 'tx_json.Account'."}}},
982 {
"Missing 'Amount' in sign_for.",
985 "command": "doesnt_matter",
986 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
987 "secret": "masterpassphrase",
989 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
990 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
994 "TransactionType": "Payment"
997 {{"Missing field 'tx_json.Amount'.",
998 "Missing field 'tx_json.Amount'.",
999 "Missing field 'tx_json.Amount'.",
1000 "Missing field 'tx_json.Amount'."}}},
1002 {
"Missing 'Destination' in sign_for.",
1005 "command": "doesnt_matter",
1006 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1007 "secret": "masterpassphrase",
1009 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1010 "Amount": "1000000000",
1013 "SigningPubKey": "",
1014 "TransactionType": "Payment"
1017 {{"Missing field 'tx_json.Destination'.",
1018 "Missing field 'tx_json.Destination'.",
1019 "Missing field 'tx_json.Destination'.",
1020 "Missing field 'tx_json.Destination'."}}},
1022 {
"Missing 'Destination' in sign_for, use DeliverMax",
1025 "command": "doesnt_matter",
1026 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1027 "secret": "masterpassphrase",
1029 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1030 "DeliverMax": "1000000000",
1033 "SigningPubKey": "",
1034 "TransactionType": "Payment"
1037 {{"Missing field 'tx_json.Destination'.",
1038 "Missing field 'tx_json.Destination'.",
1039 "Missing field 'tx_json.Destination'.",
1040 "Missing field 'tx_json.Destination'."}}},
1042 {
"Missing 'Fee' in sign_for.",
1045 "command": "doesnt_matter",
1046 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1047 "secret": "masterpassphrase",
1049 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1050 "Amount": "1000000000",
1051 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1053 "SigningPubKey": "",
1054 "TransactionType": "Payment"
1057 {{"Secret does not match account.",
1058 "Secret does not match account.",
1059 "Missing field 'tx_json.Fee'.",
1060 "Missing field 'tx_json.Fee'."}}},
1062 {
"Missing 'Sequence' in sign_for.",
1065 "command": "doesnt_matter",
1066 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1067 "secret": "masterpassphrase",
1069 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1070 "Amount": "1000000000",
1071 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1073 "SigningPubKey": "",
1074 "TransactionType": "Payment"
1077 {{"Secret does not match account.",
1078 "Secret does not match account.",
1079 "Missing field 'tx_json.Sequence'.",
1080 "Missing field 'tx_json.Sequence'."}}},
1082 {
"Missing 'SigningPubKey' in sign_for is automatically filled in.",
1085 "command": "doesnt_matter",
1086 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1087 "secret": "masterpassphrase",
1089 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1090 "Amount": "1000000000",
1091 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1094 "TransactionType": "Payment"
1097 {{"Secret does not match account.",
1098 "Secret does not match account.",
1100 "Missing field 'tx_json.SigningPubKey'."}}},
1102 {
"In sign_for, an account may not sign for itself.",
1105 "command": "doesnt_matter",
1106 "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1109 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1110 "Amount": "1000000000",
1111 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1114 "TransactionType": "Payment"
1119 "A Signer may not be the transaction's Account "
1120 "(rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA).",
1121 "Missing field 'tx_json.SigningPubKey'."}}},
1123 {
"Cannot put duplicate accounts in Signers array",
1126 "command": "doesnt_matter",
1127 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1128 "secret": "masterpassphrase",
1130 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1131 "Amount" : "1000000000",
1132 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1138 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1139 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1140 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1144 "SigningPubKey" : "",
1145 "TransactionType" : "Payment"
1148 {{"Already multisigned.",
1149 "Already multisigned.",
1150 "Duplicate Signers:Signer:Account entries "
1151 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh) are not allowed.",
1154 {
"Correctly append to pre-established Signers array",
1157 "command": "doesnt_matter",
1158 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1161 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1162 "Amount" : "1000000000",
1163 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1169 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1170 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1171 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1175 "SigningPubKey" : "",
1176 "TransactionType" : "Payment"
1179 {{"Already multisigned.",
"Already multisigned.",
"",
""}}},
1181 {
"Append to pre-established Signers array with bad signature",
1184 "command": "doesnt_matter",
1185 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1188 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1189 "Amount" : "1000000000",
1190 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1196 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1197 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1198 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ACB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1202 "SigningPubKey" : "",
1203 "TransactionType" : "Payment"
1206 {{"Already multisigned.",
1207 "Already multisigned.",
1208 "Invalid signature.",
1209 "Invalid signature."}}},
1211 {
"Non-empty 'SigningPubKey' in sign_for.",
1214 "command": "doesnt_matter",
1215 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1216 "secret": "masterpassphrase",
1218 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1219 "Amount": "1000000000",
1220 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1223 "SigningPubKey": "1",
1224 "TransactionType": "Payment"
1227 {{"Secret does not match account.",
1228 "Secret does not match account.",
1229 "When multi-signing 'tx_json.SigningPubKey' must be empty.",
1230 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1232 {
"Missing 'TransactionType' in sign_for.",
1235 "command": "doesnt_matter",
1236 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1237 "secret": "masterpassphrase",
1239 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1240 "Amount": "1000000000",
1241 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1244 "SigningPubKey": "",
1247 {{"Missing field 'tx_json.TransactionType'.",
1248 "Missing field 'tx_json.TransactionType'.",
1249 "Missing field 'tx_json.TransactionType'.",
1250 "Missing field 'tx_json.TransactionType'."}}},
1252 {
"TxnSignature in sign_for.",
1255 "command": "doesnt_matter",
1256 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1259 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1260 "Amount" : "1000000000",
1261 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1267 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1268 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1269 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1273 "SigningPubKey" : "",
1274 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998",
1275 "TransactionType" : "Payment"
1278 {{"Already multisigned.",
1279 "Already multisigned.",
1280 "Already single-signed.",
1281 "Signing of transaction is malformed."}}},
1283 {
"Invalid field 'tx_json': string instead of object",
1286 "command": "doesnt_matter",
1287 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1288 "secret": "masterpassphrase",
1291 {{"Invalid field 'tx_json', not object.",
1292 "Invalid field 'tx_json', not object.",
1293 "Invalid field 'tx_json', not object.",
1294 "Invalid field 'tx_json', not object."}}},
1296 {
"Invalid field 'tx_json': integer instead of object",
1299 "command": "doesnt_matter",
1300 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1301 "secret": "masterpassphrase",
1304 {{"Invalid field 'tx_json', not object.",
1305 "Invalid field 'tx_json', not object.",
1306 "Invalid field 'tx_json', not object.",
1307 "Invalid field 'tx_json', not object."}}},
1309 {
"Invalid field 'tx_json': array instead of object",
1312 "command": "doesnt_matter",
1313 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1314 "secret": "masterpassphrase",
1315 "tx_json": [ "hello", "world" ]
1317 {{"Invalid field 'tx_json', not object.",
1318 "Invalid field 'tx_json', not object.",
1319 "Invalid field 'tx_json', not object.",
1320 "Invalid field 'tx_json', not object."}}},
1322 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
1325 "command": "doesnt_matter",
1326 "account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1327 "secret": "ssgN6zTvtM1q9XV8DvJpWm8LBYWiY",
1330 "Account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1331 "Amount": "1000000000",
1332 "DeliverMax": "1000000000",
1333 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1334 "TransactionType": "Payment"
1337 {{"Source account not found.",
1338 "Source account not found.",
1339 "Missing field 'tx_json.Sequence'.",
1340 "Missing field 'tx_json.Sequence'."}}},
1342 {
"Minimal submit_multisigned.",
1345 "command": "submit_multisigned",
1347 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1348 "Amount": "1000000000",
1349 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1355 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1356 "SigningPubKey" : "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1357 "TxnSignature" : "3045022100909D01399AFFAD1E30D250CE61F93975B7F61E47B5244D78C3E86D9806535D95022012E389E0ACB016334052B7FE07FA6CEFDC8BE82CB410FA841D5049641C89DC8F"
1361 "SigningPubKey": "",
1362 "TransactionType": "Payment"
1365 {{"Missing field 'secret'.",
1366 "Missing field 'secret'.",
1367 "Missing field 'account'.",
1370 {
"Minimal submit_multisigned with bad signature.",
1373 "command": "submit_multisigned",
1375 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1376 "Amount": "1000000000",
1377 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1383 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1384 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1385 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1389 "SigningPubKey": "",
1390 "TransactionType": "Payment"
1393 {{"Missing field 'secret'.",
1394 "Missing field 'secret'.",
1395 "Missing field 'account'.",
1396 "Invalid signature."}}},
1398 {
"Missing tx_json in submit_multisigned.",
1401 "command": "submit_multisigned",
1405 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1406 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1407 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1412 {{"Missing field 'secret'.",
1413 "Missing field 'secret'.",
1414 "Missing field 'account'.",
1415 "Missing field 'tx_json'."}}},
1417 {
"Missing sequence in submit_multisigned.",
1420 "command": "submit_multisigned",
1422 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1423 "Amount": "1000000000",
1424 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1429 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1430 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1431 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1435 "SigningPubKey": "",
1436 "TransactionType": "Payment"
1439 {{"Missing field 'secret'.",
1440 "Missing field 'secret'.",
1441 "Missing field 'account'.",
1442 "Missing field 'tx_json.Sequence'."}}},
1444 {
"Missing SigningPubKey in submit_multisigned.",
1447 "command": "submit_multisigned",
1449 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1450 "Amount": "1000000000",
1451 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1456 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1457 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1458 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1463 "TransactionType": "Payment"
1466 {{"Missing field 'secret'.",
1467 "Missing field 'secret'.",
1468 "Missing field 'account'.",
1469 "Missing field 'tx_json.SigningPubKey'."}}},
1471 {
"Non-empty SigningPubKey in submit_multisigned.",
1474 "command": "submit_multisigned",
1476 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1477 "Amount": "1000000000",
1478 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1484 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1485 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1486 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1490 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1491 "TransactionType": "Payment"
1494 {{"Missing field 'secret'.",
1495 "Missing field 'secret'.",
1496 "Missing field 'account'.",
1497 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1499 {
"Missing TransactionType in submit_multisigned.",
1502 "command": "submit_multisigned",
1504 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1505 "Amount": "1000000000",
1506 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1511 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1512 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1513 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1518 "SigningPubKey": "",
1521 {{"Missing field 'secret'.",
1522 "Missing field 'secret'.",
1523 "Missing field 'account'.",
1524 "Missing field 'tx_json.TransactionType'."}}},
1526 {
"Missing Account in submit_multisigned.",
1529 "command": "submit_multisigned",
1531 "Amount": "1000000000",
1532 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1538 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1539 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1540 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1544 "SigningPubKey": "",
1545 "TransactionType": "Payment"
1548 {{"Missing field 'secret'.",
1549 "Missing field 'secret'.",
1550 "Missing field 'account'.",
1551 "Missing field 'tx_json.Account'."}}},
1553 {
"Malformed Account in submit_multisigned.",
1556 "command": "submit_multisigned",
1558 "Account": "NotAnAccount",
1559 "Amount": "1000000000",
1560 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1566 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1567 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1568 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1572 "SigningPubKey": "",
1573 "TransactionType": "Payment"
1576 {{"Missing field 'secret'.",
1577 "Missing field 'secret'.",
1578 "Missing field 'account'.",
1579 "Invalid field 'tx_json.Account'."}}},
1581 {
"Account not in ledger in submit_multisigned.",
1584 "command": "submit_multisigned",
1586 "Account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
1587 "Amount": "1000000000",
1588 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1594 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1595 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1596 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1600 "SigningPubKey": "",
1601 "TransactionType": "Payment"
1604 {{"Missing field 'secret'.",
1605 "Missing field 'secret'.",
1606 "Missing field 'account'.",
1607 "Source account not found."}}},
1609 {
"Missing Fee in submit_multisigned.",
1612 "command": "submit_multisigned",
1614 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1615 "Amount": "1000000000",
1616 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1621 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1622 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1623 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1627 "SigningPubKey": "",
1628 "TransactionType": "Payment"
1631 {{"Missing field 'secret'.",
1632 "Missing field 'secret'.",
1633 "Missing field 'account'.",
1634 "Missing field 'tx_json.Fee'."}}},
1636 {
"Non-numeric Fee in submit_multisigned.",
1639 "command": "submit_multisigned",
1641 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1642 "Amount": "1000000000",
1643 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1649 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1650 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1651 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1655 "SigningPubKey": "",
1656 "TransactionType": "Payment"
1659 {{"Missing field 'secret'.",
1660 "Missing field 'secret'.",
1661 "Missing field 'account'.",
1662 "Field 'tx_json.Fee' has invalid data."}}},
1664 {
"Missing Amount in submit_multisigned Payment.",
1667 "command": "submit_multisigned",
1669 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1670 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1676 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1677 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1678 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1682 "SigningPubKey": "",
1683 "TransactionType": "Payment"
1686 {{"Missing field 'secret'.",
1687 "Missing field 'secret'.",
1688 "Missing field 'account'.",
1689 "Missing field 'tx_json.Amount'."}}},
1691 {
"Invalid Amount in submit_multisigned Payment.",
1694 "command": "submit_multisigned",
1696 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1697 "Amount": "NotANumber",
1698 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1704 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1705 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1706 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1710 "SigningPubKey": "",
1711 "TransactionType": "Payment"
1714 {{"Missing field 'secret'.",
1715 "Missing field 'secret'.",
1716 "Missing field 'account'.",
1717 "Invalid field 'tx_json.Amount'."}}},
1719 {
"Invalid DeliverMax in submit_multisigned Payment.",
1722 "command": "submit_multisigned",
1724 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1725 "DeliverMax": "NotANumber",
1726 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1732 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1733 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1734 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1738 "SigningPubKey": "",
1739 "TransactionType": "Payment"
1742 {{"Missing field 'secret'.",
1743 "Missing field 'secret'.",
1744 "Missing field 'account'.",
1745 "Invalid field 'tx_json.Amount'."}}},
1747 {
"No build_path in submit_multisigned.",
1750 "command": "submit_multisigned",
1753 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1754 "Amount": "1000000000",
1755 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1761 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1762 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1763 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1767 "SigningPubKey": "",
1768 "TransactionType": "Payment"
1771 {{"Missing field 'secret'.",
1772 "Missing field 'secret'.",
1773 "Missing field 'account'.",
1774 "Field 'build_path' not allowed in this context."}}},
1776 {
"Missing Destination in submit_multisigned Payment.",
1779 "command": "submit_multisigned",
1781 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1782 "Amount": "1000000000",
1788 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1789 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1790 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1794 "SigningPubKey": "",
1795 "TransactionType": "Payment"
1798 {{"Missing field 'secret'.",
1799 "Missing field 'secret'.",
1800 "Missing field 'account'.",
1801 "Missing field 'tx_json.Destination'."}}},
1803 {
"Malformed Destination in submit_multisigned Payment.",
1806 "command": "submit_multisigned",
1808 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1809 "Amount": "1000000000",
1810 "Destination": "NotADestination",
1816 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1817 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1818 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1822 "SigningPubKey": "",
1823 "TransactionType": "Payment"
1826 {{"Missing field 'secret'.",
1827 "Missing field 'secret'.",
1828 "Missing field 'account'.",
1829 "Invalid field 'tx_json.Destination'."}}},
1831 {
"Missing Signers field in submit_multisigned.",
1834 "command": "submit_multisigned",
1836 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1837 "Amount": "1000000000",
1838 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1841 "SigningPubKey": "",
1842 "TransactionType": "Payment"
1845 {{"Missing field 'secret'.",
1846 "Missing field 'secret'.",
1847 "Missing field 'account'.",
1848 "Missing field 'tx_json.Signers'."}}},
1850 {
"Signers not an array in submit_multisigned.",
1853 "command": "submit_multisigned",
1855 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1856 "Amount": "1000000000",
1857 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1861 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1862 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1863 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1865 "SigningPubKey": "",
1866 "TransactionType": "Payment"
1869 {{"Missing field 'secret'.",
1870 "Missing field 'secret'.",
1871 "Missing field 'account'.",
1872 "Field 'tx_json.Signers' is not a JSON array."}}},
1874 {
"Empty Signers array in submit_multisigned.",
1877 "command": "submit_multisigned",
1879 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1880 "Amount": "1000000000",
1881 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1886 "SigningPubKey": "",
1887 "TransactionType": "Payment"
1890 {{"Missing field 'secret'.",
1891 "Missing field 'secret'.",
1892 "Missing field 'account'.",
1893 "tx_json.Signers array may not be empty."}}},
1895 {
"Duplicate Signer in submit_multisigned.",
1898 "command": "submit_multisigned",
1900 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1901 "Amount": "1000000000",
1902 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1908 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1909 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1910 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1915 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1916 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1917 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1921 "SigningPubKey": "",
1922 "TransactionType": "Payment"
1925 {{"Missing field 'secret'.",
1926 "Missing field 'secret'.",
1927 "Missing field 'account'.",
1928 "Duplicate Signers:Signer:Account entries "
1929 "(rPcNzota6B8YBokhYtcTNqQVCngtbnWfux) are not allowed."}}},
1931 {
"Signer is tx_json Account in submit_multisigned.",
1934 "command": "submit_multisigned",
1936 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1937 "Amount": "1000000000",
1938 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1944 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1945 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1946 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1950 "SigningPubKey": "",
1951 "TransactionType": "Payment"
1954 {{"Missing field 'secret'.",
1955 "Missing field 'secret'.",
1956 "Missing field 'account'.",
1957 "A Signer may not be the transaction's Account "
1958 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)."}}},
1960 {
"Empty Signers array in submit_multisigned, use DeliverMax",
1963 "command": "submit_multisigned",
1965 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1966 "DeliverMax": "10000000",
1967 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1972 "SigningPubKey": "",
1973 "TransactionType": "Payment"
1976 {{"Missing field 'secret'.",
1977 "Missing field 'secret'.",
1978 "Missing field 'account'.",
1979 "tx_json.Signers array may not be empty."}}},
1981 {
"Empty Signers array in submit_multisigned, use DeliverMax and Amount",
1984 "command": "submit_multisigned",
1986 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1987 "Amount": "10000000",
1988 "DeliverMax": "10000000",
1989 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1994 "SigningPubKey": "",
1995 "TransactionType": "Payment"
1998 {{"Missing field 'secret'.",
1999 "Missing field 'secret'.",
2000 "Missing field 'account'.",
2001 "tx_json.Signers array may not be empty."}}},
2003 {
"Payment cannot specify different DeliverMax and Amount.",
2006 "command": "doesnt_matter",
2007 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2008 "secret": "masterpassphrase",
2011 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2012 "Amount": "1000000000",
2013 "DeliverMax": "1000000020",
2014 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2017 "SigningPubKey": "",
2018 "TransactionType": "Payment"
2021 {{"Cannot specify differing 'Amount' and 'DeliverMax'",
2022 "Cannot specify differing 'Amount' and 'DeliverMax'",
2023 "Cannot specify differing 'Amount' and 'DeliverMax'",
2024 "Cannot specify differing 'Amount' and 'DeliverMax'"}}},
2025 {
"Payment cannot specify bad DomainID.",
2028 "command": "doesnt_matter",
2029 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2030 "secret": "masterpassphrase",
2033 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2034 "Amount": "1000000000",
2035 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2038 "SigningPubKey": "",
2039 "TransactionType": "Payment",
2040 "DomainID": "invalid",
2043 {{"Unable to parse 'DomainID'.",
2044 "Unable to parse 'DomainID'.",
2045 "Unable to parse 'DomainID'.",
2046 "Unable to parse 'DomainID'."}}},
2048 {
"Minimal delegated transaction.",
2051 "command": "doesnt_matter",
2054 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2055 "Amount": "1000000000",
2056 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2057 "TransactionType": "Payment",
2058 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
2063 "Missing field 'account'.",
2064 "Missing field 'tx_json.Sequence'."}}},
2066 {
"Delegate not well formed.",
2069 "command": "doesnt_matter",
2072 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2073 "Amount": "1000000000",
2074 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2075 "TransactionType": "Payment",
2076 "Delegate": "NotAnAccount"
2079 {{"Invalid field 'tx_json.Delegate'.",
2080 "Invalid field 'tx_json.Delegate'.",
2081 "Missing field 'account'.",
2082 "Missing field 'tx_json.Sequence'."}}},
2084 {
"Delegate not in ledger.",
2087 "command": "doesnt_matter",
2090 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2091 "Amount": "1000000000",
2092 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2093 "TransactionType": "Payment",
2094 "Delegate": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd"
2097 {{"Delegate account not found.",
2098 "Delegate account not found.",
2099 "Missing field 'account'.",
2100 "Missing field 'tx_json.Sequence'."}}},
2102 {
"Delegate and secret not match.",
2105 "command": "doesnt_matter",
2108 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2109 "Amount": "1000000000",
2110 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2111 "TransactionType": "Payment",
2112 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
2115 {{"Secret does not match account.",
2116 "Secret does not match account.",
2117 "Missing field 'account'.",
2118 "Missing field 'tx_json.Sequence'."}}},
2131 env.
rpc(
"bad_command", R
"({"MakingThisUp": 0})")};
2133 BEAST_EXPECT(result[jss::result][jss::error] == "unknownCmd");
2135 result[jss::result][jss::request][jss::command] ==
"bad_command");
2142 using namespace test::jtx;
2147 auto ledger = env.current();
2148 auto const& feeTrack = env.app().getFeeTrack();
2150 Account
const alice(
"alice");
2151 Account
const bob(
"bob");
2152 env.fund(XRP(100000), alice);
2155 auto const batchFee = batch::calcBatchFee(env, 0, 2);
2156 auto const seq = env.seq(alice);
2157 auto jt = env.jtnofill(
2159 batch::inner(pay(alice, bob, XRP(1)), seq + 1),
2160 batch::inner(pay(alice, bob, XRP(2)), seq + 2),
2161 batch::inner(pay(alice, bob, XRP(3)), seq + 3),
2162 batch::inner(pay(alice, bob, XRP(4)), seq + 4),
2163 batch::inner(pay(alice, bob, XRP(5)), seq + 5),
2164 batch::inner(pay(alice, bob, XRP(6)), seq + 6),
2165 batch::inner(pay(alice, bob, XRP(7)), seq + 7),
2166 batch::inner(pay(alice, bob, XRP(8)), seq + 8),
2167 batch::inner(pay(alice, bob, XRP(9)), seq + 9));
2169 jt.jv.removeMember(jss::Fee);
2170 jt.jv.removeMember(jss::TxnSignature);
2171 req[jss::tx_json] = jt.jv;
2180 BEAST_EXPECT(result.
size() == 0);
2182 req[jss::tx_json].isMember(jss::Fee) &&
2183 req[jss::tx_json][jss::Fee] ==
2184 env.current()->fees().base.jsonClipped());
2190 auto ledger = env.current();
2191 auto const& feeTrack = env.app().getFeeTrack();
2193 Account
const alice(
"alice");
2194 Account
const bob(
"bob");
2195 env.fund(XRP(100000), alice, bob);
2198 auto jt = env.jtnofill(
2242 req[jss::tx_json] = jt.jv;
2251 BEAST_EXPECT(result.
size() == 0);
2253 req[jss::tx_json].isMember(jss::Fee) &&
2254 req[jss::tx_json][jss::Fee] ==
2255 env.current()->fees().base.jsonClipped());
2264 auto const baseFee =
2265 static_cast<int>(env.
current()->fees().base.drops());
2272 "{ \"fee_mult_max\" : 1, \"tx_json\" : { } } ", req);
2284 req[jss::tx_json].isMember(jss::Fee) &&
2285 req[jss::tx_json][jss::Fee] == baseFee);
2291 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 2, "
2292 "\"tx_json\" : { } } ",
2305 req[jss::tx_json].isMember(jss::Fee) &&
2306 req[jss::tx_json][jss::Fee] == baseFee);
2312 "{ \"fee_mult_max\" : 0, \"tx_json\" : { } } ", req);
2323 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2331 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 6, "
2332 "\"tx_json\" : { } } ",
2344 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2350 "{ \"fee_mult_max\" : 0, \"fee_div_max\" : 2, "
2351 "\"tx_json\" : { } } ",
2363 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2369 "{ \"fee_mult_max\" : 10, \"fee_div_max\" : 0, "
2370 "\"tx_json\" : { } } ",
2382 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2400 BEAST_EXPECT(result.
size() == 0);
2402 req[jss::tx_json].isMember(jss::Fee) &&
2403 req[jss::tx_json][jss::Fee] ==
2404 env.
current()->fees().increment.jsonClipped());
2411 testcase(
"autofill escalated fees");
2412 using namespace test::jtx;
2414 cfg->loadFromString(
"[" SECTION_SIGNING_SUPPORT
"]\ntrue");
2415 cfg->section(
"transaction_queue")
2416 .
set(
"minimum_txn_in_ledger_standalone",
"3");
2419 LoadFeeTrack const& feeTrackOuter = env.app().getFeeTrack();
2426 "fee_mult_max" : 1000,
2441 req[jss::tx_json].isMember(jss::Fee) &&
2442 req[jss::tx_json][jss::Fee] == 10);
2465 req[jss::tx_json].isMember(jss::Fee) &&
2466 req[jss::tx_json][jss::Fee] == 10);
2470 for (
auto i = 0; i < 4; ++i)
2472 env(
noop(env.master));
2480 "fee_mult_max" : 1000,
2495 req[jss::tx_json].isMember(jss::Fee) &&
2496 req[jss::tx_json][jss::Fee] == 8889);
2518 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2526 "fee_mult_max" : 1000,
2541 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2549 "fee_mult_max" : 8000,
2565 req[jss::tx_json].isMember(jss::Fee) &&
2566 req[jss::tx_json][jss::Fee] == 8889);
2574 "fee_mult_max" : -5,
2616 "fee_mult_max" : -2,
2638 toSign[jss::tx_json] =
noop(env.master);
2639 toSign[jss::secret] =
"masterpassphrase";
2640 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2641 auto result = rpcResult[jss::result];
2645 result[jss::tx_json].isMember(jss::Fee) &&
2646 result[jss::tx_json][jss::Fee] ==
"10");
2648 result[jss::tx_json].isMember(jss::Sequence) &&
2649 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2658 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2659 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2661 env(
noop(env.master));
2665 toSign[jss::tx_json] =
noop(env.master);
2666 toSign[jss::secret] =
"masterpassphrase";
2667 toSign[jss::fee_mult_max] = 900;
2668 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2669 auto result = rpcResult[jss::result];
2673 result[jss::tx_json].isMember(jss::Fee) &&
2674 result[jss::tx_json][jss::Fee] ==
"7813");
2676 result[jss::tx_json].isMember(jss::Sequence) &&
2677 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2686 auto& feeTrack = env.app().getFeeTrack();
2687 BEAST_EXPECT(feeTrack.getLoadFactor() == 256);
2688 for (
int i = 0; i < 8; ++i)
2689 feeTrack.raiseLocalFee();
2690 BEAST_EXPECT(feeTrack.getLoadFactor() == 1220);
2694 toSign[jss::tx_json] =
noop(env.master);
2695 toSign[jss::secret] =
"masterpassphrase";
2696 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2697 auto result = rpcResult[jss::result];
2701 result[jss::tx_json].isMember(jss::Fee) &&
2702 result[jss::tx_json][jss::Fee] ==
"47");
2704 result[jss::tx_json].isMember(jss::Sequence) &&
2705 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2716 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2717 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2719 env(
noop(env.master), fee(47));
2725 toSign[jss::tx_json] =
noop(env.master);
2726 toSign[jss::secret] =
"masterpassphrase";
2728 toSign[jss::fee_mult_max] = 700;
2729 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2730 auto result = rpcResult[jss::result];
2734 result[jss::tx_json].isMember(jss::Fee) &&
2735 result[jss::tx_json][jss::Fee] ==
"6806");
2737 result[jss::tx_json].isMember(jss::Sequence) &&
2738 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2747 using namespace test::jtx;
2749 cfg->NETWORK_ID = 1025;
2755 toSign[jss::tx_json] =
noop(env.master);
2757 BEAST_EXPECT(!toSign[jss::tx_json].isMember(jss::NetworkID));
2758 toSign[jss::secret] =
"masterpassphrase";
2759 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2760 auto result = rpcResult[jss::result];
2764 result[jss::tx_json].isMember(jss::NetworkID) &&
2765 result[jss::tx_json][jss::NetworkID] == 1025);
2784 using namespace std::chrono_literals;
2785 using namespace test::jtx;
2787 Account
const a{
"a"};
2788 Account
const g{
"g"};
2789 auto const USD = g[
"USD"];
2799 cfg->FEES.reference_fee = 10;
2802 env.fund(
XRP(100000), a, ed, g);
2805 env(
trust(a, USD(1000)));
2806 env(
trust(env.master, USD(1000)));
2807 env(
pay(g, a, USD(50)));
2808 env(
pay(g, env.master, USD(50)));
2834 static TestStuff
const testFuncs[] = {
2841 "submit_multisigned",
2844 for (
auto testFunc : testFuncs)
2852 Throw<std::runtime_error>(
2853 "Internal JSONRPC_test error. Bad test JSON.");
2855 static Role const testedRoles[] = {
2858 for (
Role testRole : testedRoles)
2861 auto const signFn = get<0>(testFunc);
2862 if (signFn !=
nullptr)
2864 assert(get<1>(testFunc) ==
nullptr);
2875 auto const submitFn = get<1>(testFunc);
2876 assert(submitFn !=
nullptr);
2889 errStr = result[
"error_message"].
asString();
2891 if (errStr == txnTest.expMsg[get<3>(testFunc)])
2898 description << txnTest.description <<
" Called "
2899 << get<2>(testFunc) <<
"(). Got \'"
2901 fail(description.
str(), __FILE__, txnTest.line);
Unserialize a JSON document into a Value.
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
UInt size() const
Number of values in array or object.
std::string asString() const
Returns the unquoted string value.
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.
virtual Config & config()=0
virtual LoadFeeTrack & getFeeTrack()=0
Manages the current fee schedule.
std::uint32_t getLoadFactor() const
void testAutoFillEscalatedFees()
void testTransactionRPC()
static void fakeProcessTransaction(std::shared_ptr< Transaction > &, bool, bool, NetworkOPs::FailHard)
void run() override
Runs the suite.
void testAutoFillNetworkID()
Immutable cryptographic account descriptor.
std::string const & human() const
Returns the human readable public key.
A transaction testing environment.
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
Json::Value rpc(unsigned apiVersion, std::unordered_map< std::string, std::string > const &headers, std::string const &cmd, Args &&... args)
Execute an RPC command.
@ uintValue
unsigned integer value
Json::Value transactionSign(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a Json::objectValue.
std::function< void(std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, NetworkOPs::FailHard failType)> ProcessTransactionFn
bool contains_error(Json::Value const &json)
Returns true if the json contains an rpc error specification.
Json::Value transactionSubmitMultiSigned(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app, ProcessTransactionFn const &processTransaction)
Returns a Json::objectValue.
static constexpr std::integral_constant< unsigned, Version > apiVersion
Json::Value transactionSubmit(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app, ProcessTransactionFn const &processTransaction)
Returns a Json::objectValue.
Json::Value transactionSignFor(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a Json::objectValue.
static constexpr TxnTestData txnTestArray[]
Json::Value checkFee(Json::Value &request, Role const role, bool doAutoFill, Config const &config, LoadFeeTrack const &feeTrack, TxQ const &txQ, Application const &app)
Fill in the fee on behalf of the client.
Json::Value trust(AccountID const &account, STAmount const &amount, std::uint32_t flags=0)
Json::Value pay(Account const &account, AccountID const &to, STAmount const &amount)
std::unique_ptr< Config > envconfig()
creates and initializes a default configuration for jtx::Env
Json::Value acctdelete(Account const &account, Account const &dest)
Delete account.
XRP_t const XRP
Converts to XRP Issue or STAmount.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr std::uint32_t tfAllOrNothing
bool set(T &target, std::string const &name, Section const §ion)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
std::string to_string(base_uint< Bits, Tag > const &a)
Role
Indicates the level of administrative permission to grant.
TxnTestData(TxnTestData const &)=delete
std::array< char const *const, 4 > const expMsg
TxnTestData & operator=(TxnTestData &&)=delete
TxnTestData & operator=(TxnTestData const &)=delete
constexpr TxnTestData(char const *description_, int line_, char const *json_, std::array< char const *const, 4 > const &expMsg_)
char const *const description
TxnTestData(TxnTestData &&)=delete