|
Monero C++ Library
|
Enumerations | |
| enum | monero_network_type : uint8_t { MAINNET = 0, TESTNET, STAGENET } |
| enum | monero_send_priority : uint8_t { DEFAULT = 0, UNIMPORTANT, NORMAL, ELEVATED } |
Functions | |
| void | merge_tx (vector< shared_ptr< monero_tx >> &txs, const shared_ptr< monero_tx > &tx) |
| bool | bool_equals (bool val, const boost::optional< bool > &opt_val) |
| shared_ptr< monero_tx_wallet > | build_tx_with_incoming_transfer (const tools::wallet2 &m_w2, uint64_t height, const crypto::hash &payment_id, const tools::wallet2::payment_details &pd) |
| shared_ptr< monero_tx_wallet > | build_tx_with_outgoing_transfer (const tools::wallet2 &m_w2, uint64_t height, const crypto::hash &txid, const tools::wallet2::confirmed_transfer_details &pd) |
| shared_ptr< monero_tx_wallet > | build_tx_with_incoming_transfer_unconfirmed (const tools::wallet2 &m_w2, const crypto::hash &payment_id, const tools::wallet2::pool_payment_details &ppd) |
| shared_ptr< monero_tx_wallet > | build_tx_with_outgoing_transfer_unconfirmed (const tools::wallet2 &m_w2, const crypto::hash &txid, const tools::wallet2::unconfirmed_transfer_details &pd) |
| shared_ptr< monero_tx_wallet > | build_tx_with_vout (const tools::wallet2 &m_w2, const tools::wallet2::transfer_details &td) |
| void | merge_tx (const shared_ptr< monero_tx_wallet > &tx, map< string, shared_ptr< monero_tx_wallet >> &tx_map, map< uint64_t, shared_ptr< monero_block >> &block_map, bool skip_if_absent) |
| bool | tx_height_less_than (const shared_ptr< monero_tx > &tx1, const shared_ptr< monero_tx > &tx2) |
| bool | incoming_transfer_before (const shared_ptr< monero_incoming_transfer > &transfer1, const shared_ptr< monero_incoming_transfer > &transfer2) |
| bool | vout_before (const shared_ptr< monero_output > &o1, const shared_ptr< monero_output > &o2) |
| std::string | get_default_ringdb_path (cryptonote::network_type nettype) |
| bool | validate_transfer (wallet2 *m_w2, const std::list< wallet_rpc::transfer_destination > &destinations, const std::string &payment_id, std::vector< cryptonote::tx_destination_entry > &dsts, std::vector< uint8_t > &extra, bool at_least_one_destination, epee::json_rpc::error &er) |
| template<typename Ts , typename Tu > | |
| bool | fill_response (wallet2 *m_w2, std::vector< tools::wallet2::pending_tx > &ptx_vector, bool get_tx_key, Ts &tx_key, Tu &amount, Tu &fee, std::string &multisig_txset, std::string &unsigned_txset, bool do_not_relay, Ts &tx_hash, bool get_tx_hex, Ts &tx_blob, bool get_tx_metadata, Ts &tx_metadata, epee::json_rpc::error &er) |
| void | merge_incoming_transfer (vector< shared_ptr< monero_incoming_transfer >> &transfers, const shared_ptr< monero_incoming_transfer > &transfer) |
| shared_ptr< monero_block > | node_to_block_query (const boost::property_tree::ptree &node) |
Copyright (c) 2017-2019 woodser
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Parts of this file are originally copyright (c) 2014-2019, The Monero Project
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developersPublic library intereface.
Public library interface.
Copyright (c) 2017-2019 woodser
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Parts of this file are originally copyright (c) 2014-2019, The Monero Project
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developersPublic library interface.
Public interface for libmonero-cpp library.
| enum monero::monero_network_type : uint8_t |
Enumerates Monero network types.
| enum monero::monero_send_priority : uint8_t |
Enumerates Monero network types.
| bool monero::incoming_transfer_before | ( | const shared_ptr< monero_incoming_transfer > & | transfer1, |
| const shared_ptr< monero_incoming_transfer > & | transfer2 | ||
| ) |
Returns true iff transfer1 is ordered before transfer2 by ascending account and subaddress indices.
| void monero::merge_tx | ( | const shared_ptr< monero_tx_wallet > & | tx, |
| map< string, shared_ptr< monero_tx_wallet >> & | tx_map, | ||
| map< uint64_t, shared_ptr< monero_block >> & | block_map, | ||
| bool | skip_if_absent | ||
| ) |
Merges a transaction into a unique set of transactions.
TODO monero-core: skip_if_absent only necessary because incoming payments not returned when sent from/to same account #4500
| tx | is the transaction to merge into the existing txs |
| tx_map | maps tx hashes to txs |
| block_map | maps block heights to blocks |
| skip_if_absent | specifies if the tx should not be added if it doesn't already exist |
| bool monero::tx_height_less_than | ( | const shared_ptr< monero_tx > & | tx1, |
| const shared_ptr< monero_tx > & | tx2 | ||
| ) |
Returns true iff tx1's height is known to be less than tx2's height for sorting.
| bool monero::validate_transfer | ( | wallet2 * | m_w2, |
| const std::list< wallet_rpc::transfer_destination > & | destinations, | ||
| const std::string & | payment_id, | ||
| std::vector< cryptonote::tx_destination_entry > & | dsts, | ||
| std::vector< uint8_t > & | extra, | ||
| bool | at_least_one_destination, | ||
| epee::json_rpc::error & | er | ||
| ) |
-------------— DUPLICATED WALLET RPC TRANSFER CODE ------------------—
These functions are duplicated from private functions in wallet rpc on_transfer/on_transfer_split, with minor modifications to not be class members.
This code is used to generate and send transactions with equivalent functionality as wallet rpc.
Duplicated code is not ideal. Solutions considered:
(1) Duplicate wallet rpc code as done here. (2) Modify monero-wallet-rpc on_transfer() / on_transfer_split() to be public. (3) Modify monero-wallet-rpc to make this class a friend. (4) Move all logic in monero-wallet-rpc to wallet2 so all users can access.
Options 2-4 require modification of Monero Core C++. Of those, (4) is probably ideal. TODO: open patch on Monero core which moves common wallet rpc logic (e.g. on_transfer, on_transfer_split) to m_w2.
Until then, option (1) is used because it allows Monero Core binaries to be used without modification, it's easy, and anything other than (4) is temporary.
| bool monero::vout_before | ( | const shared_ptr< monero_output > & | o1, |
| const shared_ptr< monero_output > & | o2 | ||
| ) |
Returns true iff wallet vout1 is ordered before vout2 by ascending account and subaddress indices then index.
1.8.15