55 #include "monero_wallet_model.h" 83 virtual void on_sync_progress(uint64_t height, uint64_t start_height, uint64_t end_height,
double percent_done,
const std::string& message) {}
131 throw std::runtime_error(
"is_view_only() not supported");
141 virtual void set_daemon_connection(
const std::string& uri,
const std::string& username =
"",
const std::string& password =
"") {
142 throw std::runtime_error(
"set_daemon_connection() not supported");
151 throw std::runtime_error(
"set_daemon_connection() not supported");
160 throw std::runtime_error(
"get_daemon_connection() not supported");
169 throw std::runtime_error(
"is_connected() not supported");
178 throw std::runtime_error(
"is_daemon_synced() not supported");
187 throw std::runtime_error(
"is_daemon_trusted() not supported");
196 throw std::runtime_error(
"is_synced() not supported");
205 throw std::runtime_error(
"get_version() not supported");
214 throw std::runtime_error(
"get_path() not supported");
223 throw std::runtime_error(
"get_network_type() not supported");
232 throw std::runtime_error(
"get_mnemonic() not supported");
241 throw std::runtime_error(
"get_mnemonic_language() not supported");
250 throw std::runtime_error(
"get_public_view_key() not supported");
259 throw std::runtime_error(
"get_private_view_key() not supported");
268 throw std::runtime_error(
"get_public_spend_key() not supported");
277 throw std::runtime_error(
"get_private_spend_key() not supported");
296 virtual std::string
get_address(
const uint32_t account_idx,
const uint32_t subaddress_idx)
const {
297 throw std::runtime_error(
"get_address() not supported");
308 throw std::runtime_error(
"get_address_index() not supported");
319 throw std::runtime_error(
"get_integrated_address() not supported");
329 throw std::runtime_error(
"decode_integrated_address() not supported");
338 throw std::runtime_error(
"get_height() not supported");
347 throw std::runtime_error(
"get_sync_height() not supported");
356 throw std::runtime_error(
"set_sync_height() not supported");
365 throw std::runtime_error(
"get_daemon_height() not supported");
374 throw std::runtime_error(
"get_daemon_max_peer_height() not supported");
383 throw std::runtime_error(
"add_listener() not supported");
392 throw std::runtime_error(
"remove_listener() not supported");
399 throw std::runtime_error(
"get_listeners() not supported");
408 throw std::runtime_error(
"sync() not supported");
418 throw std::runtime_error(
"sync() not supported");
428 throw std::runtime_error(
"sync() not supported");
439 throw std::runtime_error(
"sync() not supported");
446 throw std::runtime_error(
"start_syncing() not supported");
453 throw std::runtime_error(
"stop_syncing() not supported");
466 throw std::runtime_error(
"rescan_spent() not supported");
477 throw std::runtime_error(
"rescan_blockchain() not supported");
486 throw std::runtime_error(
"get_balance() not supported");
496 throw std::runtime_error(
"get_balance() not supported");
506 virtual uint64_t
get_balance(uint32_t account_idx, uint32_t subaddress_idx)
const {
507 throw std::runtime_error(
"get_balance() not supported");
516 throw std::runtime_error(
"get_unlocked_balance() not supported");
526 throw std::runtime_error(
"get_unlocked_balance() not supported");
537 throw std::runtime_error(
"get_unlocked_balance() not supported");
555 virtual std::vector<monero_account>
get_accounts(
bool include_subaddresses)
const {
565 virtual std::vector<monero_account>
get_accounts(
const std::string& tag)
const {
576 virtual std::vector<monero_account>
get_accounts(
bool include_subaddresses,
const std::string& tag)
const {
577 throw std::runtime_error(
"get_accounts() not supported");
598 throw std::runtime_error(
"get_account() not supported");
608 throw std::runtime_error(
"create_account() not supported");
617 virtual std::vector<monero_subaddress>
get_subaddresses(
const uint32_t account_idx)
const {
628 virtual std::vector<monero_subaddress>
get_subaddresses(
const uint32_t account_idx,
const std::vector<uint32_t>& subaddress_indices)
const {
629 throw std::runtime_error(
"get_subaddresses() not supported");
640 throw std::runtime_error(
"get_subaddress() not supported");
651 throw std::runtime_error(
"create_subaddress() not supported");
660 virtual std::vector<std::shared_ptr<monero_tx_wallet>>
get_txs()
const {
661 throw std::runtime_error(
"get_txs() not supported");
677 throw std::runtime_error(
"get_txs(query) not supported");
688 virtual std::vector<std::shared_ptr<monero_tx_wallet>>
get_txs(
const monero_tx_query& query, std::vector<std::string>& missing_tx_hashes)
const {
689 throw std::runtime_error(
"get_txs(query, missing_tx_hashes) not supported");
709 throw std::runtime_error(
"get_transfers() not supported");
725 throw std::runtime_error(
"get_outputs() not supported");
734 throw std::runtime_error(
"get_outputs_hex() not supported");
744 throw std::runtime_error(
"import_outputs_hex() not supported");
753 throw std::runtime_error(
"get_key_images() not supported");
762 virtual std::shared_ptr<monero_key_image_import_result>
import_key_images(
const std::vector<std::shared_ptr<monero_key_image>>& key_images) {
763 throw std::runtime_error(
"import_key_images() not supported");
773 if (config.m_can_split != boost::none && config.m_can_split.get())
throw std::runtime_error(
"Cannot split transactions with create_tx(); use create_txs() instead");
775 config_copy.m_can_split =
false;
786 throw std::runtime_error(
"create_txs() not supported");
796 throw std::runtime_error(
"sweep_unlocked() not supported");
806 throw std::runtime_error(
"sweep_output() not supported");
815 virtual std::vector<std::shared_ptr<monero_tx_wallet>>
sweep_dust(
bool relay =
false) {
816 throw std::runtime_error(
"sweep_dust() not supported");
825 virtual std::string
relay_tx(
const std::string& tx_metadata) {
826 std::vector<std::string> tx_metadatas;
827 tx_metadatas.push_back(tx_metadata);
838 return relay_tx(tx.m_metadata.get());
847 virtual std::vector<std::string>
relay_txs(
const std::vector<std::shared_ptr<monero_tx_wallet>>& txs) {
848 std::vector<std::string> tx_hexes;
849 for (
const std::shared_ptr<monero_tx_wallet>& tx : txs) tx_hexes.push_back(tx->m_metadata.get());
859 virtual std::vector<std::string>
relay_txs(
const std::vector<std::string>& tx_metadatas) {
860 throw std::runtime_error(
"relay_txs() not supported");
870 throw std::runtime_error(
"parse_tx_set() not supported");
879 virtual std::string
sign_txs(
const std::string& unsigned_tx_hex) {
880 throw std::runtime_error(
"sign_txs() not supported");
889 virtual std::vector<std::string>
submit_txs(
const std::string& signed_tx_hex) {
890 throw std::runtime_error(
"submit_txs() not supported");
900 throw std::runtime_error(
"sign_message() not supported");
911 virtual bool verify_message(
const std::string& msg,
const std::string& address,
const std::string& signature)
const {
912 throw std::runtime_error(
"verify_message() not supported");
921 virtual std::string
get_tx_key(
const std::string& tx_hash)
const {
922 throw std::runtime_error(
"get_tx_key() not supported");
933 virtual std::shared_ptr<monero_check_tx>
check_tx_key(
const std::string& tx_hash,
const std::string& tx_key,
const std::string& address)
const {
934 throw std::runtime_error(
"check_tx_key() not supported");
945 virtual std::string
get_tx_proof(
const std::string& tx_hash,
const std::string& address,
const std::string& message)
const {
946 throw std::runtime_error(
"get_tx_proof() not supported");
958 virtual std::shared_ptr<monero_check_tx>
check_tx_proof(
const std::string& tx_hash,
const std::string& address,
const std::string& message,
const std::string& signature)
const {
959 throw std::runtime_error(
"check_tx_proof() not supported");
969 virtual std::string
get_spend_proof(
const std::string& tx_hash,
const std::string& message)
const {
970 throw std::runtime_error(
"get_spend_proof() not supported");
981 virtual bool check_spend_proof(
const std::string& tx_hash,
const std::string& message,
const std::string& signature)
const {
982 throw std::runtime_error(
"check_spend_proof() not supported");
992 throw std::runtime_error(
"get_reserve_proof_wallet() not supported");
1004 throw std::runtime_error(
"get_reserve_proof_account() not supported");
1015 virtual std::shared_ptr<monero_check_reserve>
check_reserve_proof(
const std::string& address,
const std::string& message,
const std::string& signature)
const {
1016 throw std::runtime_error(
"check_reserve_proof() not supported");
1026 throw std::runtime_error(
"get_tx_note() not supported");
1035 virtual std::vector<std::string>
get_tx_notes(
const std::vector<std::string>& tx_hashes)
const {
1036 throw std::runtime_error(
"get_tx_notes() not supported");
1045 virtual void set_tx_note(
const std::string& tx_hash,
const std::string& note) {
1046 throw std::runtime_error(
"set_tx_note() not supported");
1055 virtual void set_tx_notes(
const std::vector<std::string>& tx_hashes,
const std::vector<std::string>& notes) {
1056 throw std::runtime_error(
"set_tx_notes() not supported");
1066 throw std::runtime_error(
"get_address_book_entries() not supported");
1077 throw std::runtime_error(
"add_address_book_entry() not supported");
1089 virtual void edit_address_book_entry(uint64_t index,
bool set_address,
const std::string& address,
bool set_description,
const std::string& description) {
1090 throw std::runtime_error(
"edit_address_book_entry() not supported");
1099 throw std::runtime_error(
"delete_address_book_entry() not supported");
1109 throw std::runtime_error(
"create_payment_uri() not supported");
1119 throw std::runtime_error(
"parse_payment_uri() not supported");
1130 throw std::runtime_error(
"get_attribute() not supported");
1140 throw std::runtime_error(
"set_attribute() not supported");
1150 virtual void start_mining(boost::optional<uint64_t> num_threads, boost::optional<bool> background_mining, boost::optional<bool> ignore_battery) {
1151 throw std::runtime_error(
"start_mining() not supported");
1158 throw std::runtime_error(
"stop_mining() not supported");
1167 throw std::runtime_error(
"wait_for_next_block() not supported");
1176 throw std::runtime_error(
"is_multisig_import_needed() not supported");
1187 throw std::runtime_error(
"get_multisig_info() not supported");
1197 throw std::runtime_error(
"prepare_multisig() not supported");
1209 throw std::runtime_error(
"make_multisig() not supported");
1222 throw std::runtime_error(
"exchange_multisig_keys() not supported");
1231 throw std::runtime_error(
"get_multisig_hex() not supported");
1245 throw std::runtime_error(
"import_multisig_hex() not supported");
1255 throw std::runtime_error(
"monero_multisig_sign_result() not supported");
1265 throw std::runtime_error(
"submit_multisig_tx_hex() not supported");
1272 throw std::runtime_error(
"save() not supported");
1281 virtual void move_to(std::string path, std::string password) {
1282 throw std::runtime_error(
"move_to() not supported");
1291 throw std::runtime_error(
"close() not supported");
Definition: monero_wallet_model.h:414
virtual void edit_address_book_entry(uint64_t index, bool set_address, const std::string &address, bool set_description, const std::string &description)
Definition: monero_wallet.h:1089
Definition: monero_daemon.cpp:58
virtual void rescan_blockchain()
Definition: monero_wallet.h:476
virtual void add_listener(monero_wallet_listener &listener)
Definition: monero_wallet.h:382
virtual uint64_t get_daemon_max_peer_height() const
Definition: monero_wallet.h:373
virtual std::vector< std::shared_ptr< monero_tx_wallet > > get_txs(const monero_tx_query &query) const
Definition: monero_wallet.h:676
virtual monero_network_type get_network_type() const
Definition: monero_wallet.h:222
virtual int import_outputs_hex(const std::string &outputs_hex)
Definition: monero_wallet.h:743
Definition: monero_wallet.h:115
virtual monero_multisig_sign_result sign_multisig_tx_hex(const std::string &multisig_tx_hex)
Definition: monero_wallet.h:1254
virtual std::string get_primary_address() const
Definition: monero_wallet.h:285
virtual void close(bool save=false)
Definition: monero_wallet.h:1290
virtual monero_tx_set parse_tx_set(const monero_tx_set &tx_set)
Definition: monero_wallet.h:869
virtual std::string get_spend_proof(const std::string &tx_hash, const std::string &message) const
Definition: monero_wallet.h:969
virtual bool is_connected() const
Definition: monero_wallet.h:168
virtual monero_sync_result sync(monero_wallet_listener &listener)
Definition: monero_wallet.h:417
virtual monero_multisig_init_result make_multisig(const std::vector< std::string > &multisig_hexes, int threshold, const std::string &password)
Definition: monero_wallet.h:1208
Definition: monero_wallet_model.h:322
virtual std::string prepare_multisig()
Definition: monero_wallet.h:1196
virtual std::shared_ptr< monero_key_image_import_result > import_key_images(const std::vector< std::shared_ptr< monero_key_image >> &key_images)
Definition: monero_wallet.h:762
virtual ~monero_wallet()
Definition: monero_wallet.h:122
virtual bool check_spend_proof(const std::string &tx_hash, const std::string &message, const std::string &signature) const
Definition: monero_wallet.h:981
virtual bool get_attribute(const std::string &key, std::string &value) const
Definition: monero_wallet.h:1129
virtual std::shared_ptr< monero_check_tx > check_tx_proof(const std::string &tx_hash, const std::string &address, const std::string &message, const std::string &signature) const
Definition: monero_wallet.h:958
virtual monero_version get_version() const
Definition: monero_wallet.h:204
virtual monero_multisig_init_result exchange_multisig_keys(const std::vector< std::string > &mutisig_hexes, const std::string &password)
Definition: monero_wallet.h:1221
virtual void on_output_spent(const monero_output_wallet &output)
Definition: monero_wallet.h:104
virtual uint64_t get_unlocked_balance() const
Definition: monero_wallet.h:515
virtual std::string get_path() const
Definition: monero_wallet.h:213
Definition: monero_wallet.h:71
virtual std::vector< std::string > get_tx_notes(const std::vector< std::string > &tx_hashes) const
Definition: monero_wallet.h:1035
virtual std::vector< monero_account > get_accounts(bool include_subaddresses) const
Definition: monero_wallet.h:555
virtual std::string sign_txs(const std::string &unsigned_tx_hex)
Definition: monero_wallet.h:879
virtual uint64_t get_balance() const
Definition: monero_wallet.h:485
virtual std::vector< monero_account > get_accounts() const
Definition: monero_wallet.h:545
Definition: monero_wallet_model.h:428
virtual std::vector< monero_subaddress > get_subaddresses(const uint32_t account_idx, const std::vector< uint32_t > &subaddress_indices) const
Definition: monero_wallet.h:628
Definition: monero_wallet_model.h:278
virtual void start_mining(boost::optional< uint64_t > num_threads, boost::optional< bool > background_mining, boost::optional< bool > ignore_battery)
Definition: monero_wallet.h:1150
virtual std::string get_private_spend_key() const
Definition: monero_wallet.h:276
virtual uint64_t get_balance(uint32_t account_idx, uint32_t subaddress_idx) const
Definition: monero_wallet.h:506
virtual boost::optional< monero_rpc_connection > get_daemon_connection() const
Definition: monero_wallet.h:159
virtual std::string create_payment_uri(const monero_tx_config &config) const
Definition: monero_wallet.h:1108
virtual void stop_syncing()
Definition: monero_wallet.h:452
virtual uint64_t get_daemon_height() const
Definition: monero_wallet.h:364
virtual std::vector< std::shared_ptr< monero_tx_wallet > > sweep_dust(bool relay=false)
Definition: monero_wallet.h:815
Definition: monero_wallet_model.h:438
virtual std::string get_outputs_hex() const
Definition: monero_wallet.h:733
virtual bool is_multisig_import_needed() const
Definition: monero_wallet.h:1175
virtual monero_integrated_address decode_integrated_address(const std::string &integrated_address) const
Definition: monero_wallet.h:328
Definition: monero_daemon_model.h:99
virtual void stop_mining()
Definition: monero_wallet.h:1157
virtual std::vector< std::string > submit_multisig_tx_hex(const std::string &signed_multisig_tx_hex)
Definition: monero_wallet.h:1264
Definition: monero_wallet_model.h:244
virtual void set_attribute(const std::string &key, const std::string &val)
Definition: monero_wallet.h:1139
virtual std::vector< monero_account > get_accounts(bool include_subaddresses, const std::string &tag) const
Definition: monero_wallet.h:576
virtual void start_syncing()
Definition: monero_wallet.h:445
virtual std::shared_ptr< monero_check_tx > check_tx_key(const std::string &tx_hash, const std::string &tx_key, const std::string &address) const
Definition: monero_wallet.h:933
virtual std::vector< std::string > relay_txs(const std::vector< std::shared_ptr< monero_tx_wallet >> &txs)
Definition: monero_wallet.h:847
virtual std::string get_address(const uint32_t account_idx, const uint32_t subaddress_idx) const
Definition: monero_wallet.h:296
virtual void set_daemon_connection(const std::string &uri, const std::string &username="", const std::string &password="")
Definition: monero_wallet.h:141
virtual std::string relay_tx(const monero_tx_wallet &tx)
Definition: monero_wallet.h:837
virtual std::string relay_tx(const std::string &tx_metadata)
Definition: monero_wallet.h:825
virtual std::string get_tx_key(const std::string &tx_hash) const
Definition: monero_wallet.h:921
virtual std::shared_ptr< monero_tx_config > parse_payment_uri(const std::string &uri) const
Definition: monero_wallet.h:1118
virtual std::vector< std::shared_ptr< monero_output_wallet > > get_outputs(const monero_output_query &query) const
Definition: monero_wallet.h:724
virtual std::string get_tx_note(const std::string &tx_hash) const
Definition: monero_wallet.h:1025
virtual void set_tx_note(const std::string &tx_hash, const std::string ¬e)
Definition: monero_wallet.h:1045
virtual std::string sign_message(const std::string &msg) const
Definition: monero_wallet.h:899
Definition: monero_wallet_model.h:67
virtual std::string get_reserve_proof_account(uint32_t account_idx, uint64_t amount, const std::string &message) const
Definition: monero_wallet.h:1003
Definition: monero_wallet_model.h:308
virtual monero_integrated_address get_integrated_address(const std::string &standard_address="", const std::string &payment_id="") const
Definition: monero_wallet.h:318
virtual monero_subaddress get_address_index(const std::string &address) const
Definition: monero_wallet.h:307
virtual std::string get_private_view_key() const
Definition: monero_wallet.h:258
virtual std::vector< std::shared_ptr< monero_transfer > > get_transfers(const monero_transfer_query &query) const
Definition: monero_wallet.h:708
virtual void set_sync_height(uint64_t sync_height)
Definition: monero_wallet.h:355
virtual void on_output_received(const monero_output_wallet &output)
Definition: monero_wallet.h:97
virtual monero_account create_account(const std::string &label="")
Definition: monero_wallet.h:607
virtual std::string get_multisig_hex()
Definition: monero_wallet.h:1230
virtual uint64_t get_unlocked_balance(uint32_t account_idx, uint32_t subaddress_idx) const
Definition: monero_wallet.h:536
virtual std::vector< std::string > submit_txs(const std::string &signed_tx_hex)
Definition: monero_wallet.h:889
virtual std::string get_public_view_key() const
Definition: monero_wallet.h:249
virtual uint64_t add_address_book_entry(const std::string &address, const std::string &description)
Definition: monero_wallet.h:1076
virtual std::vector< std::shared_ptr< monero_tx_wallet > > get_txs(const monero_tx_query &query, std::vector< std::string > &missing_tx_hashes) const
Definition: monero_wallet.h:688
Definition: monero_wallet_model.h:225
virtual std::vector< std::shared_ptr< monero_key_image > > get_key_images() const
Definition: monero_wallet.h:752
virtual void on_new_block(uint64_t height)
Definition: monero_wallet.h:90
virtual monero_account get_account(const uint32_t account_idx, bool include_subaddresses) const
Definition: monero_wallet.h:597
virtual std::string get_tx_proof(const std::string &tx_hash, const std::string &address, const std::string &message) const
Definition: monero_wallet.h:945
Definition: monero_wallet_model.h:96
virtual void save()
Definition: monero_wallet.h:1271
virtual std::shared_ptr< monero_tx_wallet > sweep_output(const monero_tx_config &config)
Definition: monero_wallet.h:805
virtual std::string get_reserve_proof_wallet(const std::string &message) const
Definition: monero_wallet.h:991
virtual std::string get_public_spend_key() const
Definition: monero_wallet.h:267
Definition: monero_wallet_model.h:79
virtual bool is_synced() const
Definition: monero_wallet.h:195
virtual std::shared_ptr< monero_tx_wallet > create_tx(const monero_tx_config &config)
Definition: monero_wallet.h:772
virtual bool is_daemon_trusted() const
Definition: monero_wallet.h:186
virtual monero_subaddress create_subaddress(uint32_t account_idx, const std::string &label="")
Definition: monero_wallet.h:650
Definition: monero_wallet_model.h:205
virtual void rescan_spent()
Definition: monero_wallet.h:465
virtual void set_daemon_connection(const boost::optional< monero_rpc_connection > &connection)
Definition: monero_wallet.h:150
virtual monero_multisig_info get_multisig_info()
Definition: monero_wallet.h:1186
virtual uint64_t get_balance(uint32_t account_idx) const
Definition: monero_wallet.h:495
virtual std::string get_mnemonic_language() const
Definition: monero_wallet.h:240
Definition: monero_wallet_model.h:183
virtual std::vector< monero_subaddress > get_subaddresses(const uint32_t account_idx) const
Definition: monero_wallet.h:617
virtual monero_sync_result sync(uint64_t start_height)
Definition: monero_wallet.h:427
virtual uint64_t wait_for_next_block()
Definition: monero_wallet.h:1166
virtual void delete_address_book_entry(uint64_t index)
Definition: monero_wallet.h:1098
virtual bool is_view_only() const
Definition: monero_wallet.h:130
virtual uint64_t get_unlocked_balance(uint32_t account_idx) const
Definition: monero_wallet.h:525
monero_network_type
Definition: monero_daemon_model.h:90
virtual uint64_t get_sync_height() const
Definition: monero_wallet.h:346
virtual std::vector< std::shared_ptr< monero_tx_wallet > > sweep_unlocked(const monero_tx_config &config)
Definition: monero_wallet.h:795
virtual monero_sync_result sync()
Definition: monero_wallet.h:407
virtual void remove_listener(monero_wallet_listener &listener)
Definition: monero_wallet.h:391
virtual monero_subaddress get_subaddress(const uint32_t account_idx, const uint32_t subaddress_idx) const
Definition: monero_wallet.h:639
virtual void set_tx_notes(const std::vector< std::string > &tx_hashes, const std::vector< std::string > ¬es)
Definition: monero_wallet.h:1055
virtual std::vector< monero_account > get_accounts(const std::string &tag) const
Definition: monero_wallet.h:565
virtual int import_multisig_hex(const std::vector< std::string > &multisig_hexes)
Definition: monero_wallet.h:1244
virtual void move_to(std::string path, std::string password)
Definition: monero_wallet.h:1281
virtual std::shared_ptr< monero_check_reserve > check_reserve_proof(const std::string &address, const std::string &message, const std::string &signature) const
Definition: monero_wallet.h:1015
virtual void on_sync_progress(uint64_t height, uint64_t start_height, uint64_t end_height, double percent_done, const std::string &message)
Definition: monero_wallet.h:83
virtual std::vector< std::shared_ptr< monero_tx_wallet > > get_txs() const
Definition: monero_wallet.h:660
virtual std::vector< monero_address_book_entry > get_address_book_entries(const std::vector< uint64_t > &indices) const
Definition: monero_wallet.h:1065
virtual bool is_daemon_synced() const
Definition: monero_wallet.h:177
virtual std::string get_mnemonic() const
Definition: monero_wallet.h:231
virtual uint64_t get_height() const
Definition: monero_wallet.h:337
virtual monero_sync_result sync(uint64_t start_height, monero_wallet_listener &listener)
Definition: monero_wallet.h:438
virtual std::vector< std::string > relay_txs(const std::vector< std::string > &tx_metadatas)
Definition: monero_wallet.h:859
virtual std::set< monero_wallet_listener * > get_listeners()
Definition: monero_wallet.h:398
Definition: monero_wallet_model.h:343
virtual std::vector< std::shared_ptr< monero_tx_wallet > > create_txs(const monero_tx_config &config)
Definition: monero_wallet.h:785
Definition: monero_wallet_core.cpp:679
virtual bool verify_message(const std::string &msg, const std::string &address, const std::string &signature) const
Definition: monero_wallet.h:911
virtual monero_account get_account(uint32_t account_idx) const
Definition: monero_wallet.h:586