From 6629a07789e72dc6cb0576733cb6e0167c5b0192 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 25 Aug 2019 13:56:18 -0400 Subject: [PATCH] update readme sample with multisig --- README.md | 12 ++++++------ todo.txt | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6478b4d..fc67b0a 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ This library may be used to build Monero-related applications, such as GUIs, lib - Cohesive APIs and models with rigorous focus on ease-of-use - Query wallet transactions, transfers, and outputs by their many attributes - Be notified when blocks are added to the chain, as the wallet synchronizes, or when the wallet sends or receives funds -- Supports multisig -- Tested by over 100 JUnit tests in [native Java library](https://github.com/monero-ecosystem/monero-java) +- Full multisig support +- Tested by over 100 JUnit tests using a [native Java library](https://github.com/monero-ecosystem/monero-java) ## Sample Code @@ -102,7 +102,7 @@ struct : monero_wallet_listener { wallet_random->add_listener(my_listener); // send funds from the restored wallet to the random wallet -shared_ptr sent_tx = wallet_restored->send(0, wallet_random->get_address(1, 0), 50000); +shared_ptr sent_tx = wallet_restored->send(0, wallet_random->get_address(1, 0), 50000).m_txs[0]; bool in_pool = sent_tx->m_in_tx_pool.get(); // true // mine with 7 threads to push the network along @@ -129,8 +129,8 @@ destinations.push_back(make_shared(wallet_random->get_addres destinations.push_back(make_shared(wallet_random->get_address(2, 0), 50000)); send_request.m_destinations = destinations; -// create the transaction, confirm with the user, and relay to the network which notifies the recipient wallet -shared_ptr created_tx = wallet_restored->create_tx(send_request); +// create the transaction, confirm with the user, and relay to the network +shared_ptr created_tx = wallet_restored->create_tx(send_request).m_txs[0]; uint64_t fee = created_tx->m_fee.get(); // "Are you sure you want to send ...?" wallet_restored->relay_tx(*created_tx); // submit the transaction to the Monero network which will notify the recipient wallet ``` @@ -188,7 +188,7 @@ This project is licensed under MIT. Donations are gratefully accepted. Thank you for your support!

- +

`46FR1GKVqFNQnDiFkH7AuzbUBrGQwz2VdaXTDD4jcjRE8YkkoTYTmZ2Vohsz9gLSqkj5EM6ai9Q7sBoX4FPPYJdGKQQXPVz` \ No newline at end of file diff --git a/todo.txt b/todo.txt index ddd2395..f899cff 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,4 @@ TODO -update readme: "Tested by over 100 passing JUnit tests using a Java JNI library." monero_wallet.cpp move utilities in monero_namespace to be private polish model: no boost::optional? no boost::optional? etc ensure model toPropertyTrees(), etc are not unecessarily copying return objects