1#include <test/jtx/Account.h>
2#include <test/jtx/Env.h>
3#include <test/jtx/Env_ss.h>
4#include <test/jtx/acctdelete.h>
5#include <test/jtx/amount.h>
6#include <test/jtx/batch.h>
7#include <test/jtx/envconfig.h>
8#include <test/jtx/fee.h>
9#include <test/jtx/multisign.h>
10#include <test/jtx/noop.h>
11#include <test/jtx/pay.h>
12#include <test/jtx/trust.h>
14#include <xrpld/app/misc/TxQ.h>
15#include <xrpld/rpc/Role.h>
16#include <xrpld/rpc/detail/TransactionSign.h>
18#include <xrpl/basics/contract.h>
19#include <xrpl/beast/unit_test/suite.h>
20#include <xrpl/config/Constants.h>
21#include <xrpl/json/json_reader.h>
22#include <xrpl/json/json_value.h>
23#include <xrpl/json/to_string.h>
24#include <xrpl/protocol/ErrorCodes.h>
25#include <xrpl/protocol/KeyType.h>
26#include <xrpl/protocol/TxFlags.h>
27#include <xrpl/protocol/jss.h>
28#include <xrpl/server/LoadFeeTrack.h>
29#include <xrpl/server/NetworkOPs.h>
77 {
"Minimal payment, no Amount only DeliverMax",
80 "command": "dummy_command",
81 "secret": "masterpassphrase",
83 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
84 "DeliverMax": "1000000000",
85 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
86 "TransactionType": "Payment"
89 {{"",
"",
"Missing field 'account'.",
"Missing field 'tx_json.Sequence'."}}},
91 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
94 "command": "dummy_command",
95 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
96 "secret": "masterpassphrase",
99 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
100 "Amount": "1000000000",
101 "DeliverMax": "1000000000",
102 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
103 "TransactionType": "Payment"
106 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
108 {
"Pass in Sequence, no Amount only DeliverMax",
111 "command": "dummy_command",
112 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
113 "secret": "masterpassphrase",
116 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
117 "DeliverMax": "1000000000",
118 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
119 "TransactionType": "Payment"
122 {{"",
"",
"Missing field 'tx_json.Fee'.",
"Missing field 'tx_json.SigningPubKey'."}}},
124 {
"Pass in Sequence and Fee with minimal payment, both Amount and "
128 "command": "dummy_command",
129 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
130 "secret": "masterpassphrase",
134 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
135 "Amount": "1000000000",
136 "DeliverMax": "1000000000",
137 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
138 "TransactionType": "Payment"
143 "A Signer may not be the transaction's Account "
144 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
145 "Missing field 'tx_json.SigningPubKey'."}}},
147 {
"Add 'fee_mult_max' field.",
150 "command": "dummy_command",
151 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
152 "secret": "masterpassphrase",
156 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
157 "Amount": "1000000000",
158 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
159 "TransactionType": "Payment"
162 {{"",
"",
"Missing field 'tx_json.Fee'.",
"Missing field 'tx_json.SigningPubKey'."}}},
164 {
"Add 'fee_mult_max' and 'fee_div_max' field.",
167 "command": "dummy_command",
168 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
169 "secret": "masterpassphrase",
174 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
175 "Amount": "1000000000",
176 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
177 "TransactionType": "Payment"
180 {{"",
"",
"Missing field 'tx_json.Fee'.",
"Missing field 'tx_json.SigningPubKey'."}}},
182 {
"fee_mult_max is ignored if 'Fee' is present.",
185 "command": "dummy_command",
186 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
187 "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 {
"fee_div_max is ignored if 'Fee' is present.",
207 "command": "dummy_command",
208 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
209 "secret": "masterpassphrase",
215 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
216 "Amount": "1000000000",
217 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
218 "TransactionType": "Payment"
223 "A Signer may not be the transaction's Account "
224 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
225 "Missing field 'tx_json.SigningPubKey'."}}},
227 {
"Invalid 'fee_mult_max' field.",
230 "command": "dummy_command",
231 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
232 "secret": "masterpassphrase",
233 "fee_mult_max": "NotAFeeMultiplier",
236 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
237 "Amount": "1000000000",
238 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
239 "TransactionType": "Payment"
242 {{"Invalid field 'fee_mult_max', not a positive integer.",
243 "Invalid field 'fee_mult_max', not a positive integer.",
244 "Missing field 'tx_json.Fee'.",
245 "Missing field 'tx_json.SigningPubKey'."}}},
247 {
"Invalid 'fee_div_max' field.",
250 "command": "dummy_command",
251 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
252 "secret": "masterpassphrase",
254 "fee_div_max": "NotAFeeMultiplier",
257 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
258 "Amount": "1000000000",
259 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
260 "TransactionType": "Payment"
263 {{"Invalid field 'fee_div_max', not a positive integer.",
264 "Invalid field 'fee_div_max', not a positive integer.",
265 "Missing field 'tx_json.Fee'.",
266 "Missing field 'tx_json.SigningPubKey'."}}},
268 {
"Invalid value for 'fee_mult_max' field.",
271 "command": "dummy_command",
272 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
273 "secret": "masterpassphrase",
277 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
278 "Amount": "1000000000",
279 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
280 "TransactionType": "Payment"
283 {{"Fee of 10 exceeds the requested tx limit of 0",
284 "Fee of 10 exceeds the requested tx limit of 0",
285 "Missing field 'tx_json.Fee'.",
286 "Missing field 'tx_json.SigningPubKey'."}}},
288 {
"Invalid value for 'fee_div_max' field.",
291 "command": "dummy_command",
292 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
293 "secret": "masterpassphrase",
298 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
299 "Amount": "1000000000",
300 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
301 "TransactionType": "Payment"
304 {{"Fee of 10 exceeds the requested tx limit of 5",
305 "Fee of 10 exceeds the requested tx limit of 5",
306 "Missing field 'tx_json.Fee'.",
307 "Missing field 'tx_json.SigningPubKey'."}}},
309 {
"Invalid zero value for 'fee_div_max' field.",
312 "command": "dummy_command",
313 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
314 "secret": "masterpassphrase",
319 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
320 "Amount": "1000000000",
321 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
322 "TransactionType": "Payment"
325 {{"Invalid field 'fee_div_max', not a positive integer.",
326 "Invalid field 'fee_div_max', not a positive integer.",
327 "Missing field 'tx_json.Fee'.",
328 "Missing field 'tx_json.SigningPubKey'."}}},
330 {
"Missing 'Amount'.",
333 "command": "dummy_command",
334 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
335 "secret": "masterpassphrase",
337 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
338 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
339 "TransactionType": "Payment"
342 {{"Missing field 'tx_json.Amount'.",
343 "Missing field 'tx_json.Amount'.",
344 "Missing field 'tx_json.Sequence'.",
345 "Missing field 'tx_json.Sequence'."}}},
347 {
"Invalid 'Amount'.",
350 "command": "dummy_command",
351 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
352 "secret": "masterpassphrase",
354 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
355 "Amount": "NotAnAmount",
356 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
357 "TransactionType": "Payment"
360 {{"Invalid field 'tx_json.Amount'.",
361 "Invalid field 'tx_json.Amount'.",
362 "Missing field 'tx_json.Sequence'.",
363 "Missing field 'tx_json.Sequence'."}}},
365 {
"Missing 'Destination'.",
368 "command": "dummy_command",
369 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
370 "secret": "masterpassphrase",
372 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
373 "Amount": "1000000000",
374 "TransactionType": "Payment"
377 {{"Missing field 'tx_json.Destination'.",
378 "Missing field 'tx_json.Destination'.",
379 "Missing field 'tx_json.Sequence'.",
380 "Missing field 'tx_json.Sequence'."}}},
382 {
"Invalid 'Destination'.",
385 "command": "dummy_command",
386 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
387 "secret": "masterpassphrase",
389 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
390 "Amount": "1000000000",
391 "Destination": "NotADestination",
392 "TransactionType": "Payment"
395 {{"Invalid field 'tx_json.Destination'.",
396 "Invalid field 'tx_json.Destination'.",
397 "Missing field 'tx_json.Sequence'.",
398 "Missing field 'tx_json.Sequence'."}}},
400 {
"Cannot create XRP to XRP paths.",
403 "command": "dummy_command",
404 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
405 "secret": "masterpassphrase",
408 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
409 "Amount": "1000000000",
410 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
411 "TransactionType": "Payment"
414 {{"Cannot build XRP to XRP paths.",
415 "Cannot build XRP to XRP paths.",
416 "Missing field 'tx_json.Sequence'.",
417 "Missing field 'tx_json.Sequence'."}}},
419 {
"Successful 'build_path'.",
422 "command": "dummy_command",
423 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
424 "secret": "masterpassphrase",
427 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
431 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
433 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
434 "TransactionType": "Payment"
437 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
439 {
"Not valid to include both 'Paths' and 'build_path'.",
442 "command": "dummy_command",
443 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
444 "secret": "masterpassphrase",
447 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
451 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
453 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
455 "TransactionType": "Payment"
458 {{"Cannot specify both 'tx_json.Paths' and 'build_path'",
459 "Cannot specify both 'tx_json.Paths' and 'build_path'",
460 "Missing field 'tx_json.Sequence'.",
461 "Missing field 'tx_json.Sequence'."}}},
463 {
"Successful 'SendMax'.",
466 "command": "dummy_command",
467 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
468 "secret": "masterpassphrase",
471 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
475 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
480 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
482 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
483 "TransactionType": "Payment"
486 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
488 {
"'Amount' may not be XRP for pathfinding, but 'SendMax' may be XRP.",
491 "command": "dummy_command",
492 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
493 "secret": "masterpassphrase",
496 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
500 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
503 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
504 "TransactionType": "Payment"
507 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
509 {
"'secret' must be present.",
512 "command": "dummy_command",
513 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
515 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
516 "Amount": "1000000000",
517 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
518 "TransactionType": "Payment"
521 {{"Missing field 'secret'.",
522 "Missing field 'secret'.",
523 "Missing field 'tx_json.Sequence'.",
524 "Missing field 'tx_json.Sequence'."}}},
526 {
"'secret' must be non-empty.",
529 "command": "dummy_command",
530 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
533 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
534 "Amount": "1000000000",
535 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
536 "TransactionType": "Payment"
539 {{"Invalid field 'secret'.",
540 "Invalid field 'secret'.",
541 "Missing field 'tx_json.Sequence'.",
542 "Missing field 'tx_json.Sequence'."}}},
544 {
"Use 'seed' instead of 'secret'.",
547 "command": "dummy_command",
548 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
549 "key_type": "ed25519",
550 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
552 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
553 "Amount": "1000000000",
554 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
555 "TransactionType": "Payment"
558 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
560 {
"Malformed 'seed'.",
563 "command": "dummy_command",
564 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
565 "key_type": "ed25519",
566 "seed": "not a seed",
568 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
569 "Amount": "1000000000",
570 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
571 "TransactionType": "Payment"
574 {{"Disallowed seed.",
576 "Missing field 'tx_json.Sequence'.",
577 "Missing field 'tx_json.Sequence'."}}},
579 {
"'tx_json' must be present.",
582 "command": "dummy_command",
583 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
584 "secret": "masterpassphrase",
586 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
587 "Amount": "1000000000",
588 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
589 "TransactionType": "Payment"
592 {{"Missing field 'tx_json'.",
593 "Missing field 'tx_json'.",
594 "Missing field 'tx_json'.",
595 "Missing field 'tx_json'."}}},
597 {
"'TransactionType' must be present.",
600 "command": "dummy_command",
601 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
602 "secret": "masterpassphrase",
604 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
605 "Amount": "1000000000",
606 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
609 {{"Missing field 'tx_json.TransactionType'.",
610 "Missing field 'tx_json.TransactionType'.",
611 "Missing field 'tx_json.Sequence'.",
612 "Missing field 'tx_json.Sequence'."}}},
614 {
"The 'TransactionType' must be a pre-established transaction type.",
617 "command": "dummy_command",
618 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
619 "secret": "masterpassphrase",
621 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
622 "Amount": "1000000000",
623 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
624 "TransactionType": "tt"
627 {{"Field 'tx_json.TransactionType' has invalid data.",
628 "Field 'tx_json.TransactionType' has invalid data.",
629 "Missing field 'tx_json.Sequence'.",
630 "Missing field 'tx_json.Sequence'."}}},
632 {
"The 'TransactionType' may be represented with an integer.",
635 "command": "dummy_command",
636 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
637 "secret": "masterpassphrase",
639 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
640 "Amount": "1000000000",
641 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
645 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
647 {
"'Account' must be present.",
650 "command": "dummy_command",
651 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
652 "secret": "masterpassphrase",
654 "Amount": "1000000000",
655 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
656 "TransactionType": "Payment"
659 {{"Missing field 'tx_json.Account'.",
660 "Missing field 'tx_json.Account'.",
661 "Missing field 'tx_json.Sequence'.",
662 "Missing field 'tx_json.Sequence'."}}},
664 {
"'Account' must be well formed.",
667 "command": "dummy_command",
668 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
669 "secret": "masterpassphrase",
671 "Account": "NotAnAccount",
672 "Amount": "1000000000",
673 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
674 "TransactionType": "Payment"
677 {{"Invalid field 'tx_json.Account'.",
678 "Invalid field 'tx_json.Account'.",
679 "Missing field 'tx_json.Sequence'.",
680 "Missing field 'tx_json.Sequence'."}}},
682 {
"The 'offline' tag may be added to the transaction.",
685 "command": "dummy_command",
686 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
687 "secret": "masterpassphrase",
690 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
691 "Amount": "1000000000",
692 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
693 "TransactionType": "Payment"
696 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
698 {
"If 'offline' is true then a 'Sequence' field must be supplied.",
701 "command": "dummy_command",
702 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
703 "secret": "masterpassphrase",
707 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
708 "Amount": "1000000000",
709 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
710 "TransactionType": "Payment"
713 {{"Missing field 'tx_json.Sequence'.",
714 "Missing field 'tx_json.Sequence'.",
715 "Missing field 'tx_json.Sequence'.",
716 "Missing field 'tx_json.Sequence'."}}},
718 {
"If 'offline' is true then a 'Fee' field must be supplied.",
721 "command": "dummy_command",
722 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
723 "secret": "masterpassphrase",
727 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
728 "Amount": "1000000000",
729 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
730 "TransactionType": "Payment"
733 {{"Missing field 'tx_json.Fee'.",
734 "Missing field 'tx_json.Fee'.",
735 "Missing field 'tx_json.Fee'.",
736 "Missing field 'tx_json.SigningPubKey'."}}},
738 {
"Valid transaction if 'offline' is true.",
741 "command": "dummy_command",
742 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
743 "secret": "masterpassphrase",
748 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
749 "Amount": "1000000000",
750 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
751 "TransactionType": "Payment"
756 "A Signer may not be the transaction's Account "
757 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
758 "Missing field 'tx_json.SigningPubKey'."}}},
760 {
"'offline' and 'build_path' are mutually exclusive.",
763 "command": "dummy_command",
764 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
765 "secret": "masterpassphrase",
771 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
772 "Amount": "1000000000",
773 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
774 "TransactionType": "Payment"
777 {{"Field 'build_path' not allowed in this context.",
778 "Field 'build_path' not allowed in this context.",
779 "Field 'build_path' not allowed in this context.",
780 "Missing field 'tx_json.SigningPubKey'."}}},
782 {
"A 'Flags' field may be specified.",
785 "command": "dummy_command",
786 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
787 "secret": "masterpassphrase",
790 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
791 "Amount": "1000000000",
792 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
793 "TransactionType": "Payment"
796 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
798 {
"The 'Flags' field must be numeric.",
801 "command": "dummy_command",
802 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
803 "secret": "masterpassphrase",
805 "Flags": "NotGoodFlags",
806 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
807 "Amount": "1000000000",
808 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
809 "TransactionType": "Payment"
812 {{"Field 'tx_json.Flags' has invalid data.",
813 "Field 'tx_json.Flags' has invalid data.",
814 "Missing field 'tx_json.Sequence'.",
815 "Missing field 'tx_json.Sequence'."}}},
817 {
"It's okay to add a 'debug_signing' field.",
820 "command": "dummy_command",
821 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
822 "secret": "masterpassphrase",
825 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
826 "Amount": "1000000000",
827 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
828 "TransactionType": "Payment"
831 {{"",
"",
"Missing field 'tx_json.Sequence'.",
"Missing field 'tx_json.Sequence'."}}},
833 {
"Single-sign a multisigned transaction.",
836 "command": "dummy_command",
837 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
840 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
841 "Amount" : "1000000000",
842 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
848 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
849 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
850 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
854 "SigningPubKey" : "",
855 "TransactionType" : "Payment"
858 {{"Already multisigned.",
"Already multisigned.",
"Secret does not match account.",
""}}},
860 {
"Minimal sign_for.",
863 "command": "dummy_command",
864 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
865 "secret": "masterpassphrase",
867 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
868 "Amount": "1000000000",
869 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
873 "TransactionType": "Payment"
876 {{"Secret does not match account.",
877 "Secret does not match account.",
879 "Missing field 'tx_json.Signers'."}}},
881 {
"Minimal offline sign_for.",
884 "command": "dummy_command",
885 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
886 "secret": "masterpassphrase",
889 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
890 "Amount": "1000000000",
891 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
895 "TransactionType": "Payment"
898 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
900 {
"Offline sign_for using 'seed' instead of 'secret'.",
903 "command": "dummy_command",
904 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
905 "key_type": "ed25519",
906 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
909 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
910 "Amount": "1000000000",
911 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
915 "TransactionType": "Payment"
918 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
920 {
"Malformed seed in sign_for.",
923 "command": "dummy_command",
924 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
925 "key_type": "ed25519",
926 "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd",
929 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
930 "Amount": "1000000000",
931 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
935 "TransactionType": "Payment"
938 {{"Disallowed seed.",
941 "Missing field 'tx_json.Signers'."}}},
943 {
"Missing 'Account' in sign_for.",
946 "command": "dummy_command",
947 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
948 "secret": "masterpassphrase",
950 "Amount": "1000000000",
951 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
955 "TransactionType": "Payment"
958 {{"Missing field 'tx_json.Account'.",
959 "Missing field 'tx_json.Account'.",
960 "Missing field 'tx_json.Account'.",
961 "Missing field 'tx_json.Account'."}}},
963 {
"Missing 'Amount' in sign_for.",
966 "command": "dummy_command",
967 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
968 "secret": "masterpassphrase",
970 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
971 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
975 "TransactionType": "Payment"
978 {{"Missing field 'tx_json.Amount'.",
979 "Missing field 'tx_json.Amount'.",
980 "Missing field 'tx_json.Amount'.",
981 "Missing field 'tx_json.Amount'."}}},
983 {
"Missing 'Destination' in sign_for.",
986 "command": "dummy_command",
987 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
988 "secret": "masterpassphrase",
990 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
991 "Amount": "1000000000",
995 "TransactionType": "Payment"
998 {{"Missing field 'tx_json.Destination'.",
999 "Missing field 'tx_json.Destination'.",
1000 "Missing field 'tx_json.Destination'.",
1001 "Missing field 'tx_json.Destination'."}}},
1003 {
"Missing 'Destination' in sign_for, use DeliverMax",
1006 "command": "dummy_command",
1007 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1008 "secret": "masterpassphrase",
1010 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1011 "DeliverMax": "1000000000",
1014 "SigningPubKey": "",
1015 "TransactionType": "Payment"
1018 {{"Missing field 'tx_json.Destination'.",
1019 "Missing field 'tx_json.Destination'.",
1020 "Missing field 'tx_json.Destination'.",
1021 "Missing field 'tx_json.Destination'."}}},
1023 {
"Missing 'Fee' in sign_for.",
1026 "command": "dummy_command",
1027 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1028 "secret": "masterpassphrase",
1030 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1031 "Amount": "1000000000",
1032 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1034 "SigningPubKey": "",
1035 "TransactionType": "Payment"
1038 {{"Secret does not match account.",
1039 "Secret does not match account.",
1040 "Missing field 'tx_json.Fee'.",
1041 "Missing field 'tx_json.Fee'."}}},
1043 {
"Missing 'Sequence' in sign_for.",
1046 "command": "dummy_command",
1047 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1048 "secret": "masterpassphrase",
1050 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1051 "Amount": "1000000000",
1052 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1054 "SigningPubKey": "",
1055 "TransactionType": "Payment"
1058 {{"Secret does not match account.",
1059 "Secret does not match account.",
1060 "Missing field 'tx_json.Sequence'.",
1061 "Missing field 'tx_json.Sequence'."}}},
1063 {
"Missing 'SigningPubKey' in sign_for is automatically filled in.",
1066 "command": "dummy_command",
1067 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1068 "secret": "masterpassphrase",
1070 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1071 "Amount": "1000000000",
1072 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1075 "TransactionType": "Payment"
1078 {{"Secret does not match account.",
1079 "Secret does not match account.",
1081 "Missing field 'tx_json.SigningPubKey'."}}},
1083 {
"In sign_for, an account may not sign for itself.",
1086 "command": "dummy_command",
1087 "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1090 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1091 "Amount": "1000000000",
1092 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1095 "TransactionType": "Payment"
1100 "A Signer may not be the transaction's Account "
1101 "(rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA).",
1102 "Missing field 'tx_json.SigningPubKey'."}}},
1104 {
"Cannot put duplicate accounts in Signers array",
1107 "command": "dummy_command",
1108 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1109 "secret": "masterpassphrase",
1111 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1112 "Amount" : "1000000000",
1113 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1119 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1120 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1121 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1125 "SigningPubKey" : "",
1126 "TransactionType" : "Payment"
1129 {{"Already multisigned.",
1130 "Already multisigned.",
1131 "Duplicate Signers:Signer:Account entries "
1132 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh) are not allowed.",
1135 {
"Correctly append to pre-established Signers array",
1138 "command": "dummy_command",
1139 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1142 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1143 "Amount" : "1000000000",
1144 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1150 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1151 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1152 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1156 "SigningPubKey" : "",
1157 "TransactionType" : "Payment"
1160 {{"Already multisigned.",
"Already multisigned.",
"",
""}}},
1162 {
"Append to pre-established Signers array with bad signature",
1165 "command": "dummy_command",
1166 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1169 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1170 "Amount" : "1000000000",
1171 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1177 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1178 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1179 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ACB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1183 "SigningPubKey" : "",
1184 "TransactionType" : "Payment"
1187 {{"Already multisigned.",
1188 "Already multisigned.",
1189 "Invalid signature.",
1190 "Invalid signature."}}},
1192 {
"Non-empty 'SigningPubKey' in sign_for.",
1195 "command": "dummy_command",
1196 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1197 "secret": "masterpassphrase",
1199 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1200 "Amount": "1000000000",
1201 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1204 "SigningPubKey": "1",
1205 "TransactionType": "Payment"
1208 {{"Secret does not match account.",
1209 "Secret does not match account.",
1210 "When multi-signing 'tx_json.SigningPubKey' must be empty.",
1211 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1213 {
"Missing 'TransactionType' in sign_for.",
1216 "command": "dummy_command",
1217 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1218 "secret": "masterpassphrase",
1220 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1221 "Amount": "1000000000",
1222 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1225 "SigningPubKey": "",
1228 {{"Missing field 'tx_json.TransactionType'.",
1229 "Missing field 'tx_json.TransactionType'.",
1230 "Missing field 'tx_json.TransactionType'.",
1231 "Missing field 'tx_json.TransactionType'."}}},
1233 {
"TxnSignature in sign_for.",
1236 "command": "dummy_command",
1237 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1240 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1241 "Amount" : "1000000000",
1242 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1248 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1249 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1250 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1254 "SigningPubKey" : "",
1255 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998",
1256 "TransactionType" : "Payment"
1259 {{"Already multisigned.",
1260 "Already multisigned.",
1261 "Already single-signed.",
1262 "Signing of transaction is malformed."}}},
1264 {
"Invalid field 'tx_json': string instead of object",
1267 "command": "dummy_command",
1268 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1269 "secret": "masterpassphrase",
1272 {{"Invalid field 'tx_json', not object.",
1273 "Invalid field 'tx_json', not object.",
1274 "Invalid field 'tx_json', not object.",
1275 "Invalid field 'tx_json', not object."}}},
1277 {
"Invalid field 'tx_json': integer instead of object",
1280 "command": "dummy_command",
1281 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1282 "secret": "masterpassphrase",
1285 {{"Invalid field 'tx_json', not object.",
1286 "Invalid field 'tx_json', not object.",
1287 "Invalid field 'tx_json', not object.",
1288 "Invalid field 'tx_json', not object."}}},
1290 {
"Invalid field 'tx_json': array instead of object",
1293 "command": "dummy_command",
1294 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1295 "secret": "masterpassphrase",
1296 "tx_json": [ "hello", "world" ]
1298 {{"Invalid field 'tx_json', not object.",
1299 "Invalid field 'tx_json', not object.",
1300 "Invalid field 'tx_json', not object.",
1301 "Invalid field 'tx_json', not object."}}},
1303 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
1306 "command": "dummy_command",
1307 "account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1308 "secret": "ssgN6zTvtM1q9XV8DvJpWm8LBYWiY",
1311 "Account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy",
1312 "Amount": "1000000000",
1313 "DeliverMax": "1000000000",
1314 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1315 "TransactionType": "Payment"
1318 {{"Source account not found.",
1319 "Source account not found.",
1320 "Missing field 'tx_json.Sequence'.",
1321 "Missing field 'tx_json.Sequence'."}}},
1323 {
"Minimal submit_multisigned.",
1326 "command": "submit_multisigned",
1328 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1329 "Amount": "1000000000",
1330 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1336 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1337 "SigningPubKey" : "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1338 "TxnSignature" : "3045022100909D01399AFFAD1E30D250CE61F93975B7F61E47B5244D78C3E86D9806535D95022012E389E0ACB016334052B7FE07FA6CEFDC8BE82CB410FA841D5049641C89DC8F"
1342 "SigningPubKey": "",
1343 "TransactionType": "Payment"
1346 {{"Missing field 'secret'.",
"Missing field 'secret'.",
"Missing field 'account'.",
""}}},
1348 {
"Minimal submit_multisigned with bad signature.",
1351 "command": "submit_multisigned",
1353 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1354 "Amount": "1000000000",
1355 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1361 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1362 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1363 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1367 "SigningPubKey": "",
1368 "TransactionType": "Payment"
1371 {{"Missing field 'secret'.",
1372 "Missing field 'secret'.",
1373 "Missing field 'account'.",
1374 "Invalid signature."}}},
1376 {
"Missing tx_json in submit_multisigned.",
1379 "command": "submit_multisigned",
1383 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1384 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1385 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1390 {{"Missing field 'secret'.",
1391 "Missing field 'secret'.",
1392 "Missing field 'account'.",
1393 "Missing field 'tx_json'."}}},
1395 {
"Missing sequence in submit_multisigned.",
1398 "command": "submit_multisigned",
1400 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1401 "Amount": "1000000000",
1402 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1407 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1408 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1409 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1413 "SigningPubKey": "",
1414 "TransactionType": "Payment"
1417 {{"Missing field 'secret'.",
1418 "Missing field 'secret'.",
1419 "Missing field 'account'.",
1420 "Missing field 'tx_json.Sequence'."}}},
1422 {
"Missing SigningPubKey in submit_multisigned.",
1425 "command": "submit_multisigned",
1427 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1428 "Amount": "1000000000",
1429 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1434 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1435 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1436 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1441 "TransactionType": "Payment"
1444 {{"Missing field 'secret'.",
1445 "Missing field 'secret'.",
1446 "Missing field 'account'.",
1447 "Missing field 'tx_json.SigningPubKey'."}}},
1449 {
"Non-empty SigningPubKey in submit_multisigned.",
1452 "command": "submit_multisigned",
1454 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1455 "Amount": "1000000000",
1456 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1462 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1463 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1464 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1468 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1469 "TransactionType": "Payment"
1472 {{"Missing field 'secret'.",
1473 "Missing field 'secret'.",
1474 "Missing field 'account'.",
1475 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1477 {
"Missing TransactionType in submit_multisigned.",
1480 "command": "submit_multisigned",
1482 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1483 "Amount": "1000000000",
1484 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1489 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1490 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1491 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1496 "SigningPubKey": "",
1499 {{"Missing field 'secret'.",
1500 "Missing field 'secret'.",
1501 "Missing field 'account'.",
1502 "Missing field 'tx_json.TransactionType'."}}},
1504 {
"Missing Account in submit_multisigned.",
1507 "command": "submit_multisigned",
1509 "Amount": "1000000000",
1510 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1516 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1517 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1518 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1522 "SigningPubKey": "",
1523 "TransactionType": "Payment"
1526 {{"Missing field 'secret'.",
1527 "Missing field 'secret'.",
1528 "Missing field 'account'.",
1529 "Missing field 'tx_json.Account'."}}},
1531 {
"Malformed Account in submit_multisigned.",
1534 "command": "submit_multisigned",
1536 "Account": "NotAnAccount",
1537 "Amount": "1000000000",
1538 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1544 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1545 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1546 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1550 "SigningPubKey": "",
1551 "TransactionType": "Payment"
1554 {{"Missing field 'secret'.",
1555 "Missing field 'secret'.",
1556 "Missing field 'account'.",
1557 "Invalid field 'tx_json.Account'."}}},
1559 {
"Account not in ledger in submit_multisigned.",
1562 "command": "submit_multisigned",
1564 "Account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
1565 "Amount": "1000000000",
1566 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1572 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1573 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1574 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1578 "SigningPubKey": "",
1579 "TransactionType": "Payment"
1582 {{"Missing field 'secret'.",
1583 "Missing field 'secret'.",
1584 "Missing field 'account'.",
1585 "Source account not found."}}},
1587 {
"Missing Fee in submit_multisigned.",
1590 "command": "submit_multisigned",
1592 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1593 "Amount": "1000000000",
1594 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1599 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1600 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1601 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1605 "SigningPubKey": "",
1606 "TransactionType": "Payment"
1609 {{"Missing field 'secret'.",
1610 "Missing field 'secret'.",
1611 "Missing field 'account'.",
1612 "Missing field 'tx_json.Fee'."}}},
1614 {
"Non-numeric Fee in submit_multisigned.",
1617 "command": "submit_multisigned",
1619 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1620 "Amount": "1000000000",
1621 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1627 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1628 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1629 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1633 "SigningPubKey": "",
1634 "TransactionType": "Payment"
1637 {{"Missing field 'secret'.",
1638 "Missing field 'secret'.",
1639 "Missing field 'account'.",
1640 "Field 'tx_json.Fee' has invalid data."}}},
1642 {
"Missing Amount in submit_multisigned Payment.",
1645 "command": "submit_multisigned",
1647 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1648 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1654 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1655 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1656 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1660 "SigningPubKey": "",
1661 "TransactionType": "Payment"
1664 {{"Missing field 'secret'.",
1665 "Missing field 'secret'.",
1666 "Missing field 'account'.",
1667 "Missing field 'tx_json.Amount'."}}},
1669 {
"Invalid Amount in submit_multisigned Payment.",
1672 "command": "submit_multisigned",
1674 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1675 "Amount": "NotANumber",
1676 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1682 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1683 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1684 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1688 "SigningPubKey": "",
1689 "TransactionType": "Payment"
1692 {{"Missing field 'secret'.",
1693 "Missing field 'secret'.",
1694 "Missing field 'account'.",
1695 "Invalid field 'tx_json.Amount'."}}},
1697 {
"Invalid DeliverMax in submit_multisigned Payment.",
1700 "command": "submit_multisigned",
1702 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1703 "DeliverMax": "NotANumber",
1704 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1710 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1711 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1712 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1716 "SigningPubKey": "",
1717 "TransactionType": "Payment"
1720 {{"Missing field 'secret'.",
1721 "Missing field 'secret'.",
1722 "Missing field 'account'.",
1723 "Invalid field 'tx_json.Amount'."}}},
1725 {
"No build_path in submit_multisigned.",
1728 "command": "submit_multisigned",
1731 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1732 "Amount": "1000000000",
1733 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1739 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1740 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1741 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1745 "SigningPubKey": "",
1746 "TransactionType": "Payment"
1749 {{"Missing field 'secret'.",
1750 "Missing field 'secret'.",
1751 "Missing field 'account'.",
1752 "Field 'build_path' not allowed in this context."}}},
1754 {
"Missing Destination in submit_multisigned Payment.",
1757 "command": "submit_multisigned",
1759 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1760 "Amount": "1000000000",
1766 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1767 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1768 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1772 "SigningPubKey": "",
1773 "TransactionType": "Payment"
1776 {{"Missing field 'secret'.",
1777 "Missing field 'secret'.",
1778 "Missing field 'account'.",
1779 "Missing field 'tx_json.Destination'."}}},
1781 {
"Malformed Destination in submit_multisigned Payment.",
1784 "command": "submit_multisigned",
1786 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1787 "Amount": "1000000000",
1788 "Destination": "NotADestination",
1794 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1795 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1796 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1800 "SigningPubKey": "",
1801 "TransactionType": "Payment"
1804 {{"Missing field 'secret'.",
1805 "Missing field 'secret'.",
1806 "Missing field 'account'.",
1807 "Invalid field 'tx_json.Destination'."}}},
1809 {
"Missing Signers field in submit_multisigned.",
1812 "command": "submit_multisigned",
1814 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1815 "Amount": "1000000000",
1816 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1819 "SigningPubKey": "",
1820 "TransactionType": "Payment"
1823 {{"Missing field 'secret'.",
1824 "Missing field 'secret'.",
1825 "Missing field 'account'.",
1826 "Missing field 'tx_json.Signers'."}}},
1828 {
"Signers not an array in submit_multisigned.",
1831 "command": "submit_multisigned",
1833 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1834 "Amount": "1000000000",
1835 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1839 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1840 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1841 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1843 "SigningPubKey": "",
1844 "TransactionType": "Payment"
1847 {{"Missing field 'secret'.",
1848 "Missing field 'secret'.",
1849 "Missing field 'account'.",
1850 "Field 'tx_json.Signers' is not a JSON array."}}},
1852 {
"Empty Signers array in submit_multisigned.",
1855 "command": "submit_multisigned",
1857 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1858 "Amount": "1000000000",
1859 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1864 "SigningPubKey": "",
1865 "TransactionType": "Payment"
1868 {{"Missing field 'secret'.",
1869 "Missing field 'secret'.",
1870 "Missing field 'account'.",
1871 "tx_json.Signers array may not be empty."}}},
1873 {
"Duplicate Signer in submit_multisigned.",
1876 "command": "submit_multisigned",
1878 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1879 "Amount": "1000000000",
1880 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1886 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1887 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1888 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1893 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1894 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1895 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1899 "SigningPubKey": "",
1900 "TransactionType": "Payment"
1903 {{"Missing field 'secret'.",
1904 "Missing field 'secret'.",
1905 "Missing field 'account'.",
1906 "Duplicate Signers:Signer:Account entries "
1907 "(rPcNzota6B8YBokhYtcTNqQVCngtbnWfux) are not allowed."}}},
1909 {
"Signer is tx_json Account in submit_multisigned.",
1912 "command": "submit_multisigned",
1914 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1915 "Amount": "1000000000",
1916 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1922 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1923 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1924 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1928 "SigningPubKey": "",
1929 "TransactionType": "Payment"
1932 {{"Missing field 'secret'.",
1933 "Missing field 'secret'.",
1934 "Missing field 'account'.",
1935 "A Signer may not be the transaction's Account "
1936 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)."}}},
1938 {
"Empty Signers array in submit_multisigned, use DeliverMax",
1941 "command": "submit_multisigned",
1943 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1944 "DeliverMax": "10000000",
1945 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1950 "SigningPubKey": "",
1951 "TransactionType": "Payment"
1954 {{"Missing field 'secret'.",
1955 "Missing field 'secret'.",
1956 "Missing field 'account'.",
1957 "tx_json.Signers array may not be empty."}}},
1959 {
"Empty Signers array in submit_multisigned, use DeliverMax and Amount",
1962 "command": "submit_multisigned",
1964 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1965 "Amount": "10000000",
1966 "DeliverMax": "10000000",
1967 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1972 "SigningPubKey": "",
1973 "TransactionType": "Payment"
1976 {{"Missing field 'secret'.",
1977 "Missing field 'secret'.",
1978 "Missing field 'account'.",
1979 "tx_json.Signers array may not be empty."}}},
1981 {
"Payment cannot specify different DeliverMax and Amount.",
1984 "command": "dummy_command",
1985 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1986 "secret": "masterpassphrase",
1989 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1990 "Amount": "1000000000",
1991 "DeliverMax": "1000000020",
1992 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1995 "SigningPubKey": "",
1996 "TransactionType": "Payment"
1999 {{"Cannot specify differing 'Amount' and 'DeliverMax'",
2000 "Cannot specify differing 'Amount' and 'DeliverMax'",
2001 "Cannot specify differing 'Amount' and 'DeliverMax'",
2002 "Cannot specify differing 'Amount' and 'DeliverMax'"}}},
2003 {
"Payment cannot specify bad DomainID.",
2006 "command": "dummy_command",
2007 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2008 "secret": "masterpassphrase",
2011 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2012 "Amount": "1000000000",
2013 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2016 "SigningPubKey": "",
2017 "TransactionType": "Payment",
2018 "DomainID": "invalid",
2021 {{"Unable to parse 'DomainID'.",
2022 "Unable to parse 'DomainID'.",
2023 "Unable to parse 'DomainID'.",
2024 "Unable to parse 'DomainID'."}}},
2026 {
"Minimal delegated transaction.",
2029 "command": "dummy_command",
2032 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2033 "Amount": "1000000000",
2034 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2035 "TransactionType": "Payment",
2036 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
2039 {{"",
"",
"Missing field 'account'.",
"Missing field 'tx_json.Sequence'."}}},
2041 {
"Delegate not well formed.",
2044 "command": "dummy_command",
2047 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2048 "Amount": "1000000000",
2049 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2050 "TransactionType": "Payment",
2051 "Delegate": "NotAnAccount"
2054 {{"Invalid field 'tx_json.Delegate'.",
2055 "Invalid field 'tx_json.Delegate'.",
2056 "Missing field 'account'.",
2057 "Missing field 'tx_json.Sequence'."}}},
2059 {
"Delegate not in ledger.",
2062 "command": "dummy_command",
2065 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2066 "Amount": "1000000000",
2067 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2068 "TransactionType": "Payment",
2069 "Delegate": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd"
2072 {{"Delegate account not found.",
2073 "Delegate account not found.",
2074 "Missing field 'account'.",
2075 "Missing field 'tx_json.Sequence'."}}},
2077 {
"Delegate and secret not match.",
2080 "command": "dummy_command",
2083 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2084 "Amount": "1000000000",
2085 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
2086 "TransactionType": "Payment",
2087 "Delegate": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
2090 {{"Secret does not match account.",
2091 "Secret does not match account.",
2092 "Missing field 'account'.",
2093 "Missing field 'tx_json.Sequence'."}}},
2105 json::Value const result{env.
rpc(
"bad_command", R
"({"MakingThisUp": 0})")};
2107 BEAST_EXPECT(result[jss::result][jss::error] == "unknownCmd");
2108 BEAST_EXPECT(result[jss::result][jss::request][jss::command] ==
"bad_command");
2120 auto ledger = env.current();
2121 auto const& feeTrack = env.app().getFeeTrack();
2125 env.fund(XRP(100000), alice);
2128 auto const batchFee = batch::calcBatchFee(env, 0, 2);
2129 auto const seq = env.seq(alice);
2130 auto jt = env.jtnofill(
2131 batch::outer(alice, env.seq(alice), batchFee, tfAllOrNothing),
2132 batch::Inner(pay(alice, bob, XRP(1)), seq + 1),
2133 batch::Inner(pay(alice, bob, XRP(2)), seq + 2),
2134 batch::Inner(pay(alice, bob, XRP(3)), seq + 3),
2135 batch::Inner(pay(alice, bob, XRP(4)), seq + 4),
2136 batch::Inner(pay(alice, bob, XRP(5)), seq + 5),
2137 batch::Inner(pay(alice, bob, XRP(6)), seq + 6),
2138 batch::Inner(pay(alice, bob, XRP(7)), seq + 7),
2139 batch::Inner(pay(alice, bob, XRP(8)), seq + 8),
2140 batch::Inner(pay(alice, bob, XRP(9)), seq + 9));
2142 jt.jv.removeMember(jss::Fee);
2143 jt.jv.removeMember(jss::TxnSignature);
2144 req[jss::tx_json] = jt.jv;
2153 BEAST_EXPECT(result.
size() == 0);
2155 req[jss::tx_json].isMember(jss::Fee) &&
2156 req[jss::tx_json][jss::Fee] == env.current()->fees().base.jsonClipped());
2162 auto ledger = env.current();
2163 auto const& feeTrack = env.app().getFeeTrack();
2167 env.fund(XRP(100000), alice, bob);
2170 auto jt = env.jtnofill(
2214 req[jss::tx_json] = jt.jv;
2223 BEAST_EXPECT(result.
size() == 0);
2225 req[jss::tx_json].isMember(jss::Fee) &&
2226 req[jss::tx_json][jss::Fee] == env.current()->fees().base.jsonClipped());
2235 auto const baseFee =
static_cast<int>(env.
current()->fees().base.drops());
2253 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == baseFee);
2259 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 2, "
2260 "\"tx_json\" : { } } ",
2273 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == baseFee);
2289 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2297 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 6, "
2298 "\"tx_json\" : { } } ",
2310 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2316 "{ \"fee_mult_max\" : 0, \"fee_div_max\" : 2, "
2317 "\"tx_json\" : { } } ",
2329 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2335 "{ \"fee_mult_max\" : 10, \"fee_div_max\" : 0, "
2336 "\"tx_json\" : { } } ",
2348 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2365 BEAST_EXPECT(result.
size() == 0);
2367 req[jss::tx_json].isMember(jss::Fee) &&
2368 req[jss::tx_json][jss::Fee] == env.
current()->fees().increment.jsonClipped());
2375 testcase(
"autofill escalated fees");
2383 LoadFeeTrack const& feeTrackOuter = env.app().getFeeTrack();
2390 "fee_mult_max" : 1000,
2404 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 10);
2426 BEAST_EXPECT(req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 10);
2430 for (
auto i = 0; i < 4; ++i)
2432 env(noop(env.master));
2440 "fee_mult_max" : 1000,
2455 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 8889);
2477 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2485 "fee_mult_max" : 1000,
2500 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2508 "fee_mult_max" : 8000,
2524 req[jss::tx_json].isMember(jss::Fee) && req[jss::tx_json][jss::Fee] == 8889);
2532 "fee_mult_max" : -5,
2574 "fee_mult_max" : -2,
2596 toSign[jss::tx_json] = noop(env.master);
2597 toSign[jss::secret] =
"masterpassphrase";
2598 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2599 auto result = rpcResult[jss::result];
2603 result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"10");
2605 result[jss::tx_json].isMember(jss::Sequence) &&
2614 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2617 env(noop(env.master));
2621 toSign[jss::tx_json] = noop(env.master);
2622 toSign[jss::secret] =
"masterpassphrase";
2623 toSign[jss::fee_mult_max] = 900;
2624 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2625 auto result = rpcResult[jss::result];
2629 result[jss::tx_json].isMember(jss::Fee) &&
2630 result[jss::tx_json][jss::Fee] ==
"7813");
2632 result[jss::tx_json].isMember(jss::Sequence) &&
2641 auto& feeTrack = env.app().getFeeTrack();
2642 BEAST_EXPECT(feeTrack.getLoadFactor() == 256);
2643 for (
int i = 0; i < 8; ++i)
2644 feeTrack.raiseLocalFee();
2645 BEAST_EXPECT(feeTrack.getLoadFactor() == 1220);
2649 toSign[jss::tx_json] = noop(env.master);
2650 toSign[jss::secret] =
"masterpassphrase";
2651 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2652 auto result = rpcResult[jss::result];
2656 result[jss::tx_json].isMember(jss::Fee) && result[jss::tx_json][jss::Fee] ==
"47");
2658 result[jss::tx_json].isMember(jss::Sequence) &&
2669 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2672 env(noop(env.master), Fee(47));
2675 EnvSs
const envs(env);
2678 toSign[jss::tx_json] = noop(env.master);
2679 toSign[jss::secret] =
"masterpassphrase";
2681 toSign[jss::fee_mult_max] = 700;
2682 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2683 auto result = rpcResult[jss::result];
2687 result[jss::tx_json].isMember(jss::Fee) &&
2688 result[jss::tx_json][jss::Fee] ==
"6806");
2690 result[jss::tx_json].isMember(jss::Sequence) &&
2701 cfg->networkId = 1025;
2707 toSign[jss::tx_json] = noop(env.master);
2709 BEAST_EXPECT(!toSign[jss::tx_json].isMember(jss::NetworkID));
2710 toSign[jss::secret] =
"masterpassphrase";
2711 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2712 auto result = rpcResult[jss::result];
2716 result[jss::tx_json].isMember(jss::NetworkID) &&
2717 result[jss::tx_json][jss::NetworkID] == 1025);
2732 using namespace std::chrono_literals;
2733 using namespace test::jtx;
2737 auto const usd = g[
"USD"];
2746 Env env(*
this,
envconfig([](std::unique_ptr<Config> cfg) {
2747 cfg->fees.referenceFee = 10;
2750 env.fund(
XRP(100000), a, ed, g);
2753 env(
trust(a, usd(1000)));
2754 env(
trust(env.master, usd(1000)));
2755 env(
pay(g, a, usd(50)));
2756 env(
pay(g, env.master, usd(50)));
2762 using signFunc = json::Value (*)(
2764 unsigned int apiVersion,
2767 std::chrono::seconds validatedLedgerAge,
2770 using submitFunc = json::Value (*)(
2772 unsigned int apiVersion,
2775 std::chrono::seconds validatedLedgerAge,
2779 using TestStuff = std::tuple<signFunc, submitFunc, char const*, unsigned int>;
2781 static TestStuff
const kTestFuncs[] = {
2787 for (
auto testFunc : kTestFuncs)
2793 json::Reader().parse(txnTest.json, req);
2797 static Role const kTestedRoles[] = {
2800 for (
Role const testRole : kTestedRoles)
2803 auto const signFn =
get<0>(testFunc);
2804 if (signFn !=
nullptr)
2806 assert(
get<1>(testFunc) ==
nullptr);
2811 auto const submitFn =
get<1>(testFunc);
2812 assert(submitFn !=
nullptr);
2819 errStr = result[
"error_message"].
asString();
2821 if (errStr == txnTest.expMsg[
get<3>(testFunc)])
2828 description << txnTest.description <<
" Called " <<
get<2>(testFunc)
2829 <<
"(). Got \'" << errStr <<
"\'";
2830 fail(description.
str(), __FILE__, txnTest.line);
void pass()
Record a successful test condition.
void fail(String const &reason, char const *file, int line)
Record a failure.
TestcaseT testcase
Memberspace for declaring test cases.
Unserialize a JSON document into a Value.
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
UInt size() const
Number of values in array or object.
std::string asString() const
Returns the unquoted string value.
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.
JSON (JavaScript Object Notation).
@ UInt
unsigned integer value
API version numbers used in later API versions.
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::ValueType::Object.
json::Value transactionSign(json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a json::ValueType::Object.
std::function< void( std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, NetworkOPs::FailHard failType)> ProcessTransactionFn
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::ValueType::Object.
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::ValueType::Object.
static constexpr TxnTestData kTxnTestArray[]
BEAST_DEFINE_TESTSUITE(AccountLines, rpc, xrpl)
bool containsError(json::Value const &json)
Returns true if the json contains an rpc error specification.
json::Value pay(AccountID const &account, AccountID const &to, AnyAmount amount)
Create a payment.
XrpT const XRP
Converts to XRP Issue or STAmount.
json::Value acctdelete(Account const &account, Account const &dest)
Delete account.
std::unique_ptr< Config > envconfig()
creates and initializes a default configuration for jtx::Env
json::Value trust(Account const &account, STAmount const &amount, std::uint32_t flags)
Modify a trust line.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
T get(Section const §ion, std::string const &name, T const &defaultValue=T{})
Retrieve a key/value pair from a section.
std::string to_string(BaseUInt< Bits, Tag > const &a)
Role
Indicates the level of administrative permission to grant.
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)
static constexpr auto kMinimumTxnInLedgerStandalone
TxnTestData(TxnTestData const &)=delete
TxnTestData(TxnTestData &&)=delete
char const *const description
TxnTestData & operator=(TxnTestData &&)=delete
constexpr TxnTestData(char const *description, int line, char const *json, std::array< char const *const, 4 > const &expMsg)
TxnTestData & operator=(TxnTestData const &)=delete
std::array< char const *const, 4 > const expMsg
static constexpr auto kSigningSupport
static constexpr auto kTransactionQueue