mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
refactor mnemonic to seed (breaking change)
This commit is contained in:
@@ -19,9 +19,9 @@ int main(int argc, const char* argv[]) {
|
||||
// mlog_configure("log_cpp_sample_code.txt", true);
|
||||
// mlog_set_log_level(1);
|
||||
|
||||
// create a wallet from a mnemonic phrase
|
||||
// create a wallet from a seed phrase
|
||||
monero_wallet_config wallet_config;
|
||||
wallet_config.m_mnemonic = "hefty value later extra artistic firm radar yodel talent future fungal nutshell because sanity awesome nail unjustly rage unafraid cedar delayed thumbs comb custom sanity";
|
||||
wallet_config.m_seed = "hefty value later extra artistic firm radar yodel talent future fungal nutshell because sanity awesome nail unjustly rage unafraid cedar delayed thumbs comb custom sanity";
|
||||
wallet_config.m_path = "MyWalletRestored";
|
||||
wallet_config.m_password = "supersecretpassword123";
|
||||
wallet_config.m_network_type = monero_network_type::STAGENET;
|
||||
@@ -70,7 +70,7 @@ int main(int argc, const char* argv[]) {
|
||||
output_query.m_is_spent = false;
|
||||
vector<shared_ptr<monero_output_wallet>> outputs = wallet_restored->get_outputs(output_query);
|
||||
|
||||
// create and sync a new wallet with a random mnemonic phrase
|
||||
// create and sync a new wallet with a random seed
|
||||
wallet_config = monero_wallet_config();
|
||||
wallet_config.m_path = "MyWalletRandom";
|
||||
wallet_config.m_password = "supersecretpassword123";
|
||||
@@ -86,7 +86,7 @@ int main(int argc, const char* argv[]) {
|
||||
wallet_random->start_syncing(5000);
|
||||
|
||||
// get wallet info
|
||||
string random_mnemonic = wallet_random->get_mnemonic();
|
||||
string random_seed = wallet_random->get_seed();
|
||||
string random_primary = wallet_random->get_primary_address();
|
||||
uint64_t random_height = wallet_random->get_height();
|
||||
bool random_is_synced = wallet_random->is_synced();
|
||||
|
||||
Reference in New Issue
Block a user