Electroneum
wallet_rpc_server_commands_defs.h
Go to the documentation of this file.
1 // Copyrights(c) 2017-2018, The Electroneum Project
2 // Copyrights(c) 2014-2017, The Monero Project
3 //
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without modification, are
7 // permitted provided that the following conditions are met:
8 //
9 // 1. Redistributions of source code must retain the above copyright notice, this list of
10 // conditions and the following disclaimer.
11 //
12 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
13 // of conditions and the following disclaimer in the documentation and/or other
14 // materials provided with the distribution.
15 //
16 // 3. Neither the name of the copyright holder nor the names of its contributors may be
17 // used to endorse or promote products derived from this software without specific
18 // prior written permission.
19 //
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
21 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
28 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
31 
32 #pragma once
35 #include "crypto/hash.h"
37 
38 #undef ELECTRONEUM_DEFAULT_LOG_CATEGORY
39 #define ELECTRONEUM_DEFAULT_LOG_CATEGORY "wallet.rpc"
40 
41 namespace tools
42 {
43 namespace wallet_rpc
44 {
45 #define WALLET_RPC_STATUS_OK "OK"
46 #define WALLET_RPC_STATUS_BUSY "BUSY"
47 
49  {
50  struct request
51  {
52  BEGIN_KV_SERIALIZE_MAP()
53  END_KV_SERIALIZE_MAP()
54  };
55 
56  struct response
57  {
58  uint64_t balance;
59  uint64_t unlocked_balance;
60 
61  BEGIN_KV_SERIALIZE_MAP()
62  KV_SERIALIZE(balance)
63  KV_SERIALIZE(unlocked_balance)
64  END_KV_SERIALIZE_MAP()
65  };
66  };
67 
69  {
70  struct request
71  {
72  BEGIN_KV_SERIALIZE_MAP()
73  END_KV_SERIALIZE_MAP()
74  };
75 
76  struct response
77  {
78  std::string address;
79 
80  BEGIN_KV_SERIALIZE_MAP()
81  KV_SERIALIZE(address)
82  END_KV_SERIALIZE_MAP()
83  };
84  };
85 
87  {
88  struct request
89  {
90  BEGIN_KV_SERIALIZE_MAP()
91  END_KV_SERIALIZE_MAP()
92  };
93 
94  struct response
95  {
96  uint64_t height;
97  BEGIN_KV_SERIALIZE_MAP()
98  KV_SERIALIZE(height)
99  END_KV_SERIALIZE_MAP()
100  };
101  };
102 
104  {
105  uint64_t amount;
106  std::string address;
107  BEGIN_KV_SERIALIZE_MAP()
108  KV_SERIALIZE(amount)
109  KV_SERIALIZE(address)
110  END_KV_SERIALIZE_MAP()
111  };
112 
114  {
115  struct request
116  {
117  std::list<transfer_destination> destinations;
118  uint32_t priority;
119  uint64_t mixin;
120  uint64_t unlock_time;
121  std::string payment_id;
125 
126  BEGIN_KV_SERIALIZE_MAP()
127  KV_SERIALIZE(destinations)
128  KV_SERIALIZE(priority)
129  KV_SERIALIZE(mixin)
130  KV_SERIALIZE(unlock_time)
131  KV_SERIALIZE(payment_id)
132  KV_SERIALIZE(get_tx_key)
133  KV_SERIALIZE_OPT(do_not_relay, false)
134  KV_SERIALIZE_OPT(get_tx_hex, false)
135  END_KV_SERIALIZE_MAP()
136  };
137 
138  struct response
139  {
140  std::string tx_hash;
141  std::string tx_key;
142  std::list<std::string> amount_keys;
143  uint64_t fee;
144  std::string tx_blob;
145 
146  BEGIN_KV_SERIALIZE_MAP()
147  KV_SERIALIZE(tx_hash)
148  KV_SERIALIZE(tx_key)
149  KV_SERIALIZE(amount_keys)
150  KV_SERIALIZE(fee)
151  KV_SERIALIZE(tx_blob)
152  END_KV_SERIALIZE_MAP()
153  };
154  };
155 
157  {
158  struct request
159  {
160  std::list<transfer_destination> destinations;
161  uint32_t priority;
162  uint64_t mixin;
163  uint64_t unlock_time;
164  std::string payment_id;
168 
169  BEGIN_KV_SERIALIZE_MAP()
170  KV_SERIALIZE(destinations)
171  KV_SERIALIZE(priority)
172  KV_SERIALIZE(mixin)
173  KV_SERIALIZE(unlock_time)
174  KV_SERIALIZE(payment_id)
175  KV_SERIALIZE(get_tx_keys)
176  KV_SERIALIZE_OPT(do_not_relay, false)
177  KV_SERIALIZE_OPT(get_tx_hex, false)
178  END_KV_SERIALIZE_MAP()
179  };
180 
181  struct key_list
182  {
183  std::list<std::string> keys;
184 
185  BEGIN_KV_SERIALIZE_MAP()
186  KV_SERIALIZE(keys)
187  END_KV_SERIALIZE_MAP()
188  };
189 
190  struct response
191  {
192  std::list<std::string> tx_hash_list;
193  std::list<std::string> tx_key_list;
194  std::list<uint64_t> amount_list;
195  std::list<uint64_t> fee_list;
196  std::list<std::string> tx_blob_list;
197 
198  BEGIN_KV_SERIALIZE_MAP()
199  KV_SERIALIZE(tx_hash_list)
200  KV_SERIALIZE(tx_key_list)
201  KV_SERIALIZE(amount_list)
202  KV_SERIALIZE(fee_list)
203  KV_SERIALIZE(tx_blob_list)
204  END_KV_SERIALIZE_MAP()
205  };
206  };
207 
209  {
210  struct request
211  {
215 
216  BEGIN_KV_SERIALIZE_MAP()
217  KV_SERIALIZE(get_tx_keys)
218  KV_SERIALIZE_OPT(do_not_relay, false)
219  KV_SERIALIZE_OPT(get_tx_hex, false)
220  END_KV_SERIALIZE_MAP()
221  };
222 
223  struct key_list
224  {
225  std::list<std::string> keys;
226 
227  BEGIN_KV_SERIALIZE_MAP()
228  KV_SERIALIZE(keys)
229  END_KV_SERIALIZE_MAP()
230  };
231 
232  struct response
233  {
234  std::list<std::string> tx_hash_list;
235  std::list<std::string> tx_key_list;
236  std::list<uint64_t> fee_list;
237  std::list<std::string> tx_blob_list;
238 
239  BEGIN_KV_SERIALIZE_MAP()
240  KV_SERIALIZE(tx_hash_list)
241  KV_SERIALIZE(tx_key_list)
242  KV_SERIALIZE(fee_list)
243  KV_SERIALIZE(tx_blob_list)
244  END_KV_SERIALIZE_MAP()
245  };
246  };
247 
249  {
250  struct request
251  {
252  std::string address;
253  uint32_t priority;
254  uint64_t mixin;
255  uint64_t unlock_time;
256  std::string payment_id;
258  uint64_t below_amount;
261 
262  BEGIN_KV_SERIALIZE_MAP()
263  KV_SERIALIZE(address)
264  KV_SERIALIZE(priority)
265  KV_SERIALIZE(mixin)
266  KV_SERIALIZE(unlock_time)
267  KV_SERIALIZE(payment_id)
268  KV_SERIALIZE(get_tx_keys)
269  KV_SERIALIZE(below_amount)
270  KV_SERIALIZE_OPT(do_not_relay, false)
271  KV_SERIALIZE_OPT(get_tx_hex, false)
272  END_KV_SERIALIZE_MAP()
273  };
274 
275  struct key_list
276  {
277  std::list<std::string> keys;
278 
279  BEGIN_KV_SERIALIZE_MAP()
280  KV_SERIALIZE(keys)
281  END_KV_SERIALIZE_MAP()
282  };
283 
284  struct response
285  {
286  std::list<std::string> tx_hash_list;
287  std::list<std::string> tx_key_list;
288  std::list<uint64_t> fee_list;
289  std::list<std::string> tx_blob_list;
290 
291  BEGIN_KV_SERIALIZE_MAP()
292  KV_SERIALIZE(tx_hash_list)
293  KV_SERIALIZE(tx_key_list)
294  KV_SERIALIZE(fee_list)
295  KV_SERIALIZE(tx_blob_list)
296  END_KV_SERIALIZE_MAP()
297  };
298  };
299 
301  {
302  struct request
303  {
304  BEGIN_KV_SERIALIZE_MAP()
305  END_KV_SERIALIZE_MAP()
306  };
307 
308  struct response
309  {
310  BEGIN_KV_SERIALIZE_MAP()
311  END_KV_SERIALIZE_MAP()
312  };
313  };
314 
316  {
317  std::string payment_id;
318  std::string tx_hash;
319  uint64_t amount;
320  uint64_t block_height;
321  uint64_t unlock_time;
322 
323  BEGIN_KV_SERIALIZE_MAP()
324  KV_SERIALIZE(payment_id)
325  KV_SERIALIZE(tx_hash)
326  KV_SERIALIZE(amount)
327  KV_SERIALIZE(block_height)
328  KV_SERIALIZE(unlock_time)
329  END_KV_SERIALIZE_MAP()
330  };
331 
333  {
334  struct request
335  {
336  std::string payment_id;
337 
338  BEGIN_KV_SERIALIZE_MAP()
339  KV_SERIALIZE(payment_id)
340  END_KV_SERIALIZE_MAP()
341  };
342 
343  struct response
344  {
345  std::list<payment_details> payments;
346 
347  BEGIN_KV_SERIALIZE_MAP()
348  KV_SERIALIZE(payments)
349  END_KV_SERIALIZE_MAP()
350  };
351  };
352 
354  {
355  struct request
356  {
357  std::vector<std::string> payment_ids;
359 
360  BEGIN_KV_SERIALIZE_MAP()
361  KV_SERIALIZE(payment_ids)
362  KV_SERIALIZE(min_block_height)
363  END_KV_SERIALIZE_MAP()
364  };
365 
366  struct response
367  {
368  std::list<payment_details> payments;
369 
370  BEGIN_KV_SERIALIZE_MAP()
371  KV_SERIALIZE(payments)
372  END_KV_SERIALIZE_MAP()
373  };
374  };
375 
377  {
378  uint64_t amount;
379  bool spent;
380  uint64_t global_index;
381  std::string tx_hash;
382  uint64_t tx_size;
383 
384  BEGIN_KV_SERIALIZE_MAP()
385  KV_SERIALIZE(amount)
386  KV_SERIALIZE(spent)
387  KV_SERIALIZE(global_index)
388  KV_SERIALIZE(tx_hash)
389  KV_SERIALIZE(tx_size)
390  END_KV_SERIALIZE_MAP()
391  };
392 
394  {
395  struct request
396  {
397  std::string transfer_type;
398 
399  BEGIN_KV_SERIALIZE_MAP()
400  KV_SERIALIZE(transfer_type)
401  END_KV_SERIALIZE_MAP()
402  };
403 
404  struct response
405  {
406  std::list<transfer_details> transfers;
407 
408  BEGIN_KV_SERIALIZE_MAP()
409  KV_SERIALIZE(transfers)
410  END_KV_SERIALIZE_MAP()
411  };
412  };
413 
414  //JSON RPC V2
416  {
417  struct request
418  {
419  std::string key_type;
420 
421  BEGIN_KV_SERIALIZE_MAP()
422  KV_SERIALIZE(key_type)
423  END_KV_SERIALIZE_MAP()
424  };
425 
426  struct response
427  {
428  std::string key;
429 
430  BEGIN_KV_SERIALIZE_MAP()
431  KV_SERIALIZE(key)
432  END_KV_SERIALIZE_MAP()
433  };
434  };
435 
437  {
438  struct request
439  {
440  std::string payment_id;
441 
442  BEGIN_KV_SERIALIZE_MAP()
443  KV_SERIALIZE(payment_id)
444  END_KV_SERIALIZE_MAP()
445  };
446 
447  struct response
448  {
449  std::string integrated_address;
450  std::string payment_id;
451 
452  BEGIN_KV_SERIALIZE_MAP()
453  KV_SERIALIZE(integrated_address)
454  KV_SERIALIZE(payment_id)
455  END_KV_SERIALIZE_MAP()
456  };
457  };
458 
460  {
461  struct request
462  {
463  std::string integrated_address;
464 
465  BEGIN_KV_SERIALIZE_MAP()
466  KV_SERIALIZE(integrated_address)
467  END_KV_SERIALIZE_MAP()
468  };
469 
470  struct response
471  {
472  std::string standard_address;
473  std::string payment_id;
474 
475  BEGIN_KV_SERIALIZE_MAP()
476  KV_SERIALIZE(standard_address)
477  KV_SERIALIZE(payment_id)
478  END_KV_SERIALIZE_MAP()
479  };
480  };
481 
483  {
484  struct request
485  {
486  BEGIN_KV_SERIALIZE_MAP()
487  END_KV_SERIALIZE_MAP()
488  };
489 
490  struct response
491  {
492  BEGIN_KV_SERIALIZE_MAP()
493  END_KV_SERIALIZE_MAP()
494  };
495  };
496 
498  {
499  struct request
500  {
501  BEGIN_KV_SERIALIZE_MAP()
502  END_KV_SERIALIZE_MAP()
503  };
504 
505  struct response
506  {
507  BEGIN_KV_SERIALIZE_MAP()
508  END_KV_SERIALIZE_MAP()
509  };
510  };
511 
513  {
514  struct request
515  {
516  std::list<std::string> txids;
517  std::list<std::string> notes;
518 
519  BEGIN_KV_SERIALIZE_MAP()
520  KV_SERIALIZE(txids)
521  KV_SERIALIZE(notes)
522  END_KV_SERIALIZE_MAP()
523  };
524 
525  struct response
526  {
527  BEGIN_KV_SERIALIZE_MAP()
528  END_KV_SERIALIZE_MAP()
529  };
530  };
531 
533  {
534  struct request
535  {
536  std::list<std::string> txids;
537 
538  BEGIN_KV_SERIALIZE_MAP()
539  KV_SERIALIZE(txids)
540  END_KV_SERIALIZE_MAP()
541  };
542 
543  struct response
544  {
545  std::list<std::string> notes;
546 
547  BEGIN_KV_SERIALIZE_MAP()
548  KV_SERIALIZE(notes)
549  END_KV_SERIALIZE_MAP()
550  };
551  };
552 
554  {
555  struct request
556  {
557  std::string txid;
558 
559  BEGIN_KV_SERIALIZE_MAP()
560  KV_SERIALIZE(txid)
561  END_KV_SERIALIZE_MAP()
562  };
563 
564  struct response
565  {
566  std::string tx_key;
567 
568  BEGIN_KV_SERIALIZE_MAP()
569  KV_SERIALIZE(tx_key)
570  END_KV_SERIALIZE_MAP()
571  };
572  };
573 
575  {
576  std::string txid;
577  std::string payment_id;
578  uint64_t height;
579  uint64_t timestamp;
580  uint64_t amount;
581  uint64_t fee;
582  std::string note;
583  std::list<transfer_destination> destinations;
584  std::string type;
585  uint64_t unlock_time;
586 
587  BEGIN_KV_SERIALIZE_MAP()
588  KV_SERIALIZE(txid);
589  KV_SERIALIZE(payment_id);
590  KV_SERIALIZE(height);
591  KV_SERIALIZE(timestamp);
592  KV_SERIALIZE(amount);
593  KV_SERIALIZE(fee);
594  KV_SERIALIZE(note);
595  KV_SERIALIZE(destinations);
596  KV_SERIALIZE(type);
597  KV_SERIALIZE(unlock_time)
598  END_KV_SERIALIZE_MAP()
599  };
600 
602  {
603  struct request
604  {
605  bool in;
606  bool out;
607  bool pending;
608  bool failed;
609  bool pool;
610 
612  uint64_t min_height;
613  uint64_t max_height;
614 
615  BEGIN_KV_SERIALIZE_MAP()
616  KV_SERIALIZE(in);
617  KV_SERIALIZE(out);
618  KV_SERIALIZE(pending);
619  KV_SERIALIZE(failed);
620  KV_SERIALIZE(pool);
621  KV_SERIALIZE(filter_by_height);
622  KV_SERIALIZE(min_height);
623  KV_SERIALIZE(max_height);
624  END_KV_SERIALIZE_MAP()
625  };
626 
627  struct response
628  {
629  std::list<transfer_entry> in;
630  std::list<transfer_entry> out;
631  std::list<transfer_entry> pending;
632  std::list<transfer_entry> failed;
633  std::list<transfer_entry> pool;
634 
635  BEGIN_KV_SERIALIZE_MAP()
636  KV_SERIALIZE(in);
637  KV_SERIALIZE(out);
638  KV_SERIALIZE(pending);
639  KV_SERIALIZE(failed);
640  KV_SERIALIZE(pool);
641  END_KV_SERIALIZE_MAP()
642  };
643  };
644 
646  {
647  struct request
648  {
649  std::string txid;
650 
651  BEGIN_KV_SERIALIZE_MAP()
652  KV_SERIALIZE(txid);
653  END_KV_SERIALIZE_MAP()
654  };
655 
656  struct response
657  {
659 
660  BEGIN_KV_SERIALIZE_MAP()
661  KV_SERIALIZE(transfer);
662  END_KV_SERIALIZE_MAP()
663  };
664  };
665 
667  {
668  struct request
669  {
670  std::string data;
671 
672  BEGIN_KV_SERIALIZE_MAP()
673  KV_SERIALIZE(data);
674  END_KV_SERIALIZE_MAP()
675  };
676 
677  struct response
678  {
679  std::string signature;
680 
681  BEGIN_KV_SERIALIZE_MAP()
682  KV_SERIALIZE(signature);
683  END_KV_SERIALIZE_MAP()
684  };
685  };
686 
688  {
689  struct request
690  {
691  std::string data;
692  std::string address;
693  std::string signature;
694 
695  BEGIN_KV_SERIALIZE_MAP()
696  KV_SERIALIZE(data);
697  KV_SERIALIZE(address);
698  KV_SERIALIZE(signature);
699  END_KV_SERIALIZE_MAP()
700  };
701 
702  struct response
703  {
704  bool good;
705 
706  BEGIN_KV_SERIALIZE_MAP()
707  KV_SERIALIZE(good);
708  END_KV_SERIALIZE_MAP()
709  };
710  };
711 
713  {
714  struct request
715  {
716  BEGIN_KV_SERIALIZE_MAP()
717  END_KV_SERIALIZE_MAP()
718  };
719 
721  {
722  std::string key_image;
723  std::string signature;
724 
725  BEGIN_KV_SERIALIZE_MAP()
726  KV_SERIALIZE(key_image);
727  KV_SERIALIZE(signature);
728  END_KV_SERIALIZE_MAP()
729  };
730 
731  struct response
732  {
733  std::vector<signed_key_image> signed_key_images;
734 
735  BEGIN_KV_SERIALIZE_MAP()
736  KV_SERIALIZE(signed_key_images);
737  END_KV_SERIALIZE_MAP()
738  };
739  };
740 
742  {
744  {
745  std::string key_image;
746  std::string signature;
747 
748  BEGIN_KV_SERIALIZE_MAP()
749  KV_SERIALIZE(key_image);
750  KV_SERIALIZE(signature);
751  END_KV_SERIALIZE_MAP()
752  };
753 
754  struct request
755  {
756  std::vector<signed_key_image> signed_key_images;
757 
758  BEGIN_KV_SERIALIZE_MAP()
759  KV_SERIALIZE(signed_key_images);
760  END_KV_SERIALIZE_MAP()
761  };
762 
763  struct response
764  {
765  uint64_t height;
766  uint64_t spent;
767  uint64_t unspent;
768 
769  BEGIN_KV_SERIALIZE_MAP()
770  KV_SERIALIZE(height)
771  KV_SERIALIZE(spent)
772  KV_SERIALIZE(unspent)
773  END_KV_SERIALIZE_MAP()
774  };
775  };
776 
777  struct uri_spec
778  {
779  std::string address;
780  std::string payment_id;
781  uint64_t amount;
782  std::string tx_description;
783  std::string recipient_name;
784 
785  BEGIN_KV_SERIALIZE_MAP()
786  KV_SERIALIZE(address);
787  KV_SERIALIZE(payment_id);
788  KV_SERIALIZE(amount);
789  KV_SERIALIZE(tx_description);
790  KV_SERIALIZE(recipient_name);
791  END_KV_SERIALIZE_MAP()
792  };
793 
795  {
796  struct request: public uri_spec
797  {
798  };
799 
800  struct response
801  {
802  std::string uri;
803 
804  BEGIN_KV_SERIALIZE_MAP()
805  KV_SERIALIZE(uri)
806  END_KV_SERIALIZE_MAP()
807  };
808  };
809 
811  {
812  struct request
813  {
814  std::string uri;
815 
816  BEGIN_KV_SERIALIZE_MAP()
817  KV_SERIALIZE(uri)
818  END_KV_SERIALIZE_MAP()
819  };
820 
821  struct response
822  {
824  std::vector<std::string> unknown_parameters;
825 
826  BEGIN_KV_SERIALIZE_MAP()
827  KV_SERIALIZE(uri);
828  KV_SERIALIZE(unknown_parameters);
829  END_KV_SERIALIZE_MAP()
830  };
831  };
832 
834  {
835  struct request
836  {
837  std::string address;
838  std::string payment_id;
839  std::string description;
840 
841  BEGIN_KV_SERIALIZE_MAP()
842  KV_SERIALIZE(address)
843  KV_SERIALIZE(payment_id)
844  KV_SERIALIZE(description)
845  END_KV_SERIALIZE_MAP()
846  };
847 
848  struct response
849  {
850  uint64_t index;
851 
852  BEGIN_KV_SERIALIZE_MAP()
853  KV_SERIALIZE(index);
854  END_KV_SERIALIZE_MAP()
855  };
856  };
857 
859  {
860  struct request
861  {
862  std::list<uint64_t> entries;
863 
864  BEGIN_KV_SERIALIZE_MAP()
865  KV_SERIALIZE(entries)
866  END_KV_SERIALIZE_MAP()
867  };
868 
869  struct entry
870  {
871  uint64_t index;
872  std::string address;
873  std::string payment_id;
874  std::string description;
875 
876  BEGIN_KV_SERIALIZE_MAP()
877  KV_SERIALIZE(index)
878  KV_SERIALIZE(address)
879  KV_SERIALIZE(payment_id)
880  KV_SERIALIZE(description)
881  END_KV_SERIALIZE_MAP()
882  };
883 
884  struct response
885  {
886  std::vector<entry> entries;
887 
888  BEGIN_KV_SERIALIZE_MAP()
889  KV_SERIALIZE(entries)
890  END_KV_SERIALIZE_MAP()
891  };
892  };
893 
895  {
896  struct request
897  {
898  uint64_t index;
899 
900  BEGIN_KV_SERIALIZE_MAP()
901  KV_SERIALIZE(index);
902  END_KV_SERIALIZE_MAP()
903  };
904 
905  struct response
906  {
907  BEGIN_KV_SERIALIZE_MAP()
908  END_KV_SERIALIZE_MAP()
909  };
910  };
911 
913  {
914  struct request
915  {
916  BEGIN_KV_SERIALIZE_MAP()
917  END_KV_SERIALIZE_MAP()
918  };
919 
920  struct response
921  {
922  BEGIN_KV_SERIALIZE_MAP()
923  END_KV_SERIALIZE_MAP()
924  };
925  };
926 
928  {
929  struct request
930  {
931  uint64_t threads_count;
934 
935  BEGIN_KV_SERIALIZE_MAP()
936  KV_SERIALIZE(threads_count)
937  KV_SERIALIZE(do_background_mining)
938  KV_SERIALIZE(ignore_battery)
939  END_KV_SERIALIZE_MAP()
940  };
941 
942  struct response
943  {
944  BEGIN_KV_SERIALIZE_MAP()
945  END_KV_SERIALIZE_MAP()
946  };
947  };
948 
950  {
951  struct request
952  {
953  BEGIN_KV_SERIALIZE_MAP()
954  END_KV_SERIALIZE_MAP()
955  };
956 
957  struct response
958  {
959  BEGIN_KV_SERIALIZE_MAP()
960  END_KV_SERIALIZE_MAP()
961  };
962  };
963 
965  {
966  struct request
967  {
968  BEGIN_KV_SERIALIZE_MAP()
969  END_KV_SERIALIZE_MAP()
970  };
971  struct response
972  {
973  std::vector<std::string> languages;
974 
975  BEGIN_KV_SERIALIZE_MAP()
976  KV_SERIALIZE(languages)
977  END_KV_SERIALIZE_MAP()
978  };
979  };
980 
982  {
983  struct request
984  {
985  std::string filename;
986  std::string password;
987  std::string language;
988 
989  BEGIN_KV_SERIALIZE_MAP()
990  KV_SERIALIZE(filename)
991  KV_SERIALIZE(password)
992  KV_SERIALIZE(language)
993  END_KV_SERIALIZE_MAP()
994  };
995  struct response
996  {
997  BEGIN_KV_SERIALIZE_MAP()
998  END_KV_SERIALIZE_MAP()
999  };
1000  };
1001 
1003  {
1004  struct request
1005  {
1006  std::string filename;
1007  std::string password;
1008 
1009  BEGIN_KV_SERIALIZE_MAP()
1010  KV_SERIALIZE(filename)
1011  KV_SERIALIZE(password)
1012  END_KV_SERIALIZE_MAP()
1013  };
1014  struct response
1015  {
1016  BEGIN_KV_SERIALIZE_MAP()
1017  END_KV_SERIALIZE_MAP()
1018  };
1019  };
1020 
1022  {
1023  struct request
1024  {
1025  std::string filename;
1026  std::string old_password;
1027  std::string new_password;
1028 
1029  BEGIN_KV_SERIALIZE_MAP()
1030  KV_SERIALIZE(filename)
1031  KV_SERIALIZE(old_password)
1032  KV_SERIALIZE(new_password)
1033  END_KV_SERIALIZE_MAP()
1034  };
1035  struct response
1036  {
1037  BEGIN_KV_SERIALIZE_MAP()
1038  END_KV_SERIALIZE_MAP()
1039  };
1040  };
1041 }
1042 }
bool ignore_battery
Definition: wallet_rpc_server_commands_defs.h:933
bool get_tx_hex
Definition: wallet_rpc_server_commands_defs.h:260
uint64_t mixin
Definition: wallet_rpc_server_commands_defs.h:162
Definition: wallet_rpc_server_commands_defs.h:689
Definition: wallet_rpc_server_commands_defs.h:777
Definition: wallet_rpc_server_commands_defs.h:553
bool pending
Definition: wallet_rpc_server_commands_defs.h:607
std::list< transfer_entry > pool
Definition: wallet_rpc_server_commands_defs.h:633
Definition: wallet_rpc_server_commands_defs.h:181
bool in
Definition: wallet_rpc_server_commands_defs.h:605
Definition: wallet_rpc_server_commands_defs.h:415
Definition: wallet_rpc_server_commands_defs.h:981
std::list< transfer_destination > destinations
Definition: wallet_rpc_server_commands_defs.h:160
uint64_t unlocked_balance
Definition: wallet_rpc_server_commands_defs.h:59
std::list< std::string > tx_key_list
Definition: wallet_rpc_server_commands_defs.h:193
Definition: wallet_rpc_server_commands_defs.h:714
Definition: wallet_rpc_server_commands_defs.h:315
Definition: wallet_rpc_server_commands_defs.h:76
std::list< transfer_destination > destinations
Definition: wallet_rpc_server_commands_defs.h:583
Definition: wallet_rpc_server_commands_defs.h:459
Definition: wallet_rpc_server_commands_defs.h:884
std::string signature
Definition: wallet_rpc_server_commands_defs.h:723
Definition: wallet_rpc_server_commands_defs.h:966
Definition: wallet_rpc_server_commands_defs.h:927
Definition: wallet_rpc_server_commands_defs.h:88
Definition: wallet_rpc_server_commands_defs.h:393
Definition: wallet_rpc_server_commands_defs.h:512
std::vector< std::string > languages
Definition: wallet_rpc_server_commands_defs.h:973
Definition: wallet_rpc_server_commands_defs.h:366
Definition: wallet_rpc_server_commands_defs.h:645
Definition: wallet_rpc_server_commands_defs.h:353
std::string uri
Definition: wallet_rpc_server_commands_defs.h:814
std::string tx_key
Definition: wallet_rpc_server_commands_defs.h:566
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:336
uint64_t unlock_time
Definition: wallet_rpc_server_commands_defs.h:585
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:838
std::string standard_address
Definition: wallet_rpc_server_commands_defs.h:472
bool failed
Definition: wallet_rpc_server_commands_defs.h:608
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:256
Definition: wallet_rpc_server_commands_defs.h:687
uint64_t amount
Definition: wallet_rpc_server_commands_defs.h:319
Definition: wallet_rpc_server_commands_defs.h:300
uint64_t below_amount
Definition: wallet_rpc_server_commands_defs.h:258
Definition: wallet_rpc_server_commands_defs.h:647
Definition: wallet_rpc_server_commands_defs.h:482
std::string txid
Definition: wallet_rpc_server_commands_defs.h:557
std::string tx_blob
Definition: wallet_rpc_server_commands_defs.h:144
Definition: wallet_rpc_server_commands_defs.h:601
Definition: wallet_rpc_server_commands_defs.h:113
Definition: wallet_rpc_server_commands_defs.h:417
Definition: wallet_rpc_server_commands_defs.h:951
Definition: wallet_rpc_server_commands_defs.h:1035
uint64_t fee
Definition: wallet_rpc_server_commands_defs.h:581
Definition: wallet_rpc_server_commands_defs.h:190
Definition: wallet_rpc_server_commands_defs.h:720
std::string address
Definition: wallet_rpc_server_commands_defs.h:872
Definition: wallet_rpc_server_commands_defs.h:821
std::list< uint64_t > fee_list
Definition: wallet_rpc_server_commands_defs.h:288
std::string integrated_address
Definition: wallet_rpc_server_commands_defs.h:449
Definition: wallet_rpc_server_commands_defs.h:763
Definition: wallet_rpc_server_commands_defs.h:942
Definition: wallet_rpc_server_commands_defs.h:505
Definition: wallet_rpc_server_commands_defs.h:914
uint64_t unlock_time
Definition: wallet_rpc_server_commands_defs.h:120
uint64_t threads_count
Definition: wallet_rpc_server_commands_defs.h:931
uint64_t timestamp
Definition: wallet_rpc_server_commands_defs.h:579
uint64_t height
Definition: blockchain.cpp:87
std::string address
Definition: wallet_rpc_server_commands_defs.h:106
Definition: wallet_rpc_server_commands_defs.h:835
uint32_t priority
Definition: wallet_rpc_server_commands_defs.h:118
uint64_t spent
Definition: wallet_rpc_server_commands_defs.h:766
Definition: wallet_rpc_server_commands_defs.h:94
std::string password
Definition: wallet_rpc_server_commands_defs.h:1007
std::string tx_hash
Definition: wallet_rpc_server_commands_defs.h:381
std::list< std::string > tx_key_list
Definition: wallet_rpc_server_commands_defs.h:235
uint64_t height
Definition: wallet_rpc_server_commands_defs.h:578
Definition: wallet_rpc_server_commands_defs.h:964
Definition: wallet_rpc_server_commands_defs.h:426
Definition: wallet_rpc_server_commands_defs.h:1004
std::vector< signed_key_image > signed_key_images
Definition: wallet_rpc_server_commands_defs.h:733
Definition: wallet_rpc_server_commands_defs.h:395
Definition: wallet_rpc_server_commands_defs.h:138
Definition: wallet_rpc_server_commands_defs.h:796
Definition: wallet_rpc_server_commands_defs.h:833
uri_spec uri
Definition: wallet_rpc_server_commands_defs.h:823
Definition: wallet_rpc_server_commands_defs.h:627
Definition: wallet_rpc_server_commands_defs.h:920
std::string key_image
Definition: wallet_rpc_server_commands_defs.h:722
uint64_t block_height
Definition: wallet_rpc_server_commands_defs.h:320
Definition: wallet_rpc_server_commands_defs.h:860
bool pool
Definition: wallet_rpc_server_commands_defs.h:609
std::string address
Definition: wallet_rpc_server_commands_defs.h:837
Definition: wallet_rpc_server_commands_defs.h:284
Definition: wallet_rpc_server_commands_defs.h:115
std::string key_image
Definition: wallet_rpc_server_commands_defs.h:745
std::list< std::string > tx_blob_list
Definition: wallet_rpc_server_commands_defs.h:289
uint64_t min_block_height
Definition: wallet_rpc_server_commands_defs.h:358
bool do_not_relay
Definition: wallet_rpc_server_commands_defs.h:123
bool filter_by_height
Definition: wallet_rpc_server_commands_defs.h:611
Definition: wallet_rpc_server_commands_defs.h:470
uint64_t amount
Definition: wallet_rpc_server_commands_defs.h:781
std::string description
Definition: wallet_rpc_server_commands_defs.h:874
std::string recipient_name
Definition: wallet_rpc_server_commands_defs.h:783
std::string note
Definition: wallet_rpc_server_commands_defs.h:582
std::string password
Definition: wallet_rpc_server_commands_defs.h:986
std::string language
Definition: wallet_rpc_server_commands_defs.h:987
bool get_tx_keys
Definition: wallet_rpc_server_commands_defs.h:212
std::list< std::string > tx_key_list
Definition: wallet_rpc_server_commands_defs.h:287
uint64_t mixin
Definition: wallet_rpc_server_commands_defs.h:254
Definition: wallet_rpc_server_commands_defs.h:712
std::vector< std::string > payment_ids
Definition: wallet_rpc_server_commands_defs.h:357
Definition: wallet_rpc_server_commands_defs.h:355
std::string address
Definition: wallet_rpc_server_commands_defs.h:692
std::list< payment_details > payments
Definition: wallet_rpc_server_commands_defs.h:368
std::string txid
Definition: wallet_rpc_server_commands_defs.h:576
Definition: wallet_rpc_server_commands_defs.h:702
Definition: wallet_rpc_server_commands_defs.h:668
std::vector< signed_key_image > signed_key_images
Definition: wallet_rpc_server_commands_defs.h:756
Definition: wallet_rpc_server_commands_defs.h:223
Definition: wallet_rpc_server_commands_defs.h:896
uint64_t min_height
Definition: wallet_rpc_server_commands_defs.h:612
std::string uri
Definition: wallet_rpc_server_commands_defs.h:802
uint64_t unlock_time
Definition: wallet_rpc_server_commands_defs.h:163
Definition: wallet_rpc_server_commands_defs.h:68
Definition: wallet_rpc_server_commands_defs.h:56
std::list< transfer_entry > in
Definition: wallet_rpc_server_commands_defs.h:629
Definition: wallet_rpc_server_commands_defs.h:1002
Definition: wallet_rpc_server_commands_defs.h:275
Definition: wallet_rpc_server_commands_defs.h:731
Definition: wallet_rpc_server_commands_defs.h:490
uint64_t max_height
Definition: wallet_rpc_server_commands_defs.h:613
Definition: wallet_rpc_server_commands_defs.h:543
Definition: wallet_rpc_server_commands_defs.h:208
Definition: wallet_rpc_server_commands_defs.h:308
bool get_tx_key
Definition: wallet_rpc_server_commands_defs.h:122
Definition: wallet_rpc_server_commands_defs.h:158
std::list< payment_details > payments
Definition: wallet_rpc_server_commands_defs.h:345
Definition: wallet_rpc_server_commands_defs.h:438
std::list< transfer_destination > destinations
Definition: wallet_rpc_server_commands_defs.h:117
Definition: wallet_rpc_server_commands_defs.h:1023
bool get_tx_keys
Definition: wallet_rpc_server_commands_defs.h:257
std::string old_password
Definition: wallet_rpc_server_commands_defs.h:1026
Definition: wallet_rpc_server_commands_defs.h:983
bool get_tx_hex
Definition: wallet_rpc_server_commands_defs.h:124
bool out
Definition: wallet_rpc_server_commands_defs.h:606
uint64_t balance
Definition: wallet_rpc_server_commands_defs.h:58
Various Tools.
Definition: base58.cpp:43
Definition: wallet_rpc_server_commands_defs.h:332
Definition: wallet_rpc_server_commands_defs.h:497
std::string txid
Definition: wallet_rpc_server_commands_defs.h:649
std::list< std::string > notes
Definition: wallet_rpc_server_commands_defs.h:517
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:873
bool get_tx_keys
Definition: wallet_rpc_server_commands_defs.h:165
Definition: wallet_rpc_server_commands_defs.h:603
uint64_t unspent
Definition: wallet_rpc_server_commands_defs.h:767
std::list< std::string > txids
Definition: wallet_rpc_server_commands_defs.h:536
std::list< uint64_t > fee_list
Definition: wallet_rpc_server_commands_defs.h:236
std::list< uint64_t > fee_list
Definition: wallet_rpc_server_commands_defs.h:195
Definition: wallet_rpc_server_commands_defs.h:800
Definition: wallet_rpc_server_commands_defs.h:929
transfer_entry transfer
Definition: wallet_rpc_server_commands_defs.h:658
bool do_background_mining
Definition: wallet_rpc_server_commands_defs.h:932
uint64_t fee
Definition: wallet_rpc_server_commands_defs.h:143
bool do_not_relay
Definition: wallet_rpc_server_commands_defs.h:259
uint64_t global_index
Definition: wallet_rpc_server_commands_defs.h:380
Definition: wallet_rpc_server_commands_defs.h:404
std::string description
Definition: wallet_rpc_server_commands_defs.h:839
std::string new_password
Definition: wallet_rpc_server_commands_defs.h:1027
Definition: wallet_rpc_server_commands_defs.h:848
Definition: wallet_rpc_server_commands_defs.h:564
std::list< std::string > txids
Definition: wallet_rpc_server_commands_defs.h:516
std::string data
Definition: wallet_rpc_server_commands_defs.h:691
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:780
#define false
Definition: stdbool.h:38
std::list< transfer_entry > failed
Definition: wallet_rpc_server_commands_defs.h:632
Definition: wallet_rpc_server_commands_defs.h:971
Definition: wallet_rpc_server_commands_defs.h:912
uint64_t height
Definition: wallet_rpc_server_commands_defs.h:96
std::list< std::string > keys
Definition: wallet_rpc_server_commands_defs.h:277
Definition: wallet_rpc_server_commands_defs.h:858
Definition: wallet_rpc_server_commands_defs.h:810
Definition: wallet_rpc_server_commands_defs.h:436
uint64_t unlock_time
Definition: wallet_rpc_server_commands_defs.h:321
std::list< std::string > tx_blob_list
Definition: wallet_rpc_server_commands_defs.h:237
std::list< std::string > tx_hash_list
Definition: wallet_rpc_server_commands_defs.h:286
Definition: wallet_rpc_server_commands_defs.h:525
Definition: wallet_rpc_server_commands_defs.h:86
std::list< transfer_entry > out
Definition: wallet_rpc_server_commands_defs.h:630
std::list< std::string > tx_hash_list
Definition: wallet_rpc_server_commands_defs.h:234
Definition: wallet_rpc_server_commands_defs.h:743
Definition: wallet_rpc_server_commands_defs.h:656
Definition: wallet_rpc_server_commands_defs.h:499
Definition: wallet_rpc_server_commands_defs.h:894
Definition: wallet_rpc_server_commands_defs.h:103
Definition: wallet_rpc_server_commands_defs.h:534
std::string address
Definition: wallet_rpc_server_commands_defs.h:78
Definition: wallet_rpc_server_commands_defs.h:995
std::list< transfer_details > transfers
Definition: wallet_rpc_server_commands_defs.h:406
bool get_tx_hex
Definition: wallet_rpc_server_commands_defs.h:214
Definition: wallet_rpc_server_commands_defs.h:343
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:473
Definition: wallet_rpc_server_commands_defs.h:50
Definition: wallet_rpc_server_commands_defs.h:741
POD_CLASS signature
Definition: crypto.h:92
uint32_t priority
Definition: wallet_rpc_server_commands_defs.h:253
uint64_t amount
Definition: wallet_rpc_server_commands_defs.h:580
uint64_t height
Definition: wallet_rpc_server_commands_defs.h:765
Definition: wallet_rpc_server_commands_defs.h:250
std::string tx_hash
Definition: wallet_rpc_server_commands_defs.h:318
std::vector< entry > entries
Definition: wallet_rpc_server_commands_defs.h:886
Definition: wallet_rpc_server_commands_defs.h:666
std::list< uint64_t > entries
Definition: wallet_rpc_server_commands_defs.h:862
std::list< uint64_t > amount_list
Definition: wallet_rpc_server_commands_defs.h:194
Definition: wallet_rpc_server_commands_defs.h:949
uint64_t unlock_time
Definition: wallet_rpc_server_commands_defs.h:255
POD_CLASS key_image
Definition: crypto.h:86
std::list< std::string > tx_blob_list
Definition: wallet_rpc_server_commands_defs.h:196
Definition: wallet_rpc_server_commands_defs.h:447
Definition: wallet_rpc_server_commands_defs.h:1021
std::string signature
Definition: wallet_rpc_server_commands_defs.h:693
std::string transfer_type
Definition: wallet_rpc_server_commands_defs.h:397
uint32_t priority
Definition: wallet_rpc_server_commands_defs.h:161
bool do_not_relay
Definition: wallet_rpc_server_commands_defs.h:213
Definition: wallet_rpc_server_commands_defs.h:334
uint64_t tx_size
Definition: wallet_rpc_server_commands_defs.h:382
Definition: wallet_rpc_server_commands_defs.h:248
Definition: wallet_rpc_server_commands_defs.h:461
std::list< std::string > keys
Definition: wallet_rpc_server_commands_defs.h:183
uint64_t index
Definition: wallet_rpc_server_commands_defs.h:898
std::list< std::string > tx_hash_list
Definition: wallet_rpc_server_commands_defs.h:192
Definition: wallet_rpc_server_commands_defs.h:156
std::string tx_hash
Definition: wallet_rpc_server_commands_defs.h:140
std::string address
Definition: wallet_rpc_server_commands_defs.h:779
bool do_not_relay
Definition: wallet_rpc_server_commands_defs.h:166
Definition: wallet_rpc_server_commands_defs.h:1014
std::list< std::string > amount_keys
Definition: wallet_rpc_server_commands_defs.h:142
std::list< std::string > notes
Definition: wallet_rpc_server_commands_defs.h:545
std::string address
Definition: wallet_rpc_server_commands_defs.h:252
Definition: wallet_rpc_server_commands_defs.h:302
Definition: wallet_rpc_server_commands_defs.h:210
uint64_t index
Definition: wallet_rpc_server_commands_defs.h:850
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:164
Definition: wallet_rpc_server_commands_defs.h:812
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:450
Definition: wallet_rpc_server_commands_defs.h:794
std::string filename
Definition: wallet_rpc_server_commands_defs.h:1025
std::string signature
Definition: wallet_rpc_server_commands_defs.h:746
Definition: wallet_rpc_server_commands_defs.h:957
std::string tx_key
Definition: wallet_rpc_server_commands_defs.h:141
Definition: wallet_rpc_server_commands_defs.h:532
Definition: wallet_rpc_server_commands_defs.h:905
Definition: wallet_rpc_server_commands_defs.h:555
std::string tx_description
Definition: wallet_rpc_server_commands_defs.h:782
Definition: wallet_rpc_server_commands_defs.h:484
uint64_t mixin
Definition: wallet_rpc_server_commands_defs.h:119
uint64_t index
Definition: wallet_rpc_server_commands_defs.h:871
std::string key
Definition: wallet_rpc_server_commands_defs.h:428
std::list< std::string > keys
Definition: wallet_rpc_server_commands_defs.h:225
std::vector< std::string > unknown_parameters
Definition: wallet_rpc_server_commands_defs.h:824
Definition: wallet_rpc_server_commands_defs.h:376
std::string data
Definition: wallet_rpc_server_commands_defs.h:670
std::string type
Definition: wallet_rpc_server_commands_defs.h:584
uint64_t amount
Definition: wallet_rpc_server_commands_defs.h:105
Definition: wallet_rpc_server_commands_defs.h:574
Definition: wallet_rpc_server_commands_defs.h:70
Definition: wallet_rpc_server_commands_defs.h:677
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:440
std::string filename
Definition: wallet_rpc_server_commands_defs.h:985
Definition: wallet_rpc_server_commands_defs.h:48
Definition: wallet_rpc_server_commands_defs.h:514
std::string integrated_address
Definition: wallet_rpc_server_commands_defs.h:463
std::string filename
Definition: wallet_rpc_server_commands_defs.h:1006
bool good
Definition: wallet_rpc_server_commands_defs.h:704
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:577
std::list< transfer_entry > pending
Definition: wallet_rpc_server_commands_defs.h:631
Definition: wallet_rpc_server_commands_defs.h:869
bool spent
Definition: wallet_rpc_server_commands_defs.h:379
Definition: wallet_rpc_server_commands_defs.h:232
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:317
std::string payment_id
Definition: wallet_rpc_server_commands_defs.h:121
bool get_tx_hex
Definition: wallet_rpc_server_commands_defs.h:167
uint64_t amount
Definition: wallet_rpc_server_commands_defs.h:378
Definition: wallet_rpc_server_commands_defs.h:754
std::string key_type
Definition: wallet_rpc_server_commands_defs.h:419
std::string signature
Definition: wallet_rpc_server_commands_defs.h:679