Monero C++ Library
Loading...
Searching...
No Matches
monero_wallet_keys.h
1
53#pragma once
54
55#include "monero_wallet.h"
56#include "cryptonote_basic/account.h"
57
58using namespace monero;
59
63namespace monero {
64
69
70 public:
71
72 // --------------------------- STATIC WALLET UTILS --------------------------
73
80
87
94
100 static std::vector<std::string> get_seed_languages();
101
102 // ----------------------------- WALLET METHODS -----------------------------
103
108
112 bool is_view_only() const override { return m_is_view_only; }
113 monero_version get_version() const override;
114 monero_network_type get_network_type() const override { return m_network_type; }
115 std::string get_seed() const override { return m_seed; }
116 std::string get_seed_language() const override { return m_language; }
117 std::string get_private_view_key() const override { return m_prv_view_key; }
118 std::string get_private_spend_key() const override { return m_prv_spend_key; }
119 std::string get_public_view_key() const override { return m_pub_view_key; }
120 std::string get_public_spend_key() const override { return m_pub_spend_key; }
121 std::string get_primary_address() const override { return m_primary_address; }
122 std::string get_address(const uint32_t account_idx, const uint32_t subaddress_idx) const override;
123 monero_integrated_address get_integrated_address(const std::string& standard_address = "", const std::string& payment_id = "") const override;
124 monero_integrated_address decode_integrated_address(const std::string& integrated_address) const override;
125 monero_account get_account(const uint32_t account_idx, bool include_subaddresses) const override;
126 std::vector<monero_subaddress> get_subaddresses(const uint32_t account_idx, const std::vector<uint32_t>& subaddress_indices) const override;
127 std::string sign_message(const std::string& msg, monero_message_signature_type signature_type, uint32_t account_idx = 0, uint32_t subaddress_idx = 0) const override;
128 monero_message_signature_result verify_message(const std::string& msg, const std::string& address, const std::string& signature) const override;
129 void close(bool save = false) override;
130
131 // --------------------------------- PRIVATE --------------------------------
132
133 private:
134 bool m_is_view_only;
135 monero_network_type m_network_type;
136 cryptonote::account_base m_account;
137 std::string m_seed;
138 std::string m_language;
139 std::string m_pub_view_key;
140 std::string m_prv_view_key;
141 std::string m_pub_spend_key;
142 std::string m_prv_spend_key;
143 std::string m_primary_address;
144
145 void init_common();
146 };
147}
Definition monero_wallet_keys.h:68
monero_account get_account(const uint32_t account_idx, bool include_subaddresses) const override
Definition monero_wallet_keys.cpp:255
static monero_wallet_keys * create_wallet_from_keys(const monero_wallet_config &config)
Definition monero_wallet_keys.cpp:136
std::string get_private_view_key() const override
Definition monero_wallet_keys.h:117
void close(bool save=false) override
Definition monero_wallet_keys.cpp:304
static monero_wallet_keys * create_wallet_random(const monero_wallet_config &config)
Definition monero_wallet_keys.cpp:76
std::vector< monero_subaddress > get_subaddresses(const uint32_t account_idx, const std::vector< uint32_t > &subaddress_indices) const override
Definition monero_wallet_keys.cpp:271
monero_version get_version() const override
Definition monero_wallet_keys.cpp:231
monero_message_signature_result verify_message(const std::string &msg, const std::string &address, const std::string &signature) const override
Definition monero_wallet_keys.cpp:299
bool is_view_only() const override
Definition monero_wallet_keys.h:112
static std::vector< std::string > get_seed_languages()
Definition monero_wallet_keys.cpp:218
std::string sign_message(const std::string &msg, monero_message_signature_type signature_type, uint32_t account_idx=0, uint32_t subaddress_idx=0) const override
Definition monero_wallet_keys.cpp:294
std::string get_seed_language() const override
Definition monero_wallet_keys.h:116
~monero_wallet_keys()
Definition monero_wallet_keys.cpp:226
std::string get_public_spend_key() const override
Definition monero_wallet_keys.h:120
monero_integrated_address get_integrated_address(const std::string &standard_address="", const std::string &payment_id="") const override
Definition monero_wallet_keys.cpp:245
static monero_wallet_keys * create_wallet_from_seed(const monero_wallet_config &config)
Definition monero_wallet_keys.cpp:101
std::string get_primary_address() const override
Definition monero_wallet_keys.h:121
std::string get_seed() const override
Definition monero_wallet_keys.h:115
std::string get_public_view_key() const override
Definition monero_wallet_keys.h:119
std::string get_address(const uint32_t account_idx, const uint32_t subaddress_idx) const override
Definition monero_wallet_keys.cpp:238
std::string get_private_spend_key() const override
Definition monero_wallet_keys.h:118
monero_integrated_address decode_integrated_address(const std::string &integrated_address) const override
Definition monero_wallet_keys.cpp:250
monero_network_type get_network_type() const override
Definition monero_wallet_keys.h:114
Definition monero_wallet.h:123
virtual void save()
Definition monero_wallet.h:1368
Definition monero_daemon.cpp:58
monero_message_signature_type
Definition monero_wallet_model.h:412
monero_network_type
Definition monero_daemon_model.h:90
Definition monero_wallet_model.h:123
Definition monero_wallet_model.h:350
Definition monero_wallet_model.h:420
Definition monero_daemon_model.h:99
Definition monero_wallet_model.h:67