diff options
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 034dd693b..4fb8407d2 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -230,6 +230,13 @@ namespace tools cryptonote::subaddress_index m_subaddr_index; }; + struct address_tx : payment_details + { + bool m_coinbase; + bool m_mempool; + bool m_incoming; + }; + struct unconfirmed_transfer_details { cryptonote::transaction_prefix m_tx; @@ -423,6 +430,15 @@ namespace tools */ bool is_deterministic() const; bool get_seed(std::string& electrum_words, const std::string &passphrase = std::string()) const; + + /*! + * \brief Checks if light wallet. A light wallet sends view key to a server where the blockchain is scanned. + */ + bool light_wallet() const { return m_light_wallet; } + void set_light_wallet(bool light_wallet) { m_light_wallet = light_wallet; } + uint64_t get_light_wallet_scanned_block_height() const { return m_light_wallet_scanned_block_height; } + uint64_t get_light_wallet_blockchain_height() const { return m_light_wallet_blockchain_height; } + /*! * \brief Gets the seed language */ @@ -715,6 +731,24 @@ namespace tools uint64_t get_fee_multiplier(uint32_t priority, int fee_algorithm = -1); uint64_t get_per_kb_fee(); + // Light wallet specific functions + // fetch unspent outs from lw node and store in m_transfers + void light_wallet_get_unspent_outs(); + // fetch txs and store in m_payments + void light_wallet_get_address_txs(); + // get_address_info + bool light_wallet_get_address_info(cryptonote::COMMAND_RPC_GET_ADDRESS_INFO::response &response); + // Login. new_address is true if address hasn't been used on lw node before. + bool light_wallet_login(bool &new_address); + // Send an import request to lw node. returns info about import fee, address and payment_id + bool light_wallet_import_wallet_request(cryptonote::COMMAND_RPC_IMPORT_WALLET_REQUEST::response &response); + // get random outputs from light wallet server + void light_wallet_get_outs(std::vector<std::vector<get_outs_entry>> &outs, const std::list<size_t> &selected_transfers, size_t fake_outputs_count); + // Parse rct string + bool light_wallet_parse_rct_str(const std::string& rct_string, const crypto::public_key& tx_pub_key, uint64_t internal_output_index, rct::key& decrypted_mask, rct::key& rct_commit, bool decrypt) const; + // check if key image is ours + bool light_wallet_key_image_is_ours(const crypto::key_image& key_image, const crypto::public_key& tx_public_key, uint64_t out_index); + private: /*! * \brief Stores wallet information to wallet file. |