2#include <test/jtx/envconfig.h>
4#include <xrpld/app/misc/TxQ.h>
5#include <xrpld/core/ConfigSections.h>
6#include <xrpld/rpc/detail/TransactionSign.h>
8#include <xrpl/basics/contract.h>
9#include <xrpl/beast/unit_test.h>
10#include <xrpl/json/json_reader.h>
11#include <xrpl/protocol/ErrorCodes.h>
12#include <xrpl/server/LoadFeeTrack.h>
35 char const* description_,
54 {
"Minimal payment, no Amount only DeliverMax",
57 "command": "dummy_command",
58 "secret": "masterpassphrase",
60 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
61 "DeliverMax": "1000000000",
62 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
63 "TransactionType": "Payment"
66 {{"",
"",
"Missing field 'account'.",
"Missing field 'tx_json.Sequence'."}}},
68 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
71 "command": "dummy_command",
72 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
73 "secret": "masterpassphrase",
76 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
77 "Amount": "1000000000",
78 "DeliverMax": "1000000000",
79 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
80 "TransactionType": "Payment"
83 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
85 {
"Pass in Sequence, no Amount only DeliverMax",
88 "command": "dummy_command",
89 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
90 "secret": "masterpassphrase",
93 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
94 "DeliverMax": "1000000000",
95 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
96 "TransactionType": "Payment"
99 {{"",
"",
"Missing field 'tx_json.Fee'.",
"Missing field 'tx_json.SigningPubKey'."}}},
101 {
"Pass in Sequence and Fee with minimal payment, both Amount and "
105 "command": "dummy_command",
106 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
107 "secret": "masterpassphrase",
111 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
112 "Amount": "1000000000",
113 "DeliverMax": "1000000000",
114 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
115 "TransactionType": "Payment"
120 "A Signer may not be the transaction's Account "
121 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
122 "Missing field 'tx_json.SigningPubKey'."}}},
124 {
"Add 'fee_mult_max' field.",
127 "command": "dummy_command",
128 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
129 "secret": "masterpassphrase",
133 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
134 "Amount": "1000000000",
135 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
136 "TransactionType": "Payment"
139 {{"",
"",
"Missing field 'tx_json.Fee'.",
"Missing field 'tx_json.SigningPubKey'."}}},
141 {
"Add 'fee_mult_max' and 'fee_div_max' field.",
144 "command": "dummy_command",
145 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
146 "secret": "masterpassphrase",
151 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
152 "Amount": "1000000000",
153 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
154 "TransactionType": "Payment"
157 {{"",
"",
"Missing field 'tx_json.Fee'.",
"Missing field 'tx_json.SigningPubKey'."}}},
159 {
"fee_mult_max is ignored if 'Fee' is present.",
162 "command": "dummy_command",
163 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
164 "secret": "masterpassphrase",
169 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
170 "Amount": "1000000000",
171 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
172 "TransactionType": "Payment"
177 "A Signer may not be the transaction's Account "
178 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
179 "Missing field 'tx_json.SigningPubKey'."}}},
181 {
"fee_div_max is ignored if 'Fee' is present.",
184 "command": "dummy_command",
185 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
186 "secret": "masterpassphrase",
192 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
193 "Amount": "1000000000",
194 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
195 "TransactionType": "Payment"
200 "A Signer may not be the transaction's Account "
201 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
202 "Missing field 'tx_json.SigningPubKey'."}}},
204 {
"Invalid 'fee_mult_max' field.",
207 "command": "dummy_command",
208 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
209 "secret": "masterpassphrase",
210 "fee_mult_max": "NotAFeeMultiplier",
213 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
214 "Amount": "1000000000",
215 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
216 "TransactionType": "Payment"
219 {{"Invalid field 'fee_mult_max', not a positive integer.",
220 "Invalid field 'fee_mult_max', not a positive integer.",
221 "Missing field 'tx_json.Fee'.",
222 "Missing field 'tx_json.SigningPubKey'."}}},
224 {
"Invalid 'fee_div_max' field.",
227 "command": "dummy_command",
228 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
229 "secret": "masterpassphrase",
231 "fee_div_max": "NotAFeeMultiplier",
234 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
235 "Amount": "1000000000",
236 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
237 "TransactionType": "Payment"
240 {{"Invalid field 'fee_div_max', not a positive integer.",
241 "Invalid field 'fee_div_max', not a positive integer.",
242 "Missing field 'tx_json.Fee'.",
243 "Missing field 'tx_json.SigningPubKey'."}}},
245 {
"Invalid value for 'fee_mult_max' field.",
248 "command": "dummy_command",
249 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
250 "secret": "masterpassphrase",
254 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
255 "Amount": "1000000000",
256 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
257 "TransactionType": "Payment"
260 {{"Fee of 10 exceeds the requested tx limit of 0",
261 "Fee of 10 exceeds the requested tx limit of 0",
262 "Missing field 'tx_json.Fee'.",
263 "Missing field 'tx_json.SigningPubKey'."}}},
265 {
"Invalid value for 'fee_div_max' field.",
268 "command": "dummy_command",
269 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
270 "secret": "masterpassphrase",
275 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
276 "Amount": "1000000000",
277 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
278 "TransactionType": "Payment"
281 {{"Fee of 10 exceeds the requested tx limit of 5",
282 "Fee of 10 exceeds the requested tx limit of 5",
283 "Missing field 'tx_json.Fee'.",
284 "Missing field 'tx_json.SigningPubKey'."}}},
286 {
"Invalid zero value for 'fee_div_max' field.",
289 "command": "dummy_command",
290 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
291 "secret": "masterpassphrase",
296 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
297 "Amount": "1000000000",
298 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
299 "TransactionType": "Payment"
302 {{"Invalid field 'fee_div_max', not a positive integer.",
303 "Invalid field 'fee_div_max', not a positive integer.",
304 "Missing field 'tx_json.Fee'.",
305 "Missing field 'tx_json.SigningPubKey'."}}},
307 {
"Missing 'Amount'.",
310 "command": "dummy_command",
311 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
312 "secret": "masterpassphrase",
314 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
315 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
316 "TransactionType": "Payment"
319 {{"Missing field 'tx_json.Amount'.",
320 "Missing field 'tx_json.Amount'.",
321 "Missing field 'tx_json.Sequence'.",
322 "Missing field 'tx_json.Sequence'."}}},
324 {
"Invalid 'Amount'.",
327 "command": "dummy_command",
328 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
329 "secret": "masterpassphrase",
331 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
332 "Amount": "NotAnAmount",
333 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
334 "TransactionType": "Payment"
337 {{"Invalid field 'tx_json.Amount'.",
338 "Invalid field 'tx_json.Amount'.",
339 "Missing field 'tx_json.Sequence'.",
340 "Missing field 'tx_json.Sequence'."}}},
342 {
"Missing 'Destination'.",
345 "command": "dummy_command",
346 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
347 "secret": "masterpassphrase",
349 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
350 "Amount": "1000000000",
351 "TransactionType": "Payment"
354 {{"Missing field 'tx_json.Destination'.",
355 "Missing field 'tx_json.Destination'.",
356 "Missing field 'tx_json.Sequence'.",
357 "Missing field 'tx_json.Sequence'."}}},
359 {
"Invalid 'Destination'.",
362 "command": "dummy_command",
363 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
364 "secret": "masterpassphrase",
366 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
367 "Amount": "1000000000",
368 "Destination": "NotADestination",
369 "TransactionType": "Payment"
372 {{"Invalid field 'tx_json.Destination'.",
373 "Invalid field 'tx_json.Destination'.",
374 "Missing field 'tx_json.Sequence'.",
375 "Missing field 'tx_json.Sequence'."}}},
377 {
"Cannot create XRP to XRP paths.",
380 "command": "dummy_command",
381 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
382 "secret": "masterpassphrase",
385 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
386 "Amount": "1000000000",
387 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
388 "TransactionType": "Payment"
391 {{"Cannot build XRP to XRP paths.",
392 "Cannot build XRP to XRP paths.",
393 "Missing field 'tx_json.Sequence'.",
394 "Missing field 'tx_json.Sequence'."}}},
396 {
"Successful 'build_path'.",
399 "command": "dummy_command",
400 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
401 "secret": "masterpassphrase",
404 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
408 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
410 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
411 "TransactionType": "Payment"
414 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
416 {
"Not valid to include both 'Paths' and 'build_path'.",
419 "command": "dummy_command",
420 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
421 "secret": "masterpassphrase",
424 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
428 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
430 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
432 "TransactionType": "Payment"
435 {{"Cannot specify both 'tx_json.Paths' and 'build_path'",
436 "Cannot specify both 'tx_json.Paths' and 'build_path'",
437 "Missing field 'tx_json.Sequence'.",
438 "Missing field 'tx_json.Sequence'."}}},
440 {
"Successful 'SendMax'.",
443 "command": "dummy_command",
444 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
445 "secret": "masterpassphrase",
448 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
452 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
457 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
459 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
460 "TransactionType": "Payment"
463 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
465 {
"'Amount' may not be XRP for pathfinding, but 'SendMax' may be XRP.",
468 "command": "dummy_command",
469 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
470 "secret": "masterpassphrase",
473 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
477 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
480 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
481 "TransactionType": "Payment"
484 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
486 {
"'secret' must be present.",
489 "command": "dummy_command",
490 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
492 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
493 "Amount": "1000000000",
494 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
495 "TransactionType": "Payment"
498 {{"Missing field 'secret'.",
499 "Missing field 'secret'.",
500 "Missing field 'tx_json.Sequence'.",
501 "Missing field 'tx_json.Sequence'."}}},
503 {
"'secret' must be non-empty.",
506 "command": "dummy_command",
507 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
510 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
511 "Amount": "1000000000",
512 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
513 "TransactionType": "Payment"
516 {{"Invalid field 'secret'.",
517 "Invalid field 'secret'.",
518 "Missing field 'tx_json.Sequence'.",
519 "Missing field 'tx_json.Sequence'."}}},
521 {
"Use 'seed' instead of 'secret'.",
524 "command": "dummy_command",
525 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
526 "key_type": "ed25519",
527 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
529 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
530 "Amount": "1000000000",
531 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
532 "TransactionType": "Payment"
535 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
537 {
"Malformed 'seed'.",
540 "command": "dummy_command",
541 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
542 "key_type": "ed25519",
543 "seed": "not a seed",
545 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
546 "Amount": "1000000000",
547 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
548 "TransactionType": "Payment"
551 {{"Disallowed seed.",
553 "Missing field 'tx_json.Sequence'.",
554 "Missing field 'tx_json.Sequence'."}}},
556 {
"'tx_json' must be present.",
559 "command": "dummy_command",
560 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
561 "secret": "masterpassphrase",
563 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
564 "Amount": "1000000000",
565 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
566 "TransactionType": "Payment"
569 {{"Missing field 'tx_json'.",
570 "Missing field 'tx_json'.",
571 "Missing field 'tx_json'.",
572 "Missing field 'tx_json'."}}},
574 {
"'TransactionType' must be present.",
577 "command": "dummy_command",
578 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
579 "secret": "masterpassphrase",
581 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
582 "Amount": "1000000000",
583 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
586 {{"Missing field 'tx_json.TransactionType'.",
587 "Missing field 'tx_json.TransactionType'.",
588 "Missing field 'tx_json.Sequence'.",
589 "Missing field 'tx_json.Sequence'."}}},
591 {
"The 'TransactionType' must be a pre-established transaction type.",
594 "command": "dummy_command",
595 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
596 "secret": "masterpassphrase",
598 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
599 "Amount": "1000000000",
600 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
601 "TransactionType": "tt"
604 {{"Field 'tx_json.TransactionType' has invalid data.",
605 "Field 'tx_json.TransactionType' has invalid data.",
606 "Missing field 'tx_json.Sequence'.",
607 "Missing field 'tx_json.Sequence'."}}},
609 {
"The 'TransactionType' may be represented with an integer.",
612 "command": "dummy_command",
613 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
614 "secret": "masterpassphrase",
616 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
617 "Amount": "1000000000",
618 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
622 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
624 {
"'Account' must be present.",
627 "command": "dummy_command",
628 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
629 "secret": "masterpassphrase",
631 "Amount": "1000000000",
632 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
633 "TransactionType": "Payment"
636 {{"Missing field 'tx_json.Account'.",
637 "Missing field 'tx_json.Account'.",
638 "Missing field 'tx_json.Sequence'.",
639 "Missing field 'tx_json.Sequence'."}}},
641 {
"'Account' must be well formed.",
644 "command": "dummy_command",
645 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
646 "secret": "masterpassphrase",
648 "Account": "NotAnAccount",
649 "Amount": "1000000000",
650 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
651 "TransactionType": "Payment"
654 {{"Invalid field 'tx_json.Account'.",
655 "Invalid field 'tx_json.Account'.",
656 "Missing field 'tx_json.Sequence'.",
657 "Missing field 'tx_json.Sequence'."}}},
659 {
"The 'offline' tag may be added to the transaction.",
662 "command": "dummy_command",
663 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
664 "secret": "masterpassphrase",
667 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
668 "Amount": "1000000000",
669 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
670 "TransactionType": "Payment"
673 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
675 {
"If 'offline' is true then a 'Sequence' field must be supplied.",
678 "command": "dummy_command",
679 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
680 "secret": "masterpassphrase",
684 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
685 "Amount": "1000000000",
686 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
687 "TransactionType": "Payment"
690 {{"Missing field 'tx_json.Sequence'.",
691 "Missing field 'tx_json.Sequence'.",
692 "Missing field 'tx_json.Sequence'.",
693 "Missing field 'tx_json.Sequence'."}}},
695 {
"If 'offline' is true then a 'Fee' field must be supplied.",
698 "command": "dummy_command",
699 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
700 "secret": "masterpassphrase",
704 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
705 "Amount": "1000000000",
706 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
707 "TransactionType": "Payment"
710 {{"Missing field 'tx_json.Fee'.",
711 "Missing field 'tx_json.Fee'.",
712 "Missing field 'tx_json.Fee'.",
713 "Missing field 'tx_json.SigningPubKey'."}}},
715 {
"Valid transaction if 'offline' is true.",
718 "command": "dummy_command",
719 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
720 "secret": "masterpassphrase",
725 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
726 "Amount": "1000000000",
727 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
728 "TransactionType": "Payment"
733 "A Signer may not be the transaction's Account "
734 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
735 "Missing field 'tx_json.SigningPubKey'."}}},
737 {
"'offline' and 'build_path' are mutually exclusive.",
740 "command": "dummy_command",
741 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
742 "secret": "masterpassphrase",
748 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
749 "Amount": "1000000000",
750 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
751 "TransactionType": "Payment"
754 {{"Field 'build_path' not allowed in this context.",
755 "Field 'build_path' not allowed in this context.",
756 "Field 'build_path' not allowed in this context.",
757 "Missing field 'tx_json.SigningPubKey'."}}},
759 {
"A 'Flags' field may be specified.",
762 "command": "dummy_command",
763 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
764 "secret": "masterpassphrase",
767 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
768 "Amount": "1000000000",
769 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
770 "TransactionType": "Payment"
773 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
775 {
"The 'Flags' field must be numeric.",
778 "command": "dummy_command",
779 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
780 "secret": "masterpassphrase",
782 "Flags": "NotGoodFlags",
783 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
784 "Amount": "1000000000",
785 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
786 "TransactionType": "Payment"
789 {{"Field 'tx_json.Flags' has invalid data.",
790 "Field 'tx_json.Flags' has invalid data.",
791 "Missing field 'tx_json.Sequence'.",
792 "Missing field 'tx_json.Sequence'."}}},
794 {
"It's okay to add a 'debug_signing' field.",
797 "command": "dummy_command",
798 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
799 "secret": "masterpassphrase",
802 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
803 "Amount": "1000000000",
804 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
805 "TransactionType": "Payment"
808 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
810 {
"Single-sign a multisigned transaction.",
813 "command": "dummy_command",
814 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
817 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
818 "Amount" : "1000000000",
819 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
825 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
826 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
827 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
831 "SigningPubKey" : "",
832 "TransactionType" : "Payment"
835 {{"Already multisigned.",
"Already multisigned.",
"Secret does not match account.",
""}}},
837 {
"Minimal sign_for.",
840 "command": "dummy_command",
841 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
842 "secret": "masterpassphrase",
844 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
845 "Amount": "1000000000",
846 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
850 "TransactionType": "Payment"
853 {{"Secret does not match account.",
854 "Secret does not match account.",
856 "Missing field 'tx_json.Signers'."}}},
858 {
"Minimal offline sign_for.",
861 "command": "dummy_command",
862 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
863 "secret": "masterpassphrase",
866 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
867 "Amount": "1000000000",
868 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
872 "TransactionType": "Payment"
875 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
877 {
"Offline sign_for using 'seed' instead of 'secret'.",
880 "command": "dummy_command",
881 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
882 "key_type": "ed25519",
883 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
886 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
887 "Amount": "1000000000",
888 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
892 "TransactionType": "Payment"
895 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
897 {
"Malformed seed in sign_for.",
900 "command": "dummy_command",
901 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
902 "key_type": "ed25519",
903 "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd",
906 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
907 "Amount": "1000000000",
908 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
912 "TransactionType": "Payment"
915 {{"Disallowed seed.",
918 "Missing field 'tx_json.Signers'."}}},
920 {
"Missing 'Account' in sign_for.",
923 "command": "dummy_command",
924 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
925 "secret": "masterpassphrase",
927 "Amount": "1000000000",
928 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
932 "TransactionType": "Payment"
935 {{"Missing field 'tx_json.Account'.",
936 "Missing field 'tx_json.Account'.",
937 "Missing field 'tx_json.Account'.",
938 "Missing field 'tx_json.Account'."}}},
940 {
"Missing 'Amount' in sign_for.",
943 "command": "dummy_command",
944 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
945 "secret": "masterpassphrase",
947 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
948 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
952 "TransactionType": "Payment"
955 {{"Missing field 'tx_json.Amount'.",
956 "Missing field 'tx_json.Amount'.",
957 "Missing field 'tx_json.Amount'.",
958 "Missing field 'tx_json.Amount'."}}},
960 {
"Missing 'Destination' in sign_for.",
963 "command": "dummy_command",
964 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
965 "secret": "masterpassphrase",
967 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
968 "Amount": "1000000000",
972 "TransactionType": "Payment"
975 {{"Missing field 'tx_json.Destination'.",
976 "Missing field 'tx_json.Destination'.",
977 "Missing field 'tx_json.Destination'.",
978 "Missing field 'tx_json.Destination'."}}},
980 {
"Missing 'Destination' in sign_for, use DeliverMax",
983 "command": "dummy_command",
984 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
985 "secret": "masterpassphrase",
987 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
988 "DeliverMax": "1000000000",
992 "TransactionType": "Payment"
995 {{"Missing field 'tx_json.Destination'.",
996 "Missing field 'tx_json.Destination'.",
997 "Missing field 'tx_json.Destination'.",
998 "Missing field 'tx_json.Destination'."}}},
1000 {
"Missing 'Fee' in sign_for.",
1003 "command": "dummy_command",
1004 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1005 "secret": "masterpassphrase",
1007 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1008 "Amount": "1000000000",
1009 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1011 "SigningPubKey": "",
1012 "TransactionType": "Payment"
1015 {{"Secret does not match account.",
1016 "Secret does not match account.",
1017 "Missing field 'tx_json.Fee'.",
1018 "Missing field 'tx_json.Fee'."}}},
1020 {
"Missing 'Sequence' in sign_for.",
1023 "command": "dummy_command",
1024 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1025 "secret": "masterpassphrase",
1027 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1028 "Amount": "1000000000",
1029 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1031 "SigningPubKey": "",
1032 "TransactionType": "Payment"
1035 {{"Secret does not match account.",
1036 "Secret does not match account.",
1037 "Missing field 'tx_json.Sequence'.",
1038 "Missing field 'tx_json.Sequence'."}}},
1040 {
"Missing 'SigningPubKey' in sign_for is automatically filled in.",
1043 "command": "dummy_command",
1044 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1045 "secret": "masterpassphrase",
1047 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1048 "Amount": "1000000000",
1049 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1052 "TransactionType": "Payment"
1055 {{"Secret does not match account.",
1056 "Secret does not match account.",
1058 "Missing field 'tx_json.SigningPubKey'."}}},
1060 {
"In sign_for, an account may not sign for itself.",
1063 "command": "dummy_command",
1064 "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1067 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1068 "Amount": "1000000000",
1069 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1072 "TransactionType": "Payment"
1077 "A Signer may not be the transaction's Account "
1078 "(rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA).",
1079 "Missing field 'tx_json.SigningPubKey'."}}},
1081 {
"Cannot put duplicate accounts in Signers array",
1084 "command": "dummy_command",
1085 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1086 "secret": "masterpassphrase",
1088 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1089 "Amount" : "1000000000",
1090 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1096 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1097 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1098 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1102 "SigningPubKey" : "",
1103 "TransactionType" : "Payment"
1106 {{"Already multisigned.",
1107 "Already multisigned.",
1108 "Duplicate Signers:Signer:Account entries "
1109 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh) are not allowed.",
1112 {
"Correctly append to pre-established Signers array",
1115 "command": "dummy_command",
1116 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1119 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1120 "Amount" : "1000000000",
1121 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1127 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1128 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1129 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1133 "SigningPubKey" : "",
1134 "TransactionType" : "Payment"
1137 {{"Already multisigned.",
"Already multisigned.",
"",
""}}},
1139 {
"Append to pre-established Signers array with bad signature",
1142 "command": "dummy_command",
1143 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1146 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1147 "Amount" : "1000000000",
1148 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1154 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1155 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1156 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ACB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1160 "SigningPubKey" : "",
1161 "TransactionType" : "Payment"
1164 {{"Already multisigned.",
1165 "Already multisigned.",
1166 "Invalid signature.",
1167 "Invalid signature."}}},
1169 {
"Non-empty 'SigningPubKey' in sign_for.",
1172 "command": "dummy_command",
1173 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1174 "secret": "masterpassphrase",
1176 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1177 "Amount": "1000000000",
1178 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1181 "SigningPubKey": "1",
1182 "TransactionType": "Payment"
1185 {{"Secret does not match account.",
1186 "Secret does not match account.",
1187 "When multi-signing 'tx_json.SigningPubKey' must be empty.",
1188 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1190 {
"Missing 'TransactionType' in sign_for.",
1193 "command": "dummy_command",
1194 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1195 "secret": "masterpassphrase",
1197 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1198 "Amount": "1000000000",
1199 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1202 "SigningPubKey": "",
1205 {{"Missing field 'tx_json.TransactionType'.",
1206 "Missing field 'tx_json.TransactionType'.",
1207 "Missing field 'tx_json.TransactionType'.",
1208 "Missing field 'tx_json.TransactionType'."}}},
1210 {
"TxnSignature in sign_for.",
1213 "command": "dummy_command",
1214 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1217 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1218 "Amount" : "1000000000",
1219 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1225 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1226 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1227 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1231 "SigningPubKey" : "",
1232 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998",
1233 "TransactionType" : "Payment"
1236 {{"Already multisigned.",
1237 "Already multisigned.",
1238 "Already single-signed.",
1239 "Signing of transaction is malformed."}}},
1241 {
"Invalid field 'tx_json': string instead of object",
1244 "command": "dummy_command",
1245 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1246 "secret": "masterpassphrase",
1249 {{"Invalid field 'tx_json', not object.",
1250 "Invalid field 'tx_json', not object.",
1251 "Invalid field 'tx_json', not object.",
1252 "Invalid field 'tx_json', not object."}}},
1254 {
"Invalid field 'tx_json': integer instead of object",
1257 "command": "dummy_command",
1258 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1259 "secret": "masterpassphrase",
1262 {{"Invalid field 'tx_json', not object.",
1263 "Invalid field 'tx_json', not object.",
1264 "Invalid field 'tx_json', not object.",
1265 "Invalid field 'tx_json', not object."}}},
1267 {
"Invalid field 'tx_json': array instead of object",
1270 "command": "dummy_command",
1271 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1272 "secret": "masterpassphrase",
1273 "tx_json": [ "hello", "world" ]
1275 {{"Invalid field 'tx_json', not object.",
1276 "Invalid field 'tx_json', not object.",
1277 "Invalid field 'tx_json', not object.",
1278 "Invalid field 'tx_json', not object."}}},
1280 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
1283 "command": "dummy_command",
1284 "account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1285 "secret": "ssgN6zTvtM1q9XV8DvJpWm8LBYWiY",
1288 "Account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1289 "Amount": "1000000000",
1290 "DeliverMax": "1000000000",
1291 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1292 "TransactionType": "Payment"
1295 {{"Source account not found.",
1296 "Source account not found.",
1297 "Missing field 'tx_json.Sequence'.",
1298 "Missing field 'tx_json.Sequence'."}}},
1300 {
"Minimal submit_multisigned.",
1303 "command": "submit_multisigned",
1305 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1306 "Amount": "1000000000",
1307 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1313 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1314 "SigningPubKey" : "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1315 "TxnSignature" : "3045022100909D01399AFFAD1E30D250CE61F93975B7F61E47B5244D78C3E86D9806535D95022012E389E0ACB016334052B7FE07FA6CEFDC8BE82CB410FA841D5049641C89DC8F"
1319 "SigningPubKey": "",
1320 "TransactionType": "Payment"
1323 {{"Missing field 'secret'.",
"Missing field 'secret'.",
"Missing field 'account'.",
""}}},
1325 {
"Minimal submit_multisigned with bad signature.",
1328 "command": "submit_multisigned",
1330 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1331 "Amount": "1000000000",
1332 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1338 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1339 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1340 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1344 "SigningPubKey": "",
1345 "TransactionType": "Payment"
1348 {{"Missing field 'secret'.",
1349 "Missing field 'secret'.",
1350 "Missing field 'account'.",
1351 "Invalid signature."}}},
1353 {
"Missing tx_json in submit_multisigned.",
1356 "command": "submit_multisigned",
1360 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1361 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1362 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1367 {{"Missing field 'secret'.",
1368 "Missing field 'secret'.",
1369 "Missing field 'account'.",
1370 "Missing field 'tx_json'."}}},
1372 {
"Missing sequence in submit_multisigned.",
1375 "command": "submit_multisigned",
1377 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1378 "Amount": "1000000000",
1379 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1384 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1385 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1386 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1390 "SigningPubKey": "",
1391 "TransactionType": "Payment"
1394 {{"Missing field 'secret'.",
1395 "Missing field 'secret'.",
1396 "Missing field 'account'.",
1397 "Missing field 'tx_json.Sequence'."}}},
1399 {
"Missing SigningPubKey in submit_multisigned.",
1402 "command": "submit_multisigned",
1404 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1405 "Amount": "1000000000",
1406 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1411 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1412 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1413 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1418 "TransactionType": "Payment"
1421 {{"Missing field 'secret'.",
1422 "Missing field 'secret'.",
1423 "Missing field 'account'.",
1424 "Missing field 'tx_json.SigningPubKey'."}}},
1426 {
"Non-empty SigningPubKey in submit_multisigned.",
1429 "command": "submit_multisigned",
1431 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1432 "Amount": "1000000000",
1433 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1439 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1440 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1441 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1445 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1446 "TransactionType": "Payment"
1449 {{"Missing field 'secret'.",
1450 "Missing field 'secret'.",
1451 "Missing field 'account'.",
1452 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1454 {
"Missing TransactionType in submit_multisigned.",
1457 "command": "submit_multisigned",
1459 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1460 "Amount": "1000000000",
1461 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1466 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1467 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1468 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1473 "SigningPubKey": "",
1476 {{"Missing field 'secret'.",
1477 "Missing field 'secret'.",
1478 "Missing field 'account'.",
1479 "Missing field 'tx_json.TransactionType'."}}},
1481 {
"Missing Account in submit_multisigned.",
1484 "command": "submit_multisigned",
1486 "Amount": "1000000000",
1487 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1493 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1494 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1495 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1499 "SigningPubKey": "",
1500 "TransactionType": "Payment"
1503 {{"Missing field 'secret'.",
1504 "Missing field 'secret'.",
1505 "Missing field 'account'.",
1506 "Missing field 'tx_json.Account'."}}},
1508 {
"Malformed Account in submit_multisigned.",
1511 "command": "submit_multisigned",
1513 "Account": "NotAnAccount",
1514 "Amount": "1000000000",
1515 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1521 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1522 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1523 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1527 "SigningPubKey": "",
1528 "TransactionType": "Payment"
1531 {{"Missing field 'secret'.",
1532 "Missing field 'secret'.",
1533 "Missing field 'account'.",
1534 "Invalid field 'tx_json.Account'."}}},
1536 {
"Account not in ledger in submit_multisigned.",
1539 "command": "submit_multisigned",
1541 "Account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
1542 "Amount": "1000000000",
1543 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1549 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1550 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1551 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1555 "SigningPubKey": "",
1556 "TransactionType": "Payment"
1559 {{"Missing field 'secret'.",
1560 "Missing field 'secret'.",
1561 "Missing field 'account'.",
1562 "Source account not found."}}},
1564 {
"Missing Fee in submit_multisigned.",
1567 "command": "submit_multisigned",
1569 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1570 "Amount": "1000000000",
1571 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1576 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1577 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1578 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1582 "SigningPubKey": "",
1583 "TransactionType": "Payment"
1586 {{"Missing field 'secret'.",
1587 "Missing field 'secret'.",
1588 "Missing field 'account'.",
1589 "Missing field 'tx_json.Fee'."}}},
1591 {
"Non-numeric Fee in submit_multisigned.",
1594 "command": "submit_multisigned",
1596 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1597 "Amount": "1000000000",
1598 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1604 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1605 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1606 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1610 "SigningPubKey": "",
1611 "TransactionType": "Payment"
1614 {{"Missing field 'secret'.",
1615 "Missing field 'secret'.",
1616 "Missing field 'account'.",
1617 "Field 'tx_json.Fee' has invalid data."}}},
1619 {
"Missing Amount in submit_multisigned Payment.",
1622 "command": "submit_multisigned",
1624 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1625 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1631 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1632 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1633 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1637 "SigningPubKey": "",
1638 "TransactionType": "Payment"
1641 {{"Missing field 'secret'.",
1642 "Missing field 'secret'.",
1643 "Missing field 'account'.",
1644 "Missing field 'tx_json.Amount'."}}},
1646 {
"Invalid Amount in submit_multisigned Payment.",
1649 "command": "submit_multisigned",
1651 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1652 "Amount": "NotANumber",
1653 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1659 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1660 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1661 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1665 "SigningPubKey": "",
1666 "TransactionType": "Payment"
1669 {{"Missing field 'secret'.",
1670 "Missing field 'secret'.",
1671 "Missing field 'account'.",
1672 "Invalid field 'tx_json.Amount'."}}},
1674 {
"Invalid DeliverMax in submit_multisigned Payment.",
1677 "command": "submit_multisigned",
1679 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1680 "DeliverMax": "NotANumber",
1681 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1687 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1688 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1689 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1693 "SigningPubKey": "",
1694 "TransactionType": "Payment"
1697 {{"Missing field 'secret'.",
1698 "Missing field 'secret'.",
1699 "Missing field 'account'.",
1700 "Invalid field 'tx_json.Amount'."}}},
1702 {
"No build_path in submit_multisigned.",
1705 "command": "submit_multisigned",
1708 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1709 "Amount": "1000000000",
1710 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1716 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1717 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1718 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1722 "SigningPubKey": "",
1723 "TransactionType": "Payment"
1726 {{"Missing field 'secret'.",
1727 "Missing field 'secret'.",
1728 "Missing field 'account'.",
1729 "Field 'build_path' not allowed in this context."}}},
1731 {
"Missing Destination in submit_multisigned Payment.",
1734 "command": "submit_multisigned",
1736 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1737 "Amount": "1000000000",
1743 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1744 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1745 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1749 "SigningPubKey": "",
1750 "TransactionType": "Payment"
1753 {{"Missing field 'secret'.",
1754 "Missing field 'secret'.",
1755 "Missing field 'account'.",
1756 "Missing field 'tx_json.Destination'."}}},
1758 {
"Malformed Destination in submit_multisigned Payment.",
1761 "command": "submit_multisigned",
1763 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1764 "Amount": "1000000000",
1765 "Destination": "NotADestination",
1771 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1772 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1773 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1777 "SigningPubKey": "",
1778 "TransactionType": "Payment"
1781 {{"Missing field 'secret'.",
1782 "Missing field 'secret'.",
1783 "Missing field 'account'.",
1784 "Invalid field 'tx_json.Destination'."}}},
1786 {
"Missing Signers field in submit_multisigned.",
1789 "command": "submit_multisigned",
1791 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1792 "Amount": "1000000000",
1793 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1796 "SigningPubKey": "",
1797 "TransactionType": "Payment"
1800 {{"Missing field 'secret'.",
1801 "Missing field 'secret'.",
1802 "Missing field 'account'.",
1803 "Missing field 'tx_json.Signers'."}}},
1805 {
"Signers not an array in submit_multisigned.",
1808 "command": "submit_multisigned",
1810 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1811 "Amount": "1000000000",
1812 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1816 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1817 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1818 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1820 "SigningPubKey": "",
1821 "TransactionType": "Payment"
1824 {{"Missing field 'secret'.",
1825 "Missing field 'secret'.",
1826 "Missing field 'account'.",
1827 "Field 'tx_json.Signers' is not a JSON array."}}},
1829 {
"Empty Signers array in submit_multisigned.",
1832 "command": "submit_multisigned",
1834 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1835 "Amount": "1000000000",
1836 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1841 "SigningPubKey": "",
1842 "TransactionType": "Payment"
1845 {{"Missing field 'secret'.",
1846 "Missing field 'secret'.",
1847 "Missing field 'account'.",
1848 "tx_json.Signers array may not be empty."}}},
1850 {
"Duplicate Signer in submit_multisigned.",
1853 "command": "submit_multisigned",
1855 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1856 "Amount": "1000000000",
1857 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1863 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1864 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1865 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1870 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1871 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1872 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1876 "SigningPubKey": "",
1877 "TransactionType": "Payment"
1880 {{"Missing field 'secret'.",
1881 "Missing field 'secret'.",
1882 "Missing field 'account'.",
1883 "Duplicate Signers:Signer:Account entries "
1884 "(rPcNzota6B8YBokhYtcTNqQVCngtbnWfux) are not allowed."}}},
1886 {
"Signer is tx_json Account in submit_multisigned.",
1889 "command": "submit_multisigned",
1891 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1892 "Amount": "1000000000",
1893 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1899 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1900 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1901 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1905 "SigningPubKey": "",
1906 "TransactionType": "Payment"
1909 {{"Missing field 'secret'.",
1910 "Missing field 'secret'.",
1911 "Missing field 'account'.",
1912 "A Signer may not be the transaction's Account "
1913 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)."}}},
1915 {
"Empty Signers array in submit_multisigned, use DeliverMax",
1918 "command": "submit_multisigned",
1920 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1921 "DeliverMax": "10000000",
1922 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1927 "SigningPubKey": "",
1928 "TransactionType": "Payment"
1931 {{"Missing field 'secret'.",
1932 "Missing field 'secret'.",
1933 "Missing field 'account'.",
1934 "tx_json.Signers array may not be empty."}}},
1936 {
"Empty Signers array in submit_multisigned, use DeliverMax and Amount",
1939 "command": "submit_multisigned",
1941 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1942 "Amount": "10000000",
1943 "DeliverMax": "10000000",
1944 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1949 "SigningPubKey": "",
1950 "TransactionType": "Payment"
1953 {{"Missing field 'secret'.",
1954 "Missing field 'secret'.",
1955 "Missing field 'account'.",
1956 "tx_json.Signers array may not be empty."}}},
1958 {
"Payment cannot specify different DeliverMax and Amount.",
1961 "command": "dummy_command",
1962 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1963 "secret": "masterpassphrase",
1966 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1967 "Amount": "1000000000",
1968 "DeliverMax": "1000000020",
1969 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1972 "SigningPubKey": "",
1973 "TransactionType": "Payment"
1976 {{"Cannot specify differing 'Amount' and 'DeliverMax'",
1977 "Cannot specify differing 'Amount' and 'DeliverMax'",
1978 "Cannot specify differing 'Amount' and 'DeliverMax'",
1979 "Cannot specify differing 'Amount' and 'DeliverMax'"}}},
1980 {
"Payment cannot specify bad DomainID.",
1983 "command": "dummy_command",
1984 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1985 "secret": "masterpassphrase",
1988 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1989 "Amount": "1000000000",
1990 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1993 "SigningPubKey": "",
1994 "TransactionType": "Payment",
1995 "DomainID": "invalid",
1998 {{"Unable to parse 'DomainID'.",
1999 "Unable to parse 'DomainID'.",
2000 "Unable to parse 'DomainID'.",
2001 "Unable to parse 'DomainID'."}}},
2003 {
"Minimal delegated transaction.",
2006 "command": "dummy_command",
2009 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2010 "Amount": "1000000000",
2011 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2012 "TransactionType": "Payment",
2013 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
2016 {{"",
"",
"Missing field 'account'.",
"Missing field 'tx_json.Sequence'."}}},
2018 {
"Delegate not well formed.",
2021 "command": "dummy_command",
2024 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2025 "Amount": "1000000000",
2026 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2027 "TransactionType": "Payment",
2028 "Delegate": "NotAnAccount"
2031 {{"Invalid field 'tx_json.Delegate'.",
2032 "Invalid field 'tx_json.Delegate'.",
2033 "Missing field 'account'.",
2034 "Missing field 'tx_json.Sequence'."}}},
2036 {
"Delegate not in ledger.",
2039 "command": "dummy_command",
2042 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2043 "Amount": "1000000000",
2044 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2045 "TransactionType": "Payment",
2046 "Delegate": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd"
2049 {{"Delegate account not found.",
2050 "Delegate account not found.",
2051 "Missing field 'account'.",
2052 "Missing field 'tx_json.Sequence'."}}},
2054 {
"Delegate and secret not match.",
2057 "command": "dummy_command",
2060 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2061 "Amount": "1000000000",
2062 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2063 "TransactionType": "Payment",
2064 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
2067 {{"Secret does not match account.",
2068 "Secret does not match account.",
2069 "Missing field 'account'.",
2070 "Missing field 'tx_json.Sequence'."}}},
2082 Json::Value const result{env.
rpc(
"bad_command", R
"({"MakingThisUp": 0})")};
2084 BEAST_EXPECT(result[jss::result][jss::error] == "unknownCmd");
2085 BEAST_EXPECT(result[jss::result][jss::request][jss::command] ==
"bad_command");
2092 using namespace test::jtx;
2097 auto ledger = env.current();
2098 auto const& feeTrack = env.app().getFeeTrack();
2100 Account
const alice(
"alice");
2101 Account
const bob(
"bob");
2102 env.fund(XRP(100000), alice);
2105 auto const batchFee = batch::calcBatchFee(env, 0, 2);
2106 auto const seq = env.seq(alice);
2107 auto jt = env.jtnofill(
2108 batch::outer(alice, env.seq(alice), batchFee, tfAllOrNothing),
2109 batch::inner(pay(alice, bob, XRP(1)), seq + 1),
2110 batch::inner(pay(alice, bob, XRP(2)), seq + 2),
2111 batch::inner(pay(alice, bob, XRP(3)), seq + 3),
2112 batch::inner(pay(alice, bob, XRP(4)), seq + 4),
2113 batch::inner(pay(alice, bob, XRP(5)), seq + 5),
2114 batch::inner(pay(alice, bob, XRP(6)), seq + 6),
2115 batch::inner(pay(alice, bob, XRP(7)), seq + 7),
2116 batch::inner(pay(alice, bob, XRP(8)), seq + 8),
2117 batch::inner(pay(alice, bob, XRP(9)), seq + 9));
2119 jt.jv.removeMember(jss::Fee);
2120 jt.jv.removeMember(jss::TxnSignature);
2121 req[jss::tx_json] = jt.jv;
2130 BEAST_EXPECT(result.
size() == 0);
2132 req[jss::tx_json].isMember(jss::Fee) &&
2133 req[jss::tx_json][jss::Fee] == env.current()->fees().base.jsonClipped());
2139 auto ledger = env.current();
2140 auto const& feeTrack = env.app().getFeeTrack();
2142 Account
const alice(
"alice");
2143 Account
const bob(
"bob");
2144 env.fund(XRP(100000), alice, bob);
2147 auto jt = env.jtnofill(
2191 req[jss::tx_json] = jt.jv;
2200 BEAST_EXPECT(result.
size() == 0);
2202 req[jss::tx_json].isMember(jss::Fee) &&
2203 req[jss::tx_json][jss::Fee] == env.current()->fees().base.jsonClipped());
2212 auto const baseFee =
static_cast<int>(env.
current()->fees().base.drops());
2230 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == baseFee);
2236 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 2, "
2237 "\"tx_json\" : { } } ",
2250 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == baseFee);
2266 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2274 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 6, "
2275 "\"tx_json\" : { } } ",
2287 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2293 "{ \"fee_mult_max\" : 0, \"fee_div_max\" : 2, "
2294 "\"tx_json\" : { } } ",
2306 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2312 "{ \"fee_mult_max\" : 10, \"fee_div_max\" : 0, "
2313 "\"tx_json\" : { } } ",
2325 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2342 BEAST_EXPECT(result.
size() == 0);
2344 req[jss::tx_json].isMember(jss::Fee) &&
2345 req[jss::tx_json][jss::Fee] == env.
current()->fees().increment.jsonClipped());
2352 testcase(
"autofill escalated fees");
2353 using namespace test::jtx;
2355 cfg->loadFromString(
"[" SECTION_SIGNING_SUPPORT
"]\ntrue");
2356 cfg->section(
"transaction_queue").
set(
"minimum_txn_in_ledger_standalone",
"3");
2359 LoadFeeTrack const& feeTrackOuter = env.app().getFeeTrack();
2366 "fee_mult_max" : 1000,
2380 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 10);
2402 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 10);
2406 for (
auto i = 0; i < 4; ++i)
2408 env(
noop(env.master));
2416 "fee_mult_max" : 1000,
2431 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 8889);
2453 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2461 "fee_mult_max" : 1000,
2476 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2484 "fee_mult_max" : 8000,
2500 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 8889);
2508 "fee_mult_max" : -5,
2550 "fee_mult_max" : -2,
2572 toSign[jss::tx_json] =
noop(env.master);
2573 toSign[jss::secret] =
"masterpassphrase";
2574 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2575 auto result = rpcResult[jss::result];
2579 result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"10");
2581 result[jss::tx_json].isMember(jss::Sequence) &&
2590 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2591 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2593 env(
noop(env.master));
2597 toSign[jss::tx_json] =
noop(env.master);
2598 toSign[jss::secret] =
"masterpassphrase";
2599 toSign[jss::fee_mult_max] = 900;
2600 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2601 auto result = rpcResult[jss::result];
2605 result[jss::tx_json].isMember(jss::Fee) &&
2606 result[jss::tx_json][jss::Fee] ==
"7813");
2608 result[jss::tx_json].isMember(jss::Sequence) &&
2617 auto& feeTrack = env.app().getFeeTrack();
2618 BEAST_EXPECT(feeTrack.getLoadFactor() == 256);
2619 for (
int i = 0; i < 8; ++i)
2620 feeTrack.raiseLocalFee();
2621 BEAST_EXPECT(feeTrack.getLoadFactor() == 1220);
2625 toSign[jss::tx_json] =
noop(env.master);
2626 toSign[jss::secret] =
"masterpassphrase";
2627 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2628 auto result = rpcResult[jss::result];
2632 result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"47");
2634 result[jss::tx_json].isMember(jss::Sequence) &&
2645 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2646 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2648 env(
noop(env.master), fee(47));
2651 Env_ss
const envs(env);
2654 toSign[jss::tx_json] =
noop(env.master);
2655 toSign[jss::secret] =
"masterpassphrase";
2657 toSign[jss::fee_mult_max] = 700;
2658 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2659 auto result = rpcResult[jss::result];
2663 result[jss::tx_json].isMember(jss::Fee) &&
2664 result[jss::tx_json][jss::Fee] ==
"6806");
2666 result[jss::tx_json].isMember(jss::Sequence) &&
2675 using namespace test::jtx;
2677 cfg->NETWORK_ID = 1025;
2683 toSign[jss::tx_json] =
noop(env.master);
2685 BEAST_EXPECT(!toSign[jss::tx_json].isMember(jss::NetworkID));
2686 toSign[jss::secret] =
"masterpassphrase";
2687 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2688 auto result = rpcResult[jss::result];
2692 result[jss::tx_json].isMember(jss::NetworkID) &&
2693 result[jss::tx_json][jss::NetworkID] == 1025);
2708 using namespace std::chrono_literals;
2709 using namespace test::jtx;
2711 Account
const a{
"a"};
2712 Account
const g{
"g"};
2713 auto const USD = g[
"USD"];
2723 cfg->FEES.reference_fee = 10;
2726 env.fund(
XRP(100000), a, ed, g);
2729 env(
trust(a, USD(1000)));
2730 env(
trust(env.master, USD(1000)));
2731 env(
pay(g, a, USD(50)));
2732 env(
pay(g, env.master, USD(50)));
2757 static TestStuff
const testFuncs[] = {
2763 for (
auto testFunc : testFuncs)
2771 Throw<std::runtime_error>(
"Internal JSONRPC_test error. Bad test JSON.");
2773 static Role const testedRoles[] = {
2776 for (
Role const testRole : testedRoles)
2779 auto const signFn = get<0>(testFunc);
2780 if (signFn !=
nullptr)
2782 assert(get<1>(testFunc) ==
nullptr);
2787 auto const submitFn = get<1>(testFunc);
2788 assert(submitFn !=
nullptr);
2795 errStr = result[
"error_message"].
asString();
2797 if (errStr == txnTest.expMsg[get<3>(testFunc)])
2804 description << txnTest.description <<
" Called " << get<2>(testFunc)
2805 <<
"(). Got \'" << errStr <<
"\'";
2806 fail(description.
str(), __FILE__, txnTest.line);
2825BEAST_DEFINE_TESTSUITE(JSONRPC, rpc,
xrpl);
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
Manages the current fee schedule.
std::uint32_t getLoadFactor() const
void run() override
Runs the suite.
static void fakeProcessTransaction(std::shared_ptr< Transaction > &, bool, bool, NetworkOPs::FailHard)
void testAutoFillNetworkID()
void testAutoFillEscalatedFees()
void testTransactionRPC()
virtual LoadFeeTrack & getFeeTrack()=0
Immutable cryptographic account descriptor.
std::string const & human() const
Returns the human readable public key.
A transaction testing environment.
Json::Value rpc(unsigned apiVersion, std::unordered_map< std::string, std::string > const &headers, std::string const &cmd, Args &&... args)
Execute an RPC command.
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
@ uintValue
unsigned integer value
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 transactionSign(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 transactionSignFor(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a Json::objectValue.
static constexpr std::integral_constant< unsigned, Version > apiVersion
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.
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 trust(AccountID const &account, STAmount const &amount, std::uint32_t flags=0)
Json::Value pay(Account const &account, AccountID const &to, STAmount const &amount)
XRP_t const XRP
Converts to XRP Issue or STAmount.
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.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
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
TxnTestData(TxnTestData &&)=delete
char const *const description
constexpr TxnTestData(char const *description_, int line_, char const *json_, std::array< char const *const, 4 > const &expMsg_)
TxnTestData & operator=(TxnTestData &&)=delete
TxnTestData & operator=(TxnTestData const &)=delete
std::array< char const *const, 4 > const expMsg