From 9cd53bbfa35450f01dc0a454fa8d0c872c178e1f Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 12 Dec 2019 12:58:37 -0500 Subject: [PATCH] update sample code --- README.md | 7 ++++--- test/sample_code.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a4e6ce5..727e33e 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,14 @@ Note: This API might change depending on feedback, such as changing structs to c ```c++ // create a wallet from a mnemonic phrase string 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"; -monero_wallet* wallet_restored = monero_wallet::create_wallet_from_mnemonic( +monero_wallet* wallet_restored = monero_wallet_core::create_wallet_from_mnemonic( "MyWalletRestored", // wallet path and name "supersecretpassword123", // wallet password monero_network_type::STAGENET, // network type mnemonic, // mnemonic phrase monero_rpc_connection("http://localhost:38081"), // daemon connection - 380104 // restore height + 380104, // restore height + "" // seed offset ); // synchronize the wallet and receive progress notifications @@ -75,7 +76,7 @@ output_query.m_is_spent = false; vector> outputs = wallet_restored->get_outputs(output_query); // create and sync a new wallet with a random mnemonic phrase -monero_wallet* wallet_random = monero_wallet::create_wallet_random( +monero_wallet* wallet_random = monero_wallet_core::create_wallet_random( "MyWalletRandom", // wallet path and name "supersecretpassword123", // wallet password monero_network_type::STAGENET, // network type diff --git a/test/sample_code.cpp b/test/sample_code.cpp index 4c636f0..397afbd 100644 --- a/test/sample_code.cpp +++ b/test/sample_code.cpp @@ -1,7 +1,7 @@ #include #include #include "wallet2.h" -#include "wallet/monero_wallet.h" +#include "wallet/monero_wallet_core.h" using namespace std; @@ -21,13 +21,14 @@ int main(int argc, const char* argv[]) { // create a wallet from a mnemonic phrase string 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"; - monero_wallet* wallet_restored = monero_wallet::create_wallet_from_mnemonic( + monero_wallet* wallet_restored = monero_wallet_core::create_wallet_from_mnemonic( "MyWalletRestored", // wallet path and name "supersecretpassword123", // wallet password monero_network_type::STAGENET, // network type mnemonic, // mnemonic phrase monero_rpc_connection("http://localhost:38081"), // daemon connection - 380104 // restore height + 380104, // restore height + "" // seed offset ); // synchronize the wallet and receive progress notifications @@ -68,7 +69,7 @@ int main(int argc, const char* argv[]) { vector> outputs = wallet_restored->get_outputs(output_query); // create and sync a new wallet with a random mnemonic phrase - monero_wallet* wallet_random = monero_wallet::create_wallet_random( + monero_wallet* wallet_random = monero_wallet_core::create_wallet_random( "MyWalletRandom", // wallet path and name "supersecretpassword123", // wallet password monero_network_type::STAGENET, // network type