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": "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.",
"Secret does not match account.",
"",
"Missing field 'tx_json.Signers'."}}},
855 {
"Minimal offline sign_for.",
858 "command": "dummy_command",
859 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
860 "secret": "masterpassphrase",
863 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
864 "Amount": "1000000000",
865 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
869 "TransactionType": "Payment"
872 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
874 {
"Offline sign_for using 'seed' instead of 'secret'.",
877 "command": "dummy_command",
878 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
879 "key_type": "ed25519",
880 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
883 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
884 "Amount": "1000000000",
885 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
889 "TransactionType": "Payment"
892 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
894 {
"Malformed seed in sign_for.",
897 "command": "dummy_command",
898 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
899 "key_type": "ed25519",
900 "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd",
903 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
904 "Amount": "1000000000",
905 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
909 "TransactionType": "Payment"
912 {{"Disallowed seed.",
"Disallowed seed.",
"Disallowed seed.",
"Missing field 'tx_json.Signers'."}}},
914 {
"Missing 'Account' in sign_for.",
917 "command": "dummy_command",
918 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
919 "secret": "masterpassphrase",
921 "Amount": "1000000000",
922 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
926 "TransactionType": "Payment"
929 {{"Missing field 'tx_json.Account'.",
930 "Missing field 'tx_json.Account'.",
931 "Missing field 'tx_json.Account'.",
932 "Missing field 'tx_json.Account'."}}},
934 {
"Missing 'Amount' in sign_for.",
937 "command": "dummy_command",
938 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
939 "secret": "masterpassphrase",
941 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
942 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
946 "TransactionType": "Payment"
949 {{"Missing field 'tx_json.Amount'.",
950 "Missing field 'tx_json.Amount'.",
951 "Missing field 'tx_json.Amount'.",
952 "Missing field 'tx_json.Amount'."}}},
954 {
"Missing 'Destination' in sign_for.",
957 "command": "dummy_command",
958 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
959 "secret": "masterpassphrase",
961 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
962 "Amount": "1000000000",
966 "TransactionType": "Payment"
969 {{"Missing field 'tx_json.Destination'.",
970 "Missing field 'tx_json.Destination'.",
971 "Missing field 'tx_json.Destination'.",
972 "Missing field 'tx_json.Destination'."}}},
974 {
"Missing 'Destination' in sign_for, use DeliverMax",
977 "command": "dummy_command",
978 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
979 "secret": "masterpassphrase",
981 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
982 "DeliverMax": "1000000000",
986 "TransactionType": "Payment"
989 {{"Missing field 'tx_json.Destination'.",
990 "Missing field 'tx_json.Destination'.",
991 "Missing field 'tx_json.Destination'.",
992 "Missing field 'tx_json.Destination'."}}},
994 {
"Missing 'Fee' in sign_for.",
997 "command": "dummy_command",
998 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
999 "secret": "masterpassphrase",
1001 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1002 "Amount": "1000000000",
1003 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1005 "SigningPubKey": "",
1006 "TransactionType": "Payment"
1009 {{"Secret does not match account.",
1010 "Secret does not match account.",
1011 "Missing field 'tx_json.Fee'.",
1012 "Missing field 'tx_json.Fee'."}}},
1014 {
"Missing 'Sequence' in sign_for.",
1017 "command": "dummy_command",
1018 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1019 "secret": "masterpassphrase",
1021 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1022 "Amount": "1000000000",
1023 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1025 "SigningPubKey": "",
1026 "TransactionType": "Payment"
1029 {{"Secret does not match account.",
1030 "Secret does not match account.",
1031 "Missing field 'tx_json.Sequence'.",
1032 "Missing field 'tx_json.Sequence'."}}},
1034 {
"Missing 'SigningPubKey' in sign_for is automatically filled in.",
1037 "command": "dummy_command",
1038 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1039 "secret": "masterpassphrase",
1041 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1042 "Amount": "1000000000",
1043 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1046 "TransactionType": "Payment"
1049 {{"Secret does not match account.",
1050 "Secret does not match account.",
1052 "Missing field 'tx_json.SigningPubKey'."}}},
1054 {
"In sign_for, an account may not sign for itself.",
1057 "command": "dummy_command",
1058 "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1061 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1062 "Amount": "1000000000",
1063 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1066 "TransactionType": "Payment"
1071 "A Signer may not be the transaction's Account "
1072 "(rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA).",
1073 "Missing field 'tx_json.SigningPubKey'."}}},
1075 {
"Cannot put duplicate accounts in Signers array",
1078 "command": "dummy_command",
1079 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1080 "secret": "masterpassphrase",
1082 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1083 "Amount" : "1000000000",
1084 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1090 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1091 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1092 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1096 "SigningPubKey" : "",
1097 "TransactionType" : "Payment"
1100 {{"Already multisigned.",
1101 "Already multisigned.",
1102 "Duplicate Signers:Signer:Account entries "
1103 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh) are not allowed.",
1106 {
"Correctly append to pre-established Signers array",
1109 "command": "dummy_command",
1110 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1113 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1114 "Amount" : "1000000000",
1115 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1121 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1122 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1123 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1127 "SigningPubKey" : "",
1128 "TransactionType" : "Payment"
1131 {{"Already multisigned.",
"Already multisigned.",
"",
""}}},
1133 {
"Append to pre-established Signers array with bad signature",
1136 "command": "dummy_command",
1137 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1140 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1141 "Amount" : "1000000000",
1142 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1148 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1149 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1150 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ACB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1154 "SigningPubKey" : "",
1155 "TransactionType" : "Payment"
1158 {{"Already multisigned.",
"Already multisigned.",
"Invalid signature.",
"Invalid signature."}}},
1160 {
"Non-empty 'SigningPubKey' in sign_for.",
1163 "command": "dummy_command",
1164 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1165 "secret": "masterpassphrase",
1167 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1168 "Amount": "1000000000",
1169 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1172 "SigningPubKey": "1",
1173 "TransactionType": "Payment"
1176 {{"Secret does not match account.",
1177 "Secret does not match account.",
1178 "When multi-signing 'tx_json.SigningPubKey' must be empty.",
1179 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1181 {
"Missing 'TransactionType' in sign_for.",
1184 "command": "dummy_command",
1185 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1186 "secret": "masterpassphrase",
1188 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1189 "Amount": "1000000000",
1190 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1193 "SigningPubKey": "",
1196 {{"Missing field 'tx_json.TransactionType'.",
1197 "Missing field 'tx_json.TransactionType'.",
1198 "Missing field 'tx_json.TransactionType'.",
1199 "Missing field 'tx_json.TransactionType'."}}},
1201 {
"TxnSignature in sign_for.",
1204 "command": "dummy_command",
1205 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1208 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1209 "Amount" : "1000000000",
1210 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1216 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1217 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1218 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1222 "SigningPubKey" : "",
1223 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998",
1224 "TransactionType" : "Payment"
1227 {{"Already multisigned.",
1228 "Already multisigned.",
1229 "Already single-signed.",
1230 "Signing of transaction is malformed."}}},
1232 {
"Invalid field 'tx_json': string instead of object",
1235 "command": "dummy_command",
1236 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1237 "secret": "masterpassphrase",
1240 {{"Invalid field 'tx_json', not object.",
1241 "Invalid field 'tx_json', not object.",
1242 "Invalid field 'tx_json', not object.",
1243 "Invalid field 'tx_json', not object."}}},
1245 {
"Invalid field 'tx_json': integer instead of object",
1248 "command": "dummy_command",
1249 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1250 "secret": "masterpassphrase",
1253 {{"Invalid field 'tx_json', not object.",
1254 "Invalid field 'tx_json', not object.",
1255 "Invalid field 'tx_json', not object.",
1256 "Invalid field 'tx_json', not object."}}},
1258 {
"Invalid field 'tx_json': array instead of object",
1261 "command": "dummy_command",
1262 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1263 "secret": "masterpassphrase",
1264 "tx_json": [ "hello", "world" ]
1266 {{"Invalid field 'tx_json', not object.",
1267 "Invalid field 'tx_json', not object.",
1268 "Invalid field 'tx_json', not object.",
1269 "Invalid field 'tx_json', not object."}}},
1271 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
1274 "command": "dummy_command",
1275 "account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1276 "secret": "ssgN6zTvtM1q9XV8DvJpWm8LBYWiY",
1279 "Account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1280 "Amount": "1000000000",
1281 "DeliverMax": "1000000000",
1282 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1283 "TransactionType": "Payment"
1286 {{"Source account not found.",
1287 "Source account not found.",
1288 "Missing field 'tx_json.Sequence'.",
1289 "Missing field 'tx_json.Sequence'."}}},
1291 {
"Minimal submit_multisigned.",
1294 "command": "submit_multisigned",
1296 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1297 "Amount": "1000000000",
1298 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1304 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1305 "SigningPubKey" : "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1306 "TxnSignature" : "3045022100909D01399AFFAD1E30D250CE61F93975B7F61E47B5244D78C3E86D9806535D95022012E389E0ACB016334052B7FE07FA6CEFDC8BE82CB410FA841D5049641C89DC8F"
1310 "SigningPubKey": "",
1311 "TransactionType": "Payment"
1314 {{"Missing field 'secret'.",
"Missing field 'secret'.",
"Missing field 'account'.",
""}}},
1316 {
"Minimal submit_multisigned with bad signature.",
1319 "command": "submit_multisigned",
1321 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1322 "Amount": "1000000000",
1323 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1329 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1330 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1331 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1335 "SigningPubKey": "",
1336 "TransactionType": "Payment"
1339 {{"Missing field 'secret'.",
"Missing field 'secret'.",
"Missing field 'account'.",
"Invalid signature."}}},
1341 {
"Missing tx_json in submit_multisigned.",
1344 "command": "submit_multisigned",
1348 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1349 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1350 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1355 {{"Missing field 'secret'.",
"Missing field 'secret'.",
"Missing field 'account'.",
"Missing field 'tx_json'."}}},
1357 {
"Missing sequence in submit_multisigned.",
1360 "command": "submit_multisigned",
1362 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1363 "Amount": "1000000000",
1364 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1369 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1370 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1371 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1375 "SigningPubKey": "",
1376 "TransactionType": "Payment"
1379 {{"Missing field 'secret'.",
1380 "Missing field 'secret'.",
1381 "Missing field 'account'.",
1382 "Missing field 'tx_json.Sequence'."}}},
1384 {
"Missing SigningPubKey in submit_multisigned.",
1387 "command": "submit_multisigned",
1389 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1390 "Amount": "1000000000",
1391 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1396 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1397 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1398 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1403 "TransactionType": "Payment"
1406 {{"Missing field 'secret'.",
1407 "Missing field 'secret'.",
1408 "Missing field 'account'.",
1409 "Missing field 'tx_json.SigningPubKey'."}}},
1411 {
"Non-empty SigningPubKey in submit_multisigned.",
1414 "command": "submit_multisigned",
1416 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1417 "Amount": "1000000000",
1418 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1424 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1425 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1426 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1430 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1431 "TransactionType": "Payment"
1434 {{"Missing field 'secret'.",
1435 "Missing field 'secret'.",
1436 "Missing field 'account'.",
1437 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1439 {
"Missing TransactionType in submit_multisigned.",
1442 "command": "submit_multisigned",
1444 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1445 "Amount": "1000000000",
1446 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1451 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1452 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1453 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1458 "SigningPubKey": "",
1461 {{"Missing field 'secret'.",
1462 "Missing field 'secret'.",
1463 "Missing field 'account'.",
1464 "Missing field 'tx_json.TransactionType'."}}},
1466 {
"Missing Account in submit_multisigned.",
1469 "command": "submit_multisigned",
1471 "Amount": "1000000000",
1472 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1478 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1479 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1480 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1484 "SigningPubKey": "",
1485 "TransactionType": "Payment"
1488 {{"Missing field 'secret'.",
1489 "Missing field 'secret'.",
1490 "Missing field 'account'.",
1491 "Missing field 'tx_json.Account'."}}},
1493 {
"Malformed Account in submit_multisigned.",
1496 "command": "submit_multisigned",
1498 "Account": "NotAnAccount",
1499 "Amount": "1000000000",
1500 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1506 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1507 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1508 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1512 "SigningPubKey": "",
1513 "TransactionType": "Payment"
1516 {{"Missing field 'secret'.",
1517 "Missing field 'secret'.",
1518 "Missing field 'account'.",
1519 "Invalid field 'tx_json.Account'."}}},
1521 {
"Account not in ledger in submit_multisigned.",
1524 "command": "submit_multisigned",
1526 "Account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
1527 "Amount": "1000000000",
1528 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1534 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1535 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1536 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1540 "SigningPubKey": "",
1541 "TransactionType": "Payment"
1544 {{"Missing field 'secret'.",
"Missing field 'secret'.",
"Missing field 'account'.",
"Source account not found."}}},
1546 {
"Missing Fee in submit_multisigned.",
1549 "command": "submit_multisigned",
1551 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1552 "Amount": "1000000000",
1553 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1558 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1559 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1560 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1564 "SigningPubKey": "",
1565 "TransactionType": "Payment"
1568 {{"Missing field 'secret'.",
1569 "Missing field 'secret'.",
1570 "Missing field 'account'.",
1571 "Missing field 'tx_json.Fee'."}}},
1573 {
"Non-numeric Fee in submit_multisigned.",
1576 "command": "submit_multisigned",
1578 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1579 "Amount": "1000000000",
1580 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1586 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1587 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1588 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1592 "SigningPubKey": "",
1593 "TransactionType": "Payment"
1596 {{"Missing field 'secret'.",
1597 "Missing field 'secret'.",
1598 "Missing field 'account'.",
1599 "Field 'tx_json.Fee' has invalid data."}}},
1601 {
"Missing Amount in submit_multisigned Payment.",
1604 "command": "submit_multisigned",
1606 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1607 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1613 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1614 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1615 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1619 "SigningPubKey": "",
1620 "TransactionType": "Payment"
1623 {{"Missing field 'secret'.",
1624 "Missing field 'secret'.",
1625 "Missing field 'account'.",
1626 "Missing field 'tx_json.Amount'."}}},
1628 {
"Invalid Amount in submit_multisigned Payment.",
1631 "command": "submit_multisigned",
1633 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1634 "Amount": "NotANumber",
1635 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1641 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1642 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1643 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1647 "SigningPubKey": "",
1648 "TransactionType": "Payment"
1651 {{"Missing field 'secret'.",
1652 "Missing field 'secret'.",
1653 "Missing field 'account'.",
1654 "Invalid field 'tx_json.Amount'."}}},
1656 {
"Invalid DeliverMax in submit_multisigned Payment.",
1659 "command": "submit_multisigned",
1661 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1662 "DeliverMax": "NotANumber",
1663 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1669 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1670 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1671 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1675 "SigningPubKey": "",
1676 "TransactionType": "Payment"
1679 {{"Missing field 'secret'.",
1680 "Missing field 'secret'.",
1681 "Missing field 'account'.",
1682 "Invalid field 'tx_json.Amount'."}}},
1684 {
"No build_path in submit_multisigned.",
1687 "command": "submit_multisigned",
1690 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1691 "Amount": "1000000000",
1692 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1698 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1699 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1700 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1704 "SigningPubKey": "",
1705 "TransactionType": "Payment"
1708 {{"Missing field 'secret'.",
1709 "Missing field 'secret'.",
1710 "Missing field 'account'.",
1711 "Field 'build_path' not allowed in this context."}}},
1713 {
"Missing Destination in submit_multisigned Payment.",
1716 "command": "submit_multisigned",
1718 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1719 "Amount": "1000000000",
1725 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1726 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1727 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1731 "SigningPubKey": "",
1732 "TransactionType": "Payment"
1735 {{"Missing field 'secret'.",
1736 "Missing field 'secret'.",
1737 "Missing field 'account'.",
1738 "Missing field 'tx_json.Destination'."}}},
1740 {
"Malformed Destination in submit_multisigned Payment.",
1743 "command": "submit_multisigned",
1745 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1746 "Amount": "1000000000",
1747 "Destination": "NotADestination",
1753 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1754 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1755 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1759 "SigningPubKey": "",
1760 "TransactionType": "Payment"
1763 {{"Missing field 'secret'.",
1764 "Missing field 'secret'.",
1765 "Missing field 'account'.",
1766 "Invalid field 'tx_json.Destination'."}}},
1768 {
"Missing Signers field in submit_multisigned.",
1771 "command": "submit_multisigned",
1773 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1774 "Amount": "1000000000",
1775 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1778 "SigningPubKey": "",
1779 "TransactionType": "Payment"
1782 {{"Missing field 'secret'.",
1783 "Missing field 'secret'.",
1784 "Missing field 'account'.",
1785 "Missing field 'tx_json.Signers'."}}},
1787 {
"Signers not an array in submit_multisigned.",
1790 "command": "submit_multisigned",
1792 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1793 "Amount": "1000000000",
1794 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1798 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1799 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1800 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1802 "SigningPubKey": "",
1803 "TransactionType": "Payment"
1806 {{"Missing field 'secret'.",
1807 "Missing field 'secret'.",
1808 "Missing field 'account'.",
1809 "Field 'tx_json.Signers' is not a JSON array."}}},
1811 {
"Empty Signers array in submit_multisigned.",
1814 "command": "submit_multisigned",
1816 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1817 "Amount": "1000000000",
1818 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1823 "SigningPubKey": "",
1824 "TransactionType": "Payment"
1827 {{"Missing field 'secret'.",
1828 "Missing field 'secret'.",
1829 "Missing field 'account'.",
1830 "tx_json.Signers array may not be empty."}}},
1832 {
"Duplicate Signer in submit_multisigned.",
1835 "command": "submit_multisigned",
1837 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1838 "Amount": "1000000000",
1839 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1845 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1846 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1847 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1852 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1853 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1854 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1858 "SigningPubKey": "",
1859 "TransactionType": "Payment"
1862 {{"Missing field 'secret'.",
1863 "Missing field 'secret'.",
1864 "Missing field 'account'.",
1865 "Duplicate Signers:Signer:Account entries "
1866 "(rPcNzota6B8YBokhYtcTNqQVCngtbnWfux) are not allowed."}}},
1868 {
"Signer is tx_json Account in submit_multisigned.",
1871 "command": "submit_multisigned",
1873 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1874 "Amount": "1000000000",
1875 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1881 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1882 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1883 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1887 "SigningPubKey": "",
1888 "TransactionType": "Payment"
1891 {{"Missing field 'secret'.",
1892 "Missing field 'secret'.",
1893 "Missing field 'account'.",
1894 "A Signer may not be the transaction's Account "
1895 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)."}}},
1897 {
"Empty Signers array in submit_multisigned, use DeliverMax",
1900 "command": "submit_multisigned",
1902 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1903 "DeliverMax": "10000000",
1904 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1909 "SigningPubKey": "",
1910 "TransactionType": "Payment"
1913 {{"Missing field 'secret'.",
1914 "Missing field 'secret'.",
1915 "Missing field 'account'.",
1916 "tx_json.Signers array may not be empty."}}},
1918 {
"Empty Signers array in submit_multisigned, use DeliverMax and Amount",
1921 "command": "submit_multisigned",
1923 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1924 "Amount": "10000000",
1925 "DeliverMax": "10000000",
1926 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1931 "SigningPubKey": "",
1932 "TransactionType": "Payment"
1935 {{"Missing field 'secret'.",
1936 "Missing field 'secret'.",
1937 "Missing field 'account'.",
1938 "tx_json.Signers array may not be empty."}}},
1940 {
"Payment cannot specify different DeliverMax and Amount.",
1943 "command": "dummy_command",
1944 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1945 "secret": "masterpassphrase",
1948 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1949 "Amount": "1000000000",
1950 "DeliverMax": "1000000020",
1951 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1954 "SigningPubKey": "",
1955 "TransactionType": "Payment"
1958 {{"Cannot specify differing 'Amount' and 'DeliverMax'",
1959 "Cannot specify differing 'Amount' and 'DeliverMax'",
1960 "Cannot specify differing 'Amount' and 'DeliverMax'",
1961 "Cannot specify differing 'Amount' and 'DeliverMax'"}}},
1962 {
"Payment cannot specify bad DomainID.",
1965 "command": "dummy_command",
1966 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1967 "secret": "masterpassphrase",
1970 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1971 "Amount": "1000000000",
1972 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1975 "SigningPubKey": "",
1976 "TransactionType": "Payment",
1977 "DomainID": "invalid",
1980 {{"Unable to parse 'DomainID'.",
1981 "Unable to parse 'DomainID'.",
1982 "Unable to parse 'DomainID'.",
1983 "Unable to parse 'DomainID'."}}},
1985 {
"Minimal delegated transaction.",
1988 "command": "dummy_command",
1991 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1992 "Amount": "1000000000",
1993 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1994 "TransactionType": "Payment",
1995 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
1998 {{"",
"",
"Missing field 'account'.",
"Missing field 'tx_json.Sequence'."}}},
2000 {
"Delegate not well formed.",
2003 "command": "dummy_command",
2006 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2007 "Amount": "1000000000",
2008 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2009 "TransactionType": "Payment",
2010 "Delegate": "NotAnAccount"
2013 {{"Invalid field 'tx_json.Delegate'.",
2014 "Invalid field 'tx_json.Delegate'.",
2015 "Missing field 'account'.",
2016 "Missing field 'tx_json.Sequence'."}}},
2018 {
"Delegate not in ledger.",
2021 "command": "dummy_command",
2024 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2025 "Amount": "1000000000",
2026 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2027 "TransactionType": "Payment",
2028 "Delegate": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd"
2031 {{"Delegate account not found.",
2032 "Delegate account not found.",
2033 "Missing field 'account'.",
2034 "Missing field 'tx_json.Sequence'."}}},
2036 {
"Delegate and secret not match.",
2039 "command": "dummy_command",
2042 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2043 "Amount": "1000000000",
2044 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2045 "TransactionType": "Payment",
2046 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
2049 {{"Secret does not match account.",
2050 "Secret does not match account.",
2051 "Missing field 'account'.",
2052 "Missing field 'tx_json.Sequence'."}}},
2064 Json::Value const result{env.
rpc(
"bad_command", R
"({"MakingThisUp": 0})")};
2066 BEAST_EXPECT(result[jss::result][jss::error] == "unknownCmd");
2067 BEAST_EXPECT(result[jss::result][jss::request][jss::command] ==
"bad_command");
2074 using namespace test::jtx;
2079 auto ledger = env.current();
2080 auto const& feeTrack = env.app().getFeeTrack();
2082 Account
const alice(
"alice");
2083 Account
const bob(
"bob");
2084 env.fund(XRP(100000), alice);
2087 auto const batchFee = batch::calcBatchFee(env, 0, 2);
2088 auto const seq = env.seq(alice);
2089 auto jt = env.jtnofill(
2091 batch::inner(pay(alice, bob, XRP(1)), seq + 1),
2092 batch::inner(pay(alice, bob, XRP(2)), seq + 2),
2093 batch::inner(pay(alice, bob, XRP(3)), seq + 3),
2094 batch::inner(pay(alice, bob, XRP(4)), seq + 4),
2095 batch::inner(pay(alice, bob, XRP(5)), seq + 5),
2096 batch::inner(pay(alice, bob, XRP(6)), seq + 6),
2097 batch::inner(pay(alice, bob, XRP(7)), seq + 7),
2098 batch::inner(pay(alice, bob, XRP(8)), seq + 8),
2099 batch::inner(pay(alice, bob, XRP(9)), seq + 9));
2101 jt.jv.removeMember(jss::Fee);
2102 jt.jv.removeMember(jss::TxnSignature);
2103 req[jss::tx_json] = jt.jv;
2105 checkFee(req,
Role::ADMIN,
true, env.app().config(), feeTrack, env.app().getTxQ(), env.app());
2106 BEAST_EXPECT(result.
size() == 0);
2108 req[jss::tx_json].isMember(jss::Fee) &&
2109 req[jss::tx_json][jss::Fee] == env.current()->fees().base.jsonClipped());
2115 auto ledger = env.current();
2116 auto const& feeTrack = env.app().getFeeTrack();
2118 Account
const alice(
"alice");
2119 Account
const bob(
"bob");
2120 env.fund(XRP(100000), alice, bob);
2123 auto jt = env.jtnofill(
2167 req[jss::tx_json] = jt.jv;
2169 checkFee(req,
Role::ADMIN,
true, env.app().config(), feeTrack, env.app().getTxQ(), env.app());
2170 BEAST_EXPECT(result.
size() == 0);
2172 req[jss::tx_json].isMember(jss::Fee) &&
2173 req[jss::tx_json][jss::Fee] == env.current()->fees().base.jsonClipped());
2182 auto const baseFee =
static_cast<int>(env.
current()->fees().base.drops());
2193 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == baseFee);
2199 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 2, "
2200 "\"tx_json\" : { } } ",
2206 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == baseFee);
2216 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2224 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 6, "
2225 "\"tx_json\" : { } } ",
2231 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2237 "{ \"fee_mult_max\" : 0, \"fee_div_max\" : 2, "
2238 "\"tx_json\" : { } } ",
2244 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2250 "{ \"fee_mult_max\" : 10, \"fee_div_max\" : 0, "
2251 "\"tx_json\" : { } } ",
2257 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2268 BEAST_EXPECT(result.
size() == 0);
2270 req[jss::tx_json].isMember(jss::Fee) &&
2271 req[jss::tx_json][jss::Fee] == env.
current()->fees().increment.jsonClipped());
2278 testcase(
"autofill escalated fees");
2279 using namespace test::jtx;
2281 cfg->loadFromString(
"[" SECTION_SIGNING_SUPPORT
"]\ntrue");
2282 cfg->section(
"transaction_queue").
set(
"minimum_txn_in_ledger_standalone",
"3");
2285 LoadFeeTrack const& feeTrackOuter = env.app().getFeeTrack();
2292 "fee_mult_max" : 1000,
2297 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2300 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 10);
2313 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2316 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 10);
2320 for (
auto i = 0; i < 4; ++i)
2322 env(
noop(env.master));
2330 "fee_mult_max" : 1000,
2335 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2338 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 8889);
2351 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2354 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2362 "fee_mult_max" : 1000,
2368 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2371 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2379 "fee_mult_max" : 8000,
2385 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2388 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 8889);
2396 "fee_mult_max" : -5,
2401 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2416 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2426 "fee_mult_max" : -2,
2432 checkFee(req, Role::ADMIN, true, env.app().config(), feeTrackOuter, env.app().getTxQ(), env.app());
2442 toSign[jss::tx_json] =
noop(env.master);
2443 toSign[jss::secret] =
"masterpassphrase";
2444 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2445 auto result = rpcResult[jss::result];
2448 BEAST_EXPECT(result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"10");
2450 result[jss::tx_json].isMember(jss::Sequence) &&
2459 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2460 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2462 env(
noop(env.master));
2466 toSign[jss::tx_json] =
noop(env.master);
2467 toSign[jss::secret] =
"masterpassphrase";
2468 toSign[jss::fee_mult_max] = 900;
2469 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2470 auto result = rpcResult[jss::result];
2473 BEAST_EXPECT(result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"7813");
2475 result[jss::tx_json].isMember(jss::Sequence) &&
2484 auto& feeTrack = env.app().getFeeTrack();
2485 BEAST_EXPECT(feeTrack.getLoadFactor() == 256);
2486 for (
int i = 0; i < 8; ++i)
2487 feeTrack.raiseLocalFee();
2488 BEAST_EXPECT(feeTrack.getLoadFactor() == 1220);
2492 toSign[jss::tx_json] =
noop(env.master);
2493 toSign[jss::secret] =
"masterpassphrase";
2494 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2495 auto result = rpcResult[jss::result];
2498 BEAST_EXPECT(result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"47");
2500 result[jss::tx_json].isMember(jss::Sequence) &&
2511 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2512 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2514 env(
noop(env.master), fee(47));
2520 toSign[jss::tx_json] =
noop(env.master);
2521 toSign[jss::secret] =
"masterpassphrase";
2523 toSign[jss::fee_mult_max] = 700;
2524 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2525 auto result = rpcResult[jss::result];
2528 BEAST_EXPECT(result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"6806");
2530 result[jss::tx_json].isMember(jss::Sequence) &&
2539 using namespace test::jtx;
2541 cfg->NETWORK_ID = 1025;
2547 toSign[jss::tx_json] =
noop(env.master);
2549 BEAST_EXPECT(!toSign[jss::tx_json].isMember(jss::NetworkID));
2550 toSign[jss::secret] =
"masterpassphrase";
2551 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2552 auto result = rpcResult[jss::result];
2555 BEAST_EXPECT(result[jss::tx_json].isMember(jss::NetworkID) && result[jss::tx_json][jss::NetworkID] == 1025);
2570 using namespace std::chrono_literals;
2571 using namespace test::jtx;
2573 Account
const a{
"a"};
2574 Account
const g{
"g"};
2575 auto const USD = g[
"USD"];
2585 cfg->FEES.reference_fee = 10;
2588 env.fund(
XRP(100000), a, ed, g);
2591 env(
trust(a, USD(1000)));
2592 env(
trust(env.master, USD(1000)));
2593 env(
pay(g, a, USD(50)));
2594 env(
pay(g, env.master, USD(50)));
2619 static TestStuff
const testFuncs[] = {
2625 for (
auto testFunc : testFuncs)
2633 Throw<std::runtime_error>(
"Internal JSONRPC_test error. Bad test JSON.");
2637 for (
Role testRole : testedRoles)
2640 auto const signFn = get<0>(testFunc);
2641 if (signFn !=
nullptr)
2643 assert(get<1>(testFunc) ==
nullptr);
2648 auto const submitFn = get<1>(testFunc);
2649 assert(submitFn !=
nullptr);
2655 errStr = result[
"error_message"].
asString();
2657 if (errStr == txnTest.expMsg[get<3>(testFunc)])
2664 description << txnTest.description <<
" Called " << get<2>(testFunc) <<
"(). Got \'" << errStr
2666 fail(description.
str(), __FILE__, txnTest.line);
2685BEAST_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
virtual LoadFeeTrack & getFeeTrack()=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()
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.
std::function< void(std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, NetworkOPs::FailHard failType)> ProcessTransactionFn
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.
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)
constexpr std::uint32_t tfAllOrNothing
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