Monero C++ Library
monero_wallet.h
1 
53 #pragma once
54 
55 #include "monero_wallet_model.h"
56 
57 using namespace std;
58 using namespace monero;
59 
63 namespace monero {
64 
65  // --------------------------------- LISTENERS ------------------------------
66 
73  public:
74 
84  virtual void on_sync_progress(uint64_t height, uint64_t start_height, uint64_t end_height, double percent_done, const string& message) {}
85  };
86 
91  public:
92 
98  virtual void on_new_block(uint64_t height) {};
99 
105  virtual void on_output_received(const monero_output_wallet& output) {};
106 
112  virtual void on_output_spent(const monero_output_wallet& output) {};
113  };
114 
115  // forward declaration of internal wallet2 listener
116  struct wallet2_listener;
117 
118  // ----------------------------- WALLET METHODS -----------------------------
119 
124 
125  public:
126 
130  virtual ~monero_wallet() {}
131 
139  virtual void set_daemon_connection(const string& uri, const string& username = "", const string& password = "") {
140  throw runtime_error("set_daemon_connection() not supported");
141  }
142 
148  virtual void set_daemon_connection(const monero_rpc_connection& connection) {
149  throw runtime_error("set_daemon_connection() not supported");
150  }
151 
157  virtual shared_ptr<monero_rpc_connection> get_daemon_connection() const {
158  throw runtime_error("get_daemon_connection() not supported");
159  }
160 
166  virtual bool is_connected() const {
167  throw runtime_error("is_connected() not supported");
168  }
169 
175  virtual bool is_daemon_synced() const {
176  throw runtime_error("is_daemon_synced() not supported");
177  }
178 
184  virtual bool is_daemon_trusted() const {
185  throw runtime_error("is_daemon_trusted() not supported");
186  }
187 
193  virtual bool is_synced() const {
194  throw runtime_error("is_synced() not supported");
195  }
196 
202  virtual monero_version get_version() const {
203  throw runtime_error("get_version() not supported");
204  }
205 
211  virtual string get_path() const {
212  throw runtime_error("get_path() not supported");
213  }
214 
221  throw runtime_error("get_network_type() not supported");
222  }
223 
229  virtual string get_mnemonic() const {
230  throw runtime_error("get_mnemonic() not supported");
231  }
232 
238  virtual string get_mnemonic_language() const {
239  throw runtime_error("get_mnemonic_language() not supported");
240  }
241 
247  virtual string get_public_view_key() const {
248  throw runtime_error("get_public_view_key() not supported");
249  }
250 
256  virtual string get_private_view_key() const {
257  throw runtime_error("get_private_view_key() not supported");
258  }
259 
265  virtual string get_public_spend_key() const {
266  throw runtime_error("get_public_spend_key() not supported");
267  }
268 
274  virtual string get_private_spend_key() const {
275  throw runtime_error("get_private_spend_key() not supported");
276  }
277 
283  virtual string get_primary_address() const {
284  return get_address(0, 0);
285  }
286 
294  virtual string get_address(const uint32_t account_idx, const uint32_t subaddress_idx) const {
295  throw runtime_error("get_address() not supported");
296  }
297 
305  virtual monero_subaddress get_address_index(const string& address) const {
306  throw runtime_error("get_address_index() not supported");
307  }
308 
316  virtual monero_integrated_address get_integrated_address(const string& standard_address = "", const string& payment_id = "") const {
317  throw runtime_error("get_integrated_address() not supported");
318  }
319 
326  virtual monero_integrated_address decode_integrated_address(const string& integrated_address) const {
327  throw runtime_error("decode_integrated_address() not supported");
328  }
329 
335  virtual uint64_t get_height() const {
336  throw runtime_error("get_height() not supported");
337  }
338 
344  virtual uint64_t get_restore_height() const {
345  throw runtime_error("get_restore_height() not supported");
346  }
347 
353  virtual void set_restore_height(uint64_t restore_height) {
354  throw runtime_error("set_restore_height() not supported");
355  }
356 
362  virtual uint64_t get_daemon_height() const {
363  throw runtime_error("get_daemon_height() not supported");
364  }
365 
371  virtual uint64_t get_daemon_max_peer_height() const {
372  throw runtime_error("get_daemon_max_peer_height() not supported");
373  }
374 
380  virtual void add_listener(monero_wallet_listener& listener) {
381  throw runtime_error("add_listener() not supported");
382  }
383 
389  virtual void remove_listener(monero_wallet_listener& listener) {
390  throw runtime_error("remove_listener() not supported");
391  }
392 
396  virtual set<monero_wallet_listener*> get_listeners() {
397  throw runtime_error("get_listeners() not supported");
398  }
399 
406  throw runtime_error("sync() not supported");
407  }
408 
416  throw runtime_error("sync() not supported");
417  }
418 
425  virtual monero_sync_result sync(uint64_t start_height) {
426  throw runtime_error("sync() not supported");
427  }
428 
436  virtual monero_sync_result sync(uint64_t start_height, monero_sync_listener& listener) {
437  throw runtime_error("sync() not supported");
438  }
439 
443  virtual void start_syncing() {
444  throw runtime_error("start_syncing() not supported");
445  }
446 
450  virtual void stop_syncing() {
451  throw runtime_error("stop_syncing() not supported");
452  }
453 
463  virtual void rescan_spent() {
464  throw runtime_error("rescan_spent() not supported");
465  }
466 
474  virtual void rescan_blockchain() {
475  throw runtime_error("rescan_blockchain() not supported");
476  }
477 
478 // /**
479 // * Indicates if importing multisig data is needed for returning a correct balance.
480 // *
481 // * @return true if importing multisig data is needed for returning a correct balance, false otherwise
482 // */
483 // public boolean isMultisigImportNeeded();
484 
490  virtual uint64_t get_balance() const {
491  throw runtime_error("get_balance() not supported");
492  }
493 
500  virtual uint64_t get_balance(uint32_t account_idx) const {
501  throw runtime_error("get_balance() not supported");
502  }
503 
511  virtual uint64_t get_balance(uint32_t account_idx, uint32_t subaddress_idx) const {
512  throw runtime_error("get_balance() not supported");
513  }
514 
520  virtual uint64_t get_unlocked_balance() const {
521  throw runtime_error("get_unlocked_balance() not supported");
522  }
523 
530  virtual uint64_t get_unlocked_balance(uint32_t account_idx) const {
531  throw runtime_error("get_unlocked_balance() not supported");
532  }
533 
541  virtual uint64_t get_unlocked_balance(uint32_t account_idx, uint32_t subaddress_idx) const {
542  throw runtime_error("get_unlocked_balance() not supported");
543  }
544 
550  virtual vector<monero_account> get_accounts() const {
551  return get_accounts(false, string(""));
552  }
553 
560  virtual vector<monero_account> get_accounts(bool include_subaddresses) const {
561  return get_accounts(include_subaddresses, "");
562  }
563 
570  virtual vector<monero_account> get_accounts(const string& tag) const {
571  return get_accounts(false, tag);
572  }
573 
581  virtual vector<monero_account> get_accounts(bool include_subaddresses, const string& tag) const {
582  throw runtime_error("get_accounts() not supported");
583  }
584 
591  virtual monero_account get_account(uint32_t account_idx) const {
592  return get_account(account_idx, false);
593  }
594 
602  virtual monero_account get_account(const uint32_t account_idx, bool include_subaddresses) const {
603  throw runtime_error("get_account() not supported");
604  }
605 
612  virtual monero_account create_account(const string& label = "") {
613  throw runtime_error("create_account() not supported");
614  }
615 
622  virtual vector<monero_subaddress> get_subaddresses(const uint32_t account_idx) const {
623  return get_subaddresses(account_idx, vector<uint32_t>());
624  }
625 
633  virtual vector<monero_subaddress> get_subaddresses(const uint32_t account_idx, const vector<uint32_t>& subaddress_indices) const {
634  throw runtime_error("get_subaddresses() not supported");
635  }
636 
644  virtual monero_subaddress get_subaddress(const uint32_t account_idx, const uint32_t subaddress_idx) const {
645  throw runtime_error("get_subaddress() not supported");
646  }
647 
655  virtual monero_subaddress create_subaddress(uint32_t account_idx, const string& label = "") {
656  throw runtime_error("create_subaddress() not supported");
657  }
658 
659 // /**
660 // * Get a wallet transaction by hash.
661 // *
662 // * @param tx_hash is a hash of a transaction to get
663 // * @return monero_tx_wallet is the identified transactions
664 // */
665 // public monero_tx_wallet getTx(string tx_hash);
666 
673  virtual vector<shared_ptr<monero_tx_wallet>> get_txs() const {
674  throw runtime_error("get_txs() not supported");
675  }
676 
677 // /**
678 // * Get wallet transactions by hash.
679 // *
680 // * @param tx_hashes are hashes of transactions to get
681 // * @return the identified transactions
682 // */
683 // public List<monero_tx_wallet> get_txs(Collection<string> tx_hashes);
684 
697  virtual vector<shared_ptr<monero_tx_wallet>> get_txs(const monero_tx_query& query) const {
698  throw runtime_error("get_txs(query) not supported");
699  }
700 
709  virtual vector<shared_ptr<monero_tx_wallet>> get_txs(const monero_tx_query& query, vector<string>& missing_tx_hashes) const {
710  throw runtime_error("get_txs(query, missing_tx_hashes) not supported");
711  }
712 
713 // /**
714 // * Get all incoming and outgoing transfers to and from this wallet. An
715 // * outgoing transfer represents a total amount sent from one or more
716 // * subaddresses within an account to individual destination addresses, each
717 // * with their own amount. An incoming transfer represents a total amount
718 // * received into a subaddress within an account. Transfers belong to
719 // * transactions which are stored on the blockchain.
720 // *
721 // * @return all wallet transfers
722 // */
723 // public List<monero_transfer> get_transfers();
724 //
725 // /**
726 // * Get incoming and outgoing transfers to and from an account. An outgoing
727 // * transfer represents a total amount sent from one or more subaddresses
728 // * within an account to individual destination addresses, each with their
729 // * own amount. An incoming transfer represents a total amount received into
730 // * a subaddress within an account. Transfers belong to transactions which
731 // * are stored on the blockchain.
732 // *
733 // * @param account_idx is the index of the account to get transfers from
734 // * @return transfers to/from the account
735 // */
736 // public List<monero_transfer> get_transfers(int account_idx);
737 //
738 // /**
739 // * Get incoming and outgoing transfers to and from a subaddress. An outgoing
740 // * transfer represents a total amount sent from one or more subaddresses
741 // * within an account to individual destination addresses, each with their
742 // * own amount. An incoming transfer represents a total amount received into
743 // * a subaddress within an account. Transfers belong to transactions which
744 // * are stored on the blockchain.
745 // *
746 // * @param account_idx is the index of the account to get transfers from
747 // * @param subaddress_idx is the index of the subaddress to get transfers from
748 // * @return transfers to/from the subaddress
749 // */
750 // public List<monero_transfer> get_transfers(int account_idx, int subaddress_idx);
751 
768  virtual vector<shared_ptr<monero_transfer>> get_transfers(const monero_transfer_query& query) const {
769  throw runtime_error("get_transfers() not supported");
770  }
771 
772 // /**
773 // * Get outputs created from previous transactions that belong to the wallet
774 // * (i.e. that the wallet can spend one time). Outputs are part of
775 // * transactions which are stored in blocks on the blockchain.
776 // *
777 // * @return List<monero_output_wallet> are all wallet outputs
778 // */
779 // public List<monero_output_wallet> get_outputs();
780 
793  virtual vector<shared_ptr<monero_output_wallet>> get_outputs(const monero_output_query& query) const {
794  throw runtime_error("get_outputs() not supported");
795  }
796 
802  virtual string get_outputs_hex() const {
803  throw runtime_error("get_outputs_hex() not supported");
804  }
805 
812  virtual int import_outputs_hex(const string& outputs_hex) {
813  throw runtime_error("import_outputs_hex() not supported");
814  }
815 
821  virtual vector<shared_ptr<monero_key_image>> get_key_images() const {
822  throw runtime_error("get_key_images() not supported");
823  }
824 
831  virtual shared_ptr<monero_key_image_import_result> import_key_images(const vector<shared_ptr<monero_key_image>>& key_images) {
832  throw runtime_error("import_key_images() not supported");
833  }
834 
835 // /**
836 // * Get new key images from the last imported outputs.
837 // *
838 // * @return the key images from the last imported outputs
839 // */
840 // public List<monero_key_image> getNewKeyImagesFromLastImport();
841 
850  throw runtime_error("create_tx() not supported");
851  }
852 
862  virtual monero_tx_set create_tx(uint32_t account_index, string address, uint64_t amount) {
863  throw runtime_error("create_tx() not supported");
864  }
865 
876  virtual monero_tx_set create_tx(int account_index, string address, uint64_t amount, monero_send_priority priority) {
877  throw runtime_error("create_tx() not supported");
878  }
879 
888  throw runtime_error("create_txs() not supported");
889  }
890 
897  virtual string relay_tx(const string& tx_metadata) {
898  throw runtime_error("relay_tx() not supported");
899  }
900 
907  virtual string relay_tx(const monero_tx_wallet& tx) {
908  throw runtime_error("relay_tx() not supported");
909  }
910 
917  virtual vector<string> relay_txs(const vector<string>& tx_metadatas) {
918  throw runtime_error("relay_txs() not supported");
919  }
920 
927  virtual vector<string> relay_txs(const vector<shared_ptr<monero_tx_wallet>>& txs) {
928  throw runtime_error("relay_txs() not supported");
929  }
930 
938  virtual monero_tx_set send(const monero_send_request& request) {
939  throw runtime_error("send() not supported");
940  }
941 
951  virtual monero_tx_set send(uint32_t account_index, string address, uint64_t amount) {
952  throw runtime_error("send() not supported");
953  }
954 
965  virtual monero_tx_set send(uint32_t account_index, string address, uint64_t amount, monero_send_priority priority) {
966  throw runtime_error("send() not supported");
967  }
968 
976  virtual monero_tx_set send_split(const monero_send_request& request) {
977  throw runtime_error("send_split() not supported");
978  }
979 
980  // /**
981  // * Create and relay one or more transactions which transfer funds from this
982  // * wallet to one or more destination.
983  // *
984  // * @param account_index is the index of the account to draw funds from
985  // * @param address is the destination address to send funds to
986  // * @param sendAmount is the amount being sent
987  // * @return the resulting transactions
988  // */
989  // public List<monero_tx_wallet> send_split(int account_index, string address, BigInteger sendAmount);
990  //
991  // /**
992  // * Create and relay one or more transactions which transfer funds from this
993  // * wallet to one or more destination.
994  // *
995  // * @param account_index is the index of the account to draw funds from
996  // * @param address is the destination address to send funds to
997  // * @param sendAmount is the amount being sent
998  // * @param priority is the send priority (default normal)
999  // * @return the resulting transactions
1000  // */
1001  // public List<monero_tx_wallet> send_split(int account_index, string address, BigInteger sendAmount, monero_send_priority priority);
1002 
1009  virtual vector<monero_tx_set> sweep_unlocked(const monero_send_request& request) {
1010  throw runtime_error("sweep_unlocked() not supported");
1011  }
1012 
1020  throw runtime_error("sweep_output() not supported");
1021  }
1022 
1023 // /**
1024 // * Sweep an output with a given key image.
1025 // *
1026 // * @param address is the destination address to send to
1027 // * @param key_image is the key image hex of the output to sweep
1028 // * @return the resulting transaction from sweeping an output
1029 // */
1030 // public monero_tx_wallet sweep_output(string address, string key_image);
1031 //
1032 // /**
1033 // * Sweep an output with a given key image.
1034 // *
1035 // * @param address is the destination address to send to
1036 // * @param key_image is the key image hex of the output to sweep
1037 // * @param priority is the transaction priority (optional)
1038 // * @return the resulting transaction from sweeping an output
1039 // */
1040 // public monero_tx_wallet sweep_output(string address, string key_image, monero_send_priority priority);
1041 //
1042 // /**
1043 // * Sweep a subaddress's unlocked funds to an address.
1044 // *
1045 // * @param account_idx is the index of the account
1046 // * @param subaddress_idx is the index of the subaddress
1047 // * @param address is the address to sweep the subaddress's funds to
1048 // * @return the resulting transactions
1049 // */
1050 // public List<monero_tx_wallet> sweepSubaddress(int account_idx, int subaddress_idx, string address);
1051 //
1052 // /**
1053 // * Sweep an acount's unlocked funds to an address.
1054 // *
1055 // * @param account_idx is the index of the account
1056 // * @param address is the address to sweep the account's funds to
1057 // * @return the resulting transactions
1058 // */
1059 // public List<monero_tx_wallet> sweepAccount(int account_idx, string address);
1060 //
1061 // /**
1062 // * Sweep the wallet's unlocked funds to an address.
1063 // *
1064 // * @param address is the address to sweep the wallet's funds to
1065 // * @return the resulting transactions
1066 // */
1067 // public List<monero_tx_wallet> sweepWallet(string address);
1068 //
1069 // /**
1070 // * Sweep all unlocked funds according to the given request.
1071 // *
1072 // * @param request is the sweep configuration
1073 // * @return the resulting transactions
1074 // */
1075 // public List<monero_tx_wallet> sweepAllUnlocked(monero_send_request request);
1076 //
1077 // /**
1078 // * Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.
1079 // *
1080 // * NOTE: Dust only exists pre RCT, so this method will return "no dust to sweep" on new wallets.
1081 // *
1082 // * @return the resulting transactions from sweeping dust
1083 // */
1084 // public List<monero_tx_wallet> sweep_dust();
1085 
1092  virtual monero_tx_set sweep_dust(bool do_not_relay = false) {
1093  throw runtime_error("sweep_dust() not supported");
1094  }
1095 
1102  virtual monero_tx_set parse_tx_set(const monero_tx_set& tx_set) {
1103  throw runtime_error("parse_tx_set() not supported");
1104  }
1105 
1112  virtual string sign(const string& msg) const {
1113  throw runtime_error("sign() not supported");
1114  }
1115 
1124  virtual bool verify(const string& msg, const string& address, const string& signature) const {
1125  throw runtime_error("verify() not supported");
1126  }
1127 
1134  virtual string get_tx_key(const string& tx_hash) const {
1135  throw runtime_error("get_tx_key() not supported");
1136  }
1137 
1146  virtual shared_ptr<monero_check_tx> check_tx_key(const string& tx_hash, const string& txKey, const string& address) const {
1147  throw runtime_error("check_tx_key() not supported");
1148  }
1149 
1150 // /**
1151 // * Get a transaction signature to prove it.
1152 // *
1153 // * @param tx_hash specifies the transaction to prove
1154 // * @param address is the destination public address of the transaction
1155 // * @return the transaction signature
1156 // */
1157 // string get_tx_proof(const string& tx_hash, const string& address) const;
1158 
1167  virtual string get_tx_proof(const string& tx_hash, const string& address, const string& message) const {
1168  throw runtime_error("get_tx_proof() not supported");
1169  }
1170 
1180  virtual shared_ptr<monero_check_tx> check_tx_proof(const string& tx_hash, const string& address, const string& message, const string& signature) const {
1181  throw runtime_error("check_tx_proof() not supported");
1182  }
1183 
1184 // /**
1185 // * Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.
1186 // *
1187 // * @param tx_hash specifies the transaction to prove
1188 // * @return the transaction signature
1189 // */
1190 // string get_spend_proof(const string& tx_hash) const;
1191 
1199  virtual string get_spend_proof(const string& tx_hash, const string& message) const {
1200  throw runtime_error("get_spend_proof() not supported");
1201  }
1202 
1211  virtual bool check_spend_proof(const string& tx_hash, const string& message, const string& signature) const {
1212  throw runtime_error("check_spend_proof() not supported");
1213  }
1214 
1221  virtual string get_reserve_proof_wallet(const string& message) const {
1222  throw runtime_error("get_reserve_proof_wallet() not supported");
1223  }
1224 
1233  virtual string get_reserve_proof_account(uint32_t account_idx, uint64_t amount, const string& message) const {
1234  throw runtime_error("get_reserve_proof_account() not supported");
1235  }
1236 
1245  virtual shared_ptr<monero_check_reserve> check_reserve_proof(const string& address, const string& message, const string& signature) const {
1246  throw runtime_error("check_reserve_proof() not supported");
1247  }
1248 
1255  virtual string get_tx_note(const string& tx_hash) const {
1256  throw runtime_error("get_tx_note() not supported");
1257  }
1258 
1265  virtual vector<string> get_tx_notes(const vector<string>& tx_hashes) const {
1266  throw runtime_error("get_tx_notes() not supported");
1267  }
1268 
1275  virtual void set_tx_note(const string& tx_hash, const string& note) {
1276  throw runtime_error("set_tx_note() not supported");
1277  }
1278 
1285  virtual void set_tx_notes(const vector<string>& tx_hashes, const vector<string>& notes) {
1286  throw runtime_error("set_tx_notes() not supported");
1287  }
1288 
1295  virtual vector<monero_address_book_entry> get_address_book_entries(const vector<uint64_t>& indices) const {
1296  throw runtime_error("get_address_book_entries() not supported");
1297  }
1298 
1306  virtual uint64_t add_address_book_entry(const string& address, const string& description, const string& payment_id = "") {
1307  throw runtime_error("add_address_book_entry() not supported");
1308  }
1309 
1321  virtual void edit_address_book_entry(uint64_t index, bool set_address, const string& address, bool set_description, const string& description, bool set_payment_id = false, const string& payment_id = "") {
1322  throw runtime_error("edit_address_book_entry() not supported");
1323  }
1324 
1330  virtual void delete_address_book_entry(uint64_t index) {
1331  throw runtime_error("delete_address_book_entry() not supported");
1332  }
1333 
1334 // /**
1335 // * Tag accounts.
1336 // *
1337 // * @param tag is the tag to apply to the specified accounts
1338 // * @param accountIndices are the indices of the accounts to tag
1339 // */
1340 // public void tagAccounts(string tag, Collection<Integer> accountIndices);
1341 //
1342 // /**
1343 // * Untag acconts.
1344 // *
1345 // * @param accountIndices are the indices of the accounts to untag
1346 // */
1347 // public void untagAccounts(Collection<Integer> accountIndices);
1348 //
1349 // /**
1350 // * Return all account tags.
1351 // *
1352 // * @return the wallet's account tags
1353 // */
1354 // public List<MoneroAccountTag> getAccountTags();
1355 //
1356 // /**
1357 // * Sets a human-readable description for a tag.
1358 // *
1359 // * @param tag is the tag to set a description for
1360 // * @param label is the label to set for the tag
1361 // */
1362 // public void setAccountTagLabel(string tag, string label);
1363 
1370  virtual string create_payment_uri(const monero_send_request& request) const {
1371  throw runtime_error("create_payment_uri() not supported");
1372  }
1373 
1380  virtual shared_ptr<monero_send_request> parse_payment_uri(const string& uri) const {
1381  throw runtime_error("parse_payment_uri() not supported");
1382  }
1383 
1391  virtual bool get_attribute(const string& key, string& value) const {
1392  throw runtime_error("get_attribute() not supported");
1393  }
1394 
1401  virtual void set_attribute(const string& key, const string& val) {
1402  throw runtime_error("set_attribute() not supported");
1403  }
1404 
1412  virtual void start_mining(boost::optional<uint64_t> num_threads, boost::optional<bool> background_mining, boost::optional<bool> ignore_battery) {
1413  throw runtime_error("start_mining() not supported");
1414  }
1415 
1419  virtual void stop_mining() {
1420  throw runtime_error("stop_mining() not supported");
1421  }
1422 
1428  virtual uint64_t wait_for_next_block() {
1429  throw runtime_error("wait_for_next_block() not supported");
1430  }
1431 
1437  virtual bool is_multisig_import_needed() const {
1438  throw runtime_error("is_multisig_import_needed() not supported");
1439  }
1440 
1441  // bool is_multisig()
1442 
1449  throw runtime_error("get_multisig_info() not supported");
1450  }
1451 
1458  virtual string prepare_multisig() {
1459  throw runtime_error("prepare_multisig() not supported");
1460  }
1461 
1470  virtual monero_multisig_init_result make_multisig(const vector<string>& multisig_hexes, int threshold, const string& password) {
1471  throw runtime_error("make_multisig() not supported");
1472  }
1473 
1483  virtual monero_multisig_init_result exchange_multisig_keys(const vector<string>& mutisig_hexes, const string& password) {
1484  throw runtime_error("exchange_multisig_keys() not supported");
1485  }
1486 
1492  virtual string get_multisig_hex() {
1493  throw runtime_error("get_multisig_hex() not supported");
1494  }
1495 
1506  virtual int import_multisig_hex(const vector<string>& multisig_hexes) {
1507  throw runtime_error("import_multisig_hex() not supported");
1508  }
1509 
1516  virtual monero_multisig_sign_result sign_multisig_tx_hex(const string& multisig_tx_hex) {
1517  throw runtime_error("monero_multisig_sign_result() not supported");
1518  }
1519 
1526  virtual vector<string> submit_multisig_tx_hex(const string& signed_multisig_tx_hex) {
1527  throw runtime_error("submit_multisig_tx_hex() not supported");
1528  }
1529 
1533  virtual void save() {
1534  throw runtime_error("save() not supported");
1535  }
1536 
1543  virtual void move_to(string path, string password) {
1544  throw runtime_error("move_to() not supported");
1545  }
1546 
1552  virtual void close(bool save = false) {
1553  throw runtime_error("close() not supported");
1554  }
1555  };
1556 }
virtual uint64_t add_address_book_entry(const string &address, const string &description, const string &payment_id="")
Definition: monero_wallet.h:1306
Definition: monero_wallet_model.h:407
virtual string get_tx_key(const string &tx_hash) const
Definition: monero_wallet.h:1134
Definition: monero_daemon.cpp:58
virtual void rescan_blockchain()
Definition: monero_wallet.h:474
virtual void add_listener(monero_wallet_listener &listener)
Definition: monero_wallet.h:380
virtual uint64_t get_daemon_max_peer_height() const
Definition: monero_wallet.h:371
virtual monero_multisig_sign_result sign_multisig_tx_hex(const string &multisig_tx_hex)
Definition: monero_wallet.h:1516
virtual monero_network_type get_network_type() const
Definition: monero_wallet.h:220
virtual string get_spend_proof(const string &tx_hash, const string &message) const
Definition: monero_wallet.h:1199
Definition: monero_wallet.h:123
virtual void close(bool save=false)
Definition: monero_wallet.h:1552
virtual monero_tx_set parse_tx_set(const monero_tx_set &tx_set)
Definition: monero_wallet.h:1102
virtual string get_public_view_key() const
Definition: monero_wallet.h:247
virtual string get_mnemonic_language() const
Definition: monero_wallet.h:238
virtual void move_to(string path, string password)
Definition: monero_wallet.h:1543
virtual vector< string > get_tx_notes(const vector< string > &tx_hashes) const
Definition: monero_wallet.h:1265
virtual bool is_connected() const
Definition: monero_wallet.h:166
virtual string get_primary_address() const
Definition: monero_wallet.h:283
Definition: monero_wallet_model.h:318
virtual ~monero_wallet()
Definition: monero_wallet.h:130
virtual set< monero_wallet_listener * > get_listeners()
Definition: monero_wallet.h:396
virtual string get_outputs_hex() const
Definition: monero_wallet.h:802
virtual monero_version get_version() const
Definition: monero_wallet.h:202
virtual monero_account create_account(const string &label="")
Definition: monero_wallet.h:612
virtual void on_output_spent(const monero_output_wallet &output)
Definition: monero_wallet.h:112
virtual vector< shared_ptr< monero_output_wallet > > get_outputs(const monero_output_query &query) const
Definition: monero_wallet.h:793
virtual monero_tx_set send(uint32_t account_index, string address, uint64_t amount)
Definition: monero_wallet.h:951
virtual string get_public_spend_key() const
Definition: monero_wallet.h:265
virtual uint64_t get_unlocked_balance() const
Definition: monero_wallet.h:520
virtual string get_mnemonic() const
Definition: monero_wallet.h:229
virtual vector< shared_ptr< monero_key_image > > get_key_images() const
Definition: monero_wallet.h:821
virtual void set_daemon_connection(const string &uri, const string &username="", const string &password="")
Definition: monero_wallet.h:139
virtual monero_tx_set sweep_output(const monero_send_request &request)
Definition: monero_wallet.h:1019
Definition: monero_wallet.h:90
virtual vector< monero_address_book_entry > get_address_book_entries(const vector< uint64_t > &indices) const
Definition: monero_wallet.h:1295
virtual vector< string > relay_txs(const vector< shared_ptr< monero_tx_wallet >> &txs)
Definition: monero_wallet.h:927
Definition: monero_wallet.h:72
virtual shared_ptr< monero_send_request > parse_payment_uri(const string &uri) const
Definition: monero_wallet.h:1380
virtual vector< monero_subaddress > get_subaddresses(const uint32_t account_idx, const vector< uint32_t > &subaddress_indices) const
Definition: monero_wallet.h:633
virtual monero_tx_set send_split(const monero_send_request &request)
Definition: monero_wallet.h:976
virtual uint64_t get_balance() const
Definition: monero_wallet.h:490
virtual string get_private_view_key() const
Definition: monero_wallet.h:256
virtual monero_tx_set create_txs(monero_send_request &request)
Definition: monero_wallet.h:887
virtual string get_reserve_proof_wallet(const string &message) const
Definition: monero_wallet.h:1221
Definition: monero_wallet_model.h:421
Definition: monero_wallet_model.h:274
virtual monero_subaddress get_address_index(const string &address) const
Definition: monero_wallet.h:305
virtual vector< shared_ptr< monero_tx_wallet > > get_txs(const monero_tx_query &query) const
Definition: monero_wallet.h:697
virtual void start_mining(boost::optional< uint64_t > num_threads, boost::optional< bool > background_mining, boost::optional< bool > ignore_battery)
Definition: monero_wallet.h:1412
virtual void set_daemon_connection(const monero_rpc_connection &connection)
Definition: monero_wallet.h:148
virtual uint64_t get_balance(uint32_t account_idx, uint32_t subaddress_idx) const
Definition: monero_wallet.h:511
virtual vector< monero_account > get_accounts() const
Definition: monero_wallet.h:550
virtual vector< monero_tx_set > sweep_unlocked(const monero_send_request &request)
Definition: monero_wallet.h:1009
virtual monero_integrated_address decode_integrated_address(const string &integrated_address) const
Definition: monero_wallet.h:326
virtual void stop_syncing()
Definition: monero_wallet.h:450
virtual uint64_t get_daemon_height() const
Definition: monero_wallet.h:362
virtual vector< string > submit_multisig_tx_hex(const string &signed_multisig_tx_hex)
Definition: monero_wallet.h:1526
virtual monero_integrated_address get_integrated_address(const string &standard_address="", const string &payment_id="") const
Definition: monero_wallet.h:316
Definition: monero_wallet_model.h:431
virtual bool is_multisig_import_needed() const
Definition: monero_wallet.h:1437
virtual string get_address(const uint32_t account_idx, const uint32_t subaddress_idx) const
Definition: monero_wallet.h:294
virtual vector< shared_ptr< monero_tx_wallet > > get_txs(const monero_tx_query &query, vector< string > &missing_tx_hashes) const
Definition: monero_wallet.h:709
Definition: monero_daemon_model.h:101
virtual void stop_mining()
Definition: monero_wallet.h:1419
Definition: monero_wallet_model.h:246
virtual void start_syncing()
Definition: monero_wallet.h:443
monero_send_priority
Definition: monero_wallet_model.h:329
virtual monero_tx_set create_tx(uint32_t account_index, string address, uint64_t amount)
Definition: monero_wallet.h:862
virtual void edit_address_book_entry(uint64_t index, bool set_address, const string &address, bool set_description, const string &description, bool set_payment_id=false, const string &payment_id="")
Definition: monero_wallet.h:1321
virtual string get_private_spend_key() const
Definition: monero_wallet.h:274
virtual vector< string > relay_txs(const vector< string > &tx_metadatas)
Definition: monero_wallet.h:917
virtual void set_tx_notes(const vector< string > &tx_hashes, const vector< string > &notes)
Definition: monero_wallet.h:1285
virtual string get_tx_proof(const string &tx_hash, const string &address, const string &message) const
Definition: monero_wallet.h:1167
virtual monero_tx_set send(uint32_t account_index, string address, uint64_t amount, monero_send_priority priority)
Definition: monero_wallet.h:965
virtual int import_multisig_hex(const vector< string > &multisig_hexes)
Definition: monero_wallet.h:1506
Definition: monero_wallet_model.h:68
Definition: monero_wallet_model.h:304
virtual vector< monero_account > get_accounts(const string &tag) const
Definition: monero_wallet.h:570
virtual shared_ptr< monero_check_tx > check_tx_key(const string &tx_hash, const string &txKey, const string &address) const
Definition: monero_wallet.h:1146
virtual monero_tx_set send(const monero_send_request &request)
Definition: monero_wallet.h:938
virtual void on_output_received(const monero_output_wallet &output)
Definition: monero_wallet.h:105
virtual void set_restore_height(uint64_t restore_height)
Definition: monero_wallet.h:353
virtual monero_sync_result sync(monero_sync_listener &listener)
Definition: monero_wallet.h:415
virtual vector< monero_account > get_accounts(bool include_subaddresses) const
Definition: monero_wallet.h:560
virtual uint64_t get_restore_height() const
Definition: monero_wallet.h:344
virtual shared_ptr< monero_check_reserve > check_reserve_proof(const string &address, const string &message, const string &signature) const
Definition: monero_wallet.h:1245
virtual uint64_t get_unlocked_balance(uint32_t account_idx, uint32_t subaddress_idx) const
Definition: monero_wallet.h:541
virtual monero_tx_set create_tx(monero_send_request &request)
Definition: monero_wallet.h:849
virtual vector< monero_subaddress > get_subaddresses(const uint32_t account_idx) const
Definition: monero_wallet.h:622
Definition: monero_wallet_model.h:225
Definition: monero_wallet_model.h:339
virtual void on_new_block(uint64_t height)
Definition: monero_wallet.h:98
virtual monero_account get_account(const uint32_t account_idx, bool include_subaddresses) const
Definition: monero_wallet.h:602
Definition: monero_wallet_model.h:97
virtual void save()
Definition: monero_wallet.h:1533
virtual monero_tx_set sweep_dust(bool do_not_relay=false)
Definition: monero_wallet.h:1092
virtual shared_ptr< monero_check_tx > check_tx_proof(const string &tx_hash, const string &address, const string &message, const string &signature) const
Definition: monero_wallet.h:1180
Definition: monero_daemon_model.h:113
Definition: monero_wallet_model.h:80
virtual bool is_synced() const
Definition: monero_wallet.h:193
virtual string sign(const string &msg) const
Definition: monero_wallet.h:1112
virtual void on_sync_progress(uint64_t height, uint64_t start_height, uint64_t end_height, double percent_done, const string &message)
Definition: monero_wallet.h:84
virtual bool is_daemon_trusted() const
Definition: monero_wallet.h:184
virtual monero_sync_result sync(uint64_t start_height, monero_sync_listener &listener)
Definition: monero_wallet.h:436
virtual bool get_attribute(const string &key, string &value) const
Definition: monero_wallet.h:1391
virtual string relay_tx(const monero_tx_wallet &tx)
Definition: monero_wallet.h:907
Definition: monero_wallet_model.h:205
virtual monero_subaddress create_subaddress(uint32_t account_idx, const string &label="")
Definition: monero_wallet.h:655
virtual string get_reserve_proof_account(uint32_t account_idx, uint64_t amount, const string &message) const
Definition: monero_wallet.h:1233
virtual string get_tx_note(const string &tx_hash) const
Definition: monero_wallet.h:1255
virtual string get_multisig_hex()
Definition: monero_wallet.h:1492
virtual shared_ptr< monero_key_image_import_result > import_key_images(const vector< shared_ptr< monero_key_image >> &key_images)
Definition: monero_wallet.h:831
virtual string create_payment_uri(const monero_send_request &request) const
Definition: monero_wallet.h:1370
virtual void rescan_spent()
Definition: monero_wallet.h:463
virtual int import_outputs_hex(const string &outputs_hex)
Definition: monero_wallet.h:812
virtual bool check_spend_proof(const string &tx_hash, const string &message, const string &signature) const
Definition: monero_wallet.h:1211
virtual monero_multisig_info get_multisig_info()
Definition: monero_wallet.h:1448
virtual uint64_t get_balance(uint32_t account_idx) const
Definition: monero_wallet.h:500
Definition: monero_wallet_model.h:183
virtual monero_sync_result sync(uint64_t start_height)
Definition: monero_wallet.h:425
virtual uint64_t wait_for_next_block()
Definition: monero_wallet.h:1428
virtual void delete_address_book_entry(uint64_t index)
Definition: monero_wallet.h:1330
virtual uint64_t get_unlocked_balance(uint32_t account_idx) const
Definition: monero_wallet.h:530
monero_network_type
Definition: monero_daemon_model.h:92
virtual monero_tx_set create_tx(int account_index, string address, uint64_t amount, monero_send_priority priority)
Definition: monero_wallet.h:876
virtual monero_sync_result sync()
Definition: monero_wallet.h:405
virtual void set_attribute(const string &key, const string &val)
Definition: monero_wallet.h:1401
virtual monero_multisig_init_result make_multisig(const vector< string > &multisig_hexes, int threshold, const string &password)
Definition: monero_wallet.h:1470
virtual monero_multisig_init_result exchange_multisig_keys(const vector< string > &mutisig_hexes, const string &password)
Definition: monero_wallet.h:1483
virtual vector< shared_ptr< monero_transfer > > get_transfers(const monero_transfer_query &query) const
Definition: monero_wallet.h:768
virtual void remove_listener(monero_wallet_listener &listener)
Definition: monero_wallet.h:389
virtual monero_subaddress get_subaddress(const uint32_t account_idx, const uint32_t subaddress_idx) const
Definition: monero_wallet.h:644
virtual bool verify(const string &msg, const string &address, const string &signature) const
Definition: monero_wallet.h:1124
virtual void set_tx_note(const string &tx_hash, const string &note)
Definition: monero_wallet.h:1275
virtual string relay_tx(const string &tx_metadata)
Definition: monero_wallet.h:897
virtual bool is_daemon_synced() const
Definition: monero_wallet.h:175
virtual string prepare_multisig()
Definition: monero_wallet.h:1458
virtual vector< monero_account > get_accounts(bool include_subaddresses, const string &tag) const
Definition: monero_wallet.h:581
virtual uint64_t get_height() const
Definition: monero_wallet.h:335
virtual string get_path() const
Definition: monero_wallet.h:211
virtual vector< shared_ptr< monero_tx_wallet > > get_txs() const
Definition: monero_wallet.h:673
Definition: monero_wallet_core.cpp:657
virtual shared_ptr< monero_rpc_connection > get_daemon_connection() const
Definition: monero_wallet.h:157
virtual monero_account get_account(uint32_t account_idx) const
Definition: monero_wallet.h:591