aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-09-08wallet_rpc_server: error out if wallet-file and wallet-dir are both usedmoneromooo-monero1-1/+6
2018-09-05wallet rpc: Add close_wallet RPCGuillaume LE VAILLANT1-0/+42
And close the current wallet automatically if necessary when opening another wallet.
2018-09-04Merge pull request #4269luigi11111-0/+32
3d5abbe [#4027] add change_wallet_password wallet rpc command (artyomsol)
2018-08-23wallet: store trusted-daemon flag in wallet2stoffu1-23/+12
2018-08-22Merge pull request #4242luigi11111-0/+22
6fcdc9e rpc-wallet: refresh command added (ph4r05)
2018-08-22rpc-wallet: refresh command addedDusan Klinec1-0/+22
2018-08-17[#4027] add change_wallet_password wallet rpc commandartyomsol1-0/+32
2018-08-16store secret keys encrypted where possiblemoneromooo-monero1-5/+5
The secret spend key is kept encrypted in memory, and decrypted on the fly when needed. Both spend and view secret keys are kept encrypted in a JSON field in the keys file. This avoids leaving the keys in memory due to being manipulated by the JSON I/O API.
2018-08-16wallet: wipe seed from memory where appropriatemoneromooo-monero1-1/+3
2018-08-16wallet2: make --restricted-rpc available for wallet RPC onlystoffu1-32/+35
2018-08-15Merge pull request #4171luigi11111-4/+10
9127a8b wallet-rpc: filter getbalance response by address index (stoffu)
2018-08-15Merge pull request #4170luigi11111-0/+21
1c6cfd3 wallet-rpc: add get_address_index command (stoffu)
2018-08-15Merge pull request #4158luigi11111-1/+33
7db7ec8 wallet rpc: support making integrated address of given standard address (stoffu)
2018-08-03wallet: distinguish coinbase from other txes in show_transfersmoneromooo-monero1-1/+1
2018-07-31wallet-rpc: add get_address_index commandstoffu1-0/+21
2018-07-31wallet-rpc: filter getbalance response by address indexstoffu1-4/+10
2018-07-20wallet rpc: support making integrated address of given standard addressstoffu1-1/+33
2018-07-03Merge pull request #4035Riccardo Spagni1-0/+2
66df13a5 wallet-rpc.getaddress: throw if index is out of bound (stoffu)
2018-07-03Merge pull request #4005Riccardo Spagni1-0/+6
b85acb4c Fix RPC crashes that didn't check for an open wallet (Howard Chu)
2018-06-27Merge pull request #3907luigi11111-0/+19
dcbc17e wallet: include a suggested number of confirmations based on amount (moneromooo-monero)
2018-06-27Merge pull request #3998luigi11111-2/+2
8db23df wallet: on first refresh, start off with a quantized height (moneromooo-monero)
2018-06-27wallet: include a suggested number of confirmations based on amountmoneromooo-monero1-0/+19
This is based on how much an attacking miner stands to lose in block rewardy by mining a private chain which double spends a payment. This is not foolproof, since mining is based on luck, and breaks down as the attacking miner nears 50% of the network hash rate, and the estimation is based on a constant block reward.
2018-06-21wallet-rpc.getaddress: throw if index is out of boundstoffu1-0/+2
2018-06-16Merge pull request #3780luigi11111-7/+217
9c2a7b4 wallet-rpc: watch-only and cold wallet features added (ph4r05)
2018-06-15Fix RPC crashes that didn't check for an open walletHoward Chu1-0/+6
2018-06-13wallet: on first refresh, start off with a quantized heightmoneromooo-monero1-2/+2
for privacy reasons, so an untrusted node can't easily track wallets from IP address to IP address, etc. The granularity is 1024 blocks, which is about a day and a half.
2018-06-03wallet-rpc: watch-only and cold wallet features addedDusan Klinec1-7/+217
- unsigned_txset, signed_txset in transfer / submit_transfer / sign_transfer - export_outputs, import_outputs Squashed commits: [f4d9f3d4] wallet-rpc: do_not_relay removed from submit_transfer [5b16a86f] wallet-rpc: review-fix - method signature changes, renaming [b7fbb10a] wallet-rpc: naming fixes (unsigned vs signed), consts renamed [8c7d2727] wallet-rpc: sign_transfer added [481d024a] wallet2: sign_tx splitted to work with strings and structs, more granular [2a474db9] wallet-rpc: wallet2::load_unsigned_tx split to load from str, file [b1e3a018] wallet-rpc: review fix, load_tx_from_str variable rename [1f6373be] wallet-rpc: review fix: save_tx_to_{str,file} [2a08eafc] wallet-rpc: review comments fixes - redundant this removed from wallet2.cpp - load_tx_from_str, load_tx_from_file [43498052] wallet-rpc: submit_transfer added [9c45d1ad] wallet-rpc: watch_only check, return unsigned_txset [62831396] wallet2: added string variants to load_tx, save_tx - analogously to save_multisig_tx - required for monero-wallet-rpc to support watch-only wallet
2018-05-31Merge pull request #3640luigi11111-1/+7
f36132a wallet cli/rpc: terminate execution with code 0 when --help or --version is given (stoffu)
2018-04-22wallet cli/rpc: terminate execution with code 0 when --help or --version is ↵stoffu1-1/+7
given
2018-04-14wallet_rpc_server: add a get_version RPCmoneromooo-monero1-0/+6
2018-03-16Merge pull request #3336Riccardo Spagni1-1/+1
57c0b1ed Fix typos in various files (Dimitris Apostolou)
2018-03-15Fix typos in various filesDimitris Apostolou1-1/+1
2018-03-15wallet2+cli+rpc: eliminate redundant m_http_client from cli/rpc and delegate ↵stoffu1-5/+3
calls to wallet2
2018-03-05Merge pull request #3343Riccardo Spagni1-4/+36
3d452367 allow using ring size instead of mixin for rpc transfer (cryptochangements34)
2018-03-05allow using ring size instead of mixin for rpc transfercryptochangements341-4/+36
2018-03-05Stagenetstoffu1-15/+23
2018-02-20Merge pull request #3235Riccardo Spagni1-2/+3
6866ed46 Add default value to max_height, otherwise it's 0 (Michał Sałaban)
2018-02-16Merge pull request #3214Riccardo Spagni1-1/+1
214d251c wallet: suggest the use of sweep_unmixable when not_enough_outs_to_mix is thrown (stoffu)
2018-02-16Merge pull request #3207Riccardo Spagni1-6/+13
a99ef176 wallet-rpc: take subaddress account as arg for get_transfer_by_txid (stoffu) 77125096 wallet-rpc: rename *_INDEX_OUTOFBOUND into *_INDEX_OUT_OF_BOUNDS (stoffu)
2018-02-16Merge pull request #3197Riccardo Spagni1-0/+10
f90c76be Return appropriate error code when there's no connection to daemon (Michał Sałaban) 3cb65b3f Return appropriate error code when not enough money for tx (Michał Sałaban)
2018-02-16Merge pull request #3094Riccardo Spagni1-9/+9
a85dbb3f Fixed typos and wording tweaks (Maxithi)
2018-02-08wallet: suggest the use of sweep_unmixable when not_enough_outs_to_mix is thrownstoffu1-1/+1
2018-02-05Add default value to max_height, otherwise it's 0Michał Sałaban1-2/+3
2018-01-31wallet-rpc: take subaddress account as arg for get_transfer_by_txidstoffu1-4/+11
2018-01-31wallet-rpc: rename *_INDEX_OUTOFBOUND into *_INDEX_OUT_OF_BOUNDSstoffu1-2/+2
2018-01-29Fixed typos and wording tweaksMaxithi1-9/+9
2018-01-29Return appropriate error code when there's no connection to daemonMichał Sałaban1-0/+5
2018-01-28Return appropriate error code when not enough money for txMichał Sałaban1-0/+5
2018-01-28wallet: automatically use low priority if safe (no backlog & recent blocks ↵stoffu1-4/+8
not full)
2018-01-27Merge pull request #3114Riccardo Spagni1-0/+4
fb5c971c Allow retrieving spend key via RPC (Michał Sałaban)
2018-01-27Merge pull request #3113Riccardo Spagni1-2/+2
ffc2e570 wallet rpc: show fees when querying incoming transfers (stoffu)
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2018-01-26wallet rpc: show fees when querying incoming transfersstoffu1-2/+2
2018-01-25Merge pull request #3027Riccardo Spagni1-0/+60
6d40a920 Reserve proof (stoffu)
2018-01-25Merge pull request #3010Riccardo Spagni1-0/+4
07da9c80 Resolve addresses in get_transfers (Michał Sałaban)
2018-01-14Allow retrieving spend key via RPCMichał Sałaban1-0/+4
2018-01-10Reserve proofstoffu1-0/+60
2018-01-10Merge pull request #3002Riccardo Spagni1-0/+2
9996d5e9 wallet2: guard against the dameon sending blocks before last checkpoint (moneromooo-monero) eadaa6aa wallet_rpc_server: fix wallet leak on error exit (moneromooo-monero)
2018-01-10epee: remove dependency on commonmoneromooo-monero1-1/+2
2018-01-02Merge pull request #2967Riccardo Spagni1-301/+103
55556fab wallet_rpc_server: factor transfer info return and add missing info (moneromooo-monero)
2017-12-27Resolve addresses in get_transfersMichał Sałaban1-0/+4
2017-12-25Revert "return subaddress in get_bulk_payments"moneromooo-monero1-1/+0
This reverts commit b60f48f0e31c17638f771042887b2fffdbad15b4.
2017-12-25Merge pull request #2926Riccardo Spagni1-0/+70
6b5bd129 Account tagging (stoffu)
2017-12-25Merge pull request #2920Riccardo Spagni1-5/+19
bd5cce07 network_throttle: fix ineffective locking (moneromooo-monero) e0a61299 network_throttle: remove unused xxx static member (moneromooo-monero) 24f584d9 cryptonote_core: remove unused functions with off by one bugs (moneromooo-monero) b1634aa3 blockchain: don't leave dangling pointers in this (moneromooo-monero) 8e60b81c cryptonote_core: fix db leak on error (moneromooo-monero) 213e326c abstract_tcp_server2: log init_server errors as fatal (moneromooo-monero) b51dc566 use const refs in for loops for non tiny types (moneromooo-monero) f0568ca6 net_parse_helpers: fix regex error checking (moneromooo-monero) b49ddc76 check accessing an element past the end of a container (moneromooo-monero) 2305bf26 check return value for generate_key_derivation and derive_public_key (moneromooo-monero) a4240d9f catch const exceptions (moneromooo-monero) 45a1c4c0 add empty container sanity checks when using front() and back() (moneromooo-monero) 56fa6ce1 tests: fix a buffer overread in a unit test (moneromooo-monero) b4524892 rpc: guard against json parsing a non object (moneromooo-monero) c2ed8618 easylogging++: avoid buffer underflow (moneromooo-monero) 187a6ab2 epee: trap failure to parse URI from request (moneromooo-monero) 061789b5 checkpoints: trap failure to load JSON checkpoints (moneromooo-monero) ba2fefb9 checkpoints: pass std::string by const ref, not const value (moneromooo-monero) 38c8f4e0 mlog: terminate a string at last char, just in case (moneromooo-monero) d753d716 fix a few leaks by throwing objects, not newed pointers to objects (moneromooo-monero) fe568db8 p2p: use size_t for arbitrary counters instead of uint8_t (moneromooo-monero) 46d6fa35 cryptonote_protocol: sanity check chain hashes from peer (moneromooo-monero) 25584f86 cryptonote_protocol: print peer versions when unexpected (moneromooo-monero) 490a5d41 rpc: do not try to use an invalid txid in relay_tx (moneromooo-monero)
2017-12-25Merge pull request #2916Riccardo Spagni1-4/+18
a9217641 wallet-rpc: added receiving address to res of get(_bulk)_payments; selective addresses for getaddress (stoffu)
2017-12-25Merge pull request #2899Riccardo Spagni1-0/+1
b60f48f0 return subaddress in get_bulk_payments (Dmitriy Plekhanov)
2017-12-24wallet_rpc_server: fix wallet leak on error exitmoneromooo-monero1-0/+2
Makes it easier to debug leaks
2017-12-20wallet_rpc_server: factor transfer info return and add missing infomoneromooo-monero1-301/+103
Additional tx keys, amounts and fees were missing in some cases
2017-12-18check accessing an element past the end of a containermoneromooo-monero1-5/+12
2017-12-18add empty container sanity checks when using front() and back()moneromooo-monero1-0/+7
2017-12-18wallet-rpc: added receiving address to res of get(_bulk)_payments; selective ↵stoffu1-4/+18
addresses for getaddress
2017-12-18Account taggingstoffu1-0/+70
2017-12-17wallet: factor multisig info parsingmoneromooo-monero1-50/+1
2017-12-17wallet: use raw encrypted data in multisig import/export RPCmoneromooo-monero1-47/+7
2017-12-17wallet: add multisig sign/submit RPCmoneromooo-monero1-82/+361
2017-12-17Match surae's recommendation to derive multisig keysmoneromooo-monero1-3/+3
2017-12-17wallet: guard against partly initialized multisig walletmoneromooo-monero1-4/+25
2017-12-17add multisig core test and factor multisig building blocksmoneromooo-monero1-14/+1
2017-12-17N-1/N multisigmoneromooo-monero1-11/+93
2017-12-17multisig address generation RPCmoneromooo-monero1-0/+234
2017-12-17gen_multisig: generates multisig wallets if participants trust each othermoneromooo-monero1-0/+1
2017-12-17Add N/N multisig tx generation and signingmoneromooo-monero1-0/+1
Scheme by luigi1111: Multisig for RingCT on Monero 2 of 2 User A (coordinator): Spendkey b,B Viewkey a,A (shared) User B: Spendkey c,C Viewkey a,A (shared) Public Address: C+B, A Both have their own watch only wallet via C+B, a A will coordinate spending process (though B could easily as well, coordinator is more needed for more participants) A and B watch for incoming outputs B creates "half" key images for discovered output D: I2_D = (Hs(aR)+c) * Hp(D) B also creates 1.5 random keypairs (one scalar and 2 pubkeys; one on base G and one on base Hp(D)) for each output, storing the scalar(k) (linked to D), and sending the pubkeys with I2_D. A also creates "half" key images: I1_D = (Hs(aR)+b) * Hp(D) Then I_D = I1_D + I2_D Having I_D allows A to check spent status of course, but more importantly allows A to actually build a transaction prefix (and thus transaction). A builds the transaction until most of the way through MLSAG_Gen, adding the 2 pubkeys (per input) provided with I2_D to his own generated ones where they are needed (secret row L, R). At this point, A has a mostly completed transaction (but with an invalid/incomplete signature). A sends over the tx and includes r, which allows B (with the recipient's address) to verify the destination and amount (by reconstructing the stealth address and decoding ecdhInfo). B then finishes the signature by computing ss[secret_index][0] = ss[secret_index][0] + k - cc[secret_index]*c (secret indices need to be passed as well). B can then broadcast the tx, or send it back to A for broadcasting. Once B has completed the signing (and verified the tx to be valid), he can add the full I_D to his cache, allowing him to verify spent status as well. NOTE: A and B *must* present key A and B to each other with a valid signature proving they know a and b respectively. Otherwise, trickery like the following becomes possible: A creates viewkey a,A, spendkey b,B, and sends a,A,B to B. B creates a fake key C = zG - B. B sends C back to A. The combined spendkey C+B then equals zG, allowing B to spend funds at any time! The signature fixes this, because B does not know a c corresponding to C (and thus can't produce a signature). 2 of 3 User A (coordinator) Shared viewkey a,A "spendkey" j,J User B "spendkey" k,K User C "spendkey" m,M A collects K and M from B and C B collects J and M from A and C C collects J and K from A and B A computes N = nG, n = Hs(jK) A computes O = oG, o = Hs(jM) B anc C compute P = pG, p = Hs(kM) || Hs(mK) B and C can also compute N and O respectively if they wish to be able to coordinate Address: N+O+P, A The rest follows as above. The coordinator possesses 2 of 3 needed keys; he can get the other needed part of the signature/key images from either of the other two. Alternatively, if secure communication exists between parties: A gives j to B B gives k to C C gives m to A Address: J+K+M, A 3 of 3 Identical to 2 of 2, except the coordinator must collect the key images from both of the others. The transaction must also be passed an additional hop: A -> B -> C (or A -> C -> B), who can then broadcast it or send it back to A. N-1 of N Generally the same as 2 of 3, except participants need to be arranged in a ring to pass their keys around (using either the secure or insecure method). For example (ignoring viewkey so letters line up): [4 of 5] User: spendkey A: a B: b C: c D: d E: e a -> B, b -> C, c -> D, d -> E, e -> A Order of signing does not matter, it just must reach n-1 users. A "remaining keys" list must be passed around with the transaction so the signers know if they should use 1 or both keys. Collecting key image parts becomes a little messy, but basically every wallet sends over both of their parts with a tag for each. Thia way the coordinating wallet can keep track of which images have been added and which wallet they come from. Reasoning: 1. The key images must be added only once (coordinator will get key images for key a from both A and B, he must add only one to get the proper key actual key image) 2. The coordinator must keep track of which helper pubkeys came from which wallet (discussed in 2 of 2 section). The coordinator must choose only one set to use, then include his choice in the "remaining keys" list so the other wallets know which of their keys to use. You can generalize it further to N-2 of N or even M of N, but I'm not sure there's legitimate demand to justify the complexity. It might also be straightforward enough to support with minimal changes from N-1 format. You basically just give each user additional keys for each additional "-1" you desire. N-2 would be 3 keys per user, N-3 4 keys, etc. The process is somewhat cumbersome: To create a N/N multisig wallet: - each participant creates a normal wallet - each participant runs "prepare_multisig", and sends the resulting string to every other participant - each participant runs "make_multisig N A B C D...", with N being the threshold and A B C D... being the strings received from other participants (the threshold must currently equal N) As txes are received, participants' wallets will need to synchronize so that those new outputs may be spent: - each participant runs "export_multisig FILENAME", and sends the FILENAME file to every other participant - each participant runs "import_multisig A B C D...", with A B C D... being the filenames received from other participants Then, a transaction may be initiated: - one of the participants runs "transfer ADDRESS AMOUNT" - this partly signed transaction will be written to the "multisig_monero_tx" file - the initiator sends this file to another participant - that other participant runs "sign_multisig multisig_monero_tx" - the resulting transaction is written to the "multisig_monero_tx" file again - if the threshold was not reached, the file must be sent to another participant, until enough have signed - the last participant to sign runs "submit_multisig multisig_monero_tx" to relay the transaction to the Monero network
2017-12-08return subaddress in get_bulk_paymentsDmitriy Plekhanov1-0/+1
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero1-1/+2
2017-11-25Merge pull request #2823Riccardo Spagni1-21/+21
0d149f70 Add out-of-bound exceptions and handle them in RPC (Michał Sałaban)
2017-11-25Merge pull request #2368Riccardo Spagni1-0/+50
b0b7e0f0 Spend proof without txkey (stoffu)
2017-11-25Merge pull request #2788Riccardo Spagni1-3/+80
9739da1e wallet_rpc_server: new relay_tx command (moneromooo-monero) 01dc8297 wallet: transfer RPC can now return tx metadata (pending_tx) (moneromooo-monero) 83fa9047 serialization: add std::set and std::unordered_set serialization (moneromooo-monero)
2017-11-24wallet_rpc_server: new relay_tx commandmoneromooo-monero1-0/+41
It takes a full tx+metadata hex string as input
2017-11-24wallet: transfer RPC can now return tx metadata (pending_tx)moneromooo-monero1-3/+39
2017-11-21Spend proof without txkeystoffu1-0/+50
2017-11-21fix for tx proof: use exception instead of error_str when signature gen failedstoffu1-6/+1
2017-11-20Merge pull request #2768Riccardo Spagni1-5/+8
ef941855 Wallet RPC: Add prompt-for-password flag (Tim L)
2017-11-18Tx proof (revised):stoffu1-0/+161
- refactoring: proof generation/checking code was moved from simplewallet.cpp to wallet2.cpp - allow an arbitrary message to be signed together with txid - introduce two types (outbound & inbound) of tx proofs; with the same syntax, inbound is selected when <address> belongs to this wallet, outbound otherwise. see GitHub thread for more discussion - wallet RPC: added get_tx_key, check_tx_key, get_tx_proof, check_tx_proof - wallet API: moved WalletManagerImpl::checkPayment to Wallet::checkTxKey, added Wallet::getTxProof/checkTxProof - get_tx_key/check_tx_key: handle additional tx keys by concatenating them into a single string
2017-11-15Wallet RPC: Add prompt-for-password flagTim L1-5/+8
2017-11-15Add out-of-bound exceptions and handle them in RPCMichał Sałaban1-21/+21
2017-11-15simplewallet: wrong ns for input_line in sweep_single (fix #2634)stoffu1-1/+1
2017-11-15wallet: add sweep_single commandstoffu1-0/+96
2017-11-14More missed readline dependencies thru scoped_message_writerHoward Chu1-2/+1
2017-11-14wallet: move some scoped_message_writer calls from the libsmoneromooo-monero1-1/+11
2017-11-14wallet: rejig to avoid prompting in wallet2moneromooo-monero1-5/+15
wallet2 is a library, and should not prompt for stdin. Instead, pass a function so simplewallet can prompt on stdin, and a GUI might display a window, etc.
2017-11-14Merge pull request #2756Riccardo Spagni1-0/+0
0bf09154 Fix file permission issue (Tim L)
2017-11-14simplewallet: reject attempts to use too low mixin earlymoneromooo-monero1-16/+3
This yields a clear error message rather then some possibly confusing more technical errors down the line
2017-11-06track double spending in the txpoolmoneromooo-monero1-6/+8
Transactions in the txpool are marked when another transaction is seen double spending one or more of its inputs. This is then exposed wherever appropriate. Note that being marked with this "double spend seen" flag does NOT mean this transaction IS a double spend and will never be mined: it just means that the network has seen at least another transaction spending at least one of the same inputs, so care should be taken to wait for a few confirmations before acting upon that transaction (ie, mostly of use for merchants wanting to accept unconfirmed transactions).
2017-11-06Merge pull request #2605Riccardo Spagni1-0/+29
b370ef54 Wallet: Descriptions through new commands 'set_description', 'get_description' (rbrunner7)
2017-11-03Fix file permission issueTim L1-0/+0
This branch fixes a file permission issue introduced by https://github.com/monero-project/monero/commit/69c37200aa87f100f731e755bdca7a0dc6ae820a
2017-10-31Merge pull request #2723Riccardo Spagni1-1/+1
69c37200 RPC Add cross origin resource sharing support (Tim L)
2017-10-30RPC Add cross origin resource sharing supportTim L1-1/+1
2017-10-23Add more specific RPC error codesMichał Sałaban1-96/+91
2017-10-16Wallet: Descriptions through new commands 'set_description', 'get_description'rbrunner71-0/+29
2017-10-15Fix compiler warnings with Clang 6.0.0.Vasil Dimov1-1/+1
monero/src/cryptonote_protocol/block_queue.cpp:208:44: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] static const boost::uuids::uuid uuid0 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { } monero/src/wallet/wallet_rpc_server.cpp:1895:43: error: lambda capture 'wal' is not used [-Werror,-Wunused-lambda-capture] tools::signal_handler::install([&wrpc, &wal](int) { ^ monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:40: error: lambda capture 'arg' is not used [-Werror,-Wunused-lambda-capture] m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections... ^ monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:46: error: lambda capture 'fluffy_arg' is not used [-Werror,-Wunused-lambda-capture] m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections... ^ monero/src/blockchain_utilities/blockchain_export.cpp:181:3: error: bool literal returned from 'main' [-Werror,-Wmain] CHECK_AND_ASSERT_MES(r, false, "Failed to initialize source blockchain storage"); ^ ~~~~~ monero/contrib/epee/include/misc_log_ex.h:180:97: note: expanded from macro 'CHECK_AND_ASSERT_MES' ...fail_ret_val, message) do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) ^ ~~~~~~~~~~~~ monero/src/blockchain_utilities/blockchain_export.cpp:195:3: error: bool literal returned from 'main' [-Werror,-Wmain] CHECK_AND_ASSERT_MES(r, false, "Failed to export blockchain raw data"); ^ ~~~~~ monero/contrib/epee/include/misc_log_ex.h:180:97: note: expanded from macro 'CHECK_AND_ASSERT_MES' ...fail_ret_val, message) do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) ^ ~~~~~~~~~~~~
2017-10-15Merge pull request #2592Riccardo Spagni1-1/+1
dc19659d Remove network_address_base which has been merged with ipv4_network_address in 8b006877 (Michał Sałaban) 2183ade0 Don't try to create wallet-dir when it's not given, don't crash if wallet-dir already exists. (Michał Sałaban)
2017-10-07Subaddresseskenshi841-42/+183
2017-10-07Don't try to create wallet-dir when it's not given, don't crash if ↵Michał Sałaban1-1/+1
wallet-dir already exists.
2017-09-25move checkpoints in a separate librarymoneromooo-monero1-3/+3
2017-09-25Merge pull request #2424Riccardo Spagni1-3/+20
28b72b6e tx_pool: pre-init tvc.m_verifivation_failed before processing (moneromooo-monero) 50a629b2 core_tests: catch (impossible in practice) tx extra api failure (moneromooo-monero) fee15ef1 wallet2: catch failure to parse address (moneromooo-monero) 1399e26d net_peerlist: remove dead code (moneromooo-monero) 50e09698 tx_pool: guard against failure getting tx hash (moneromooo-monero) 54cc209a wallet_rpc_server: catch failure to create directory (moneromooo-monero) 3e55099c wallet_rpc_server: init m_vm to NULL in ctor (moneromooo-monero) 7d0dde5e wallet_args: remove redundant default value for --log-file (moneromooo-monero) ed4a3350 wallet2: catch failure to save keys file (moneromooo-monero) 44434c8a wallet2_api: check whether dynamic_cast returns NULL (moneromooo-monero) 92f2f687 core: check return value from parse_hexstr_to_binbuff (moneromooo-monero) 5475692e wallet2_api: remove an unused, uninitialized, field (moneromooo-monero) a7ba3de1 libwallet_api_tests: initialize newblock_triggered on reset (moneromooo-monero) b2763ace wallet2_api: init error code to "no error" in the ctor (moneromooo-monero) b5faac53 get_blockchain_top now returns void (moneromooo-monero) 2e44d8f2 wallet_rpc_server: guard against exceptions (moneromooo-monero) 4230876b simplewallet: guard against I/O exceptions (moneromooo-monero) 06c1e057 daemon: initialize decode_as_json in RPC request (moneromooo-monero) 11f71af5 http_base: init size_t in http_request_info ctor (moneromooo-monero)
2017-09-25Merge pull request #2443Riccardo Spagni1-1/+1
ffe27127 wallet_rpc_server: fix index for newly added address book entry (moneromooo-monero)
2017-09-25wallet_rpc_server: catch failure to create directorymoneromooo-monero1-1/+10
CID 175281
2017-09-25wallet_rpc_server: init m_vm to NULL in ctormoneromooo-monero1-1/+1
CID 175279
2017-09-25wallet_rpc_server: guard against exceptionsmoneromooo-monero1-1/+9
CID 175305
2017-09-13wallet_rpc_server: fix index for newly added address book entrymoneromooo-monero1-1/+1
2017-08-30Do not create file when RPC user/pass is given and use file lockingLee Clagett1-29/+20
2017-08-15Merge pull request #2286Riccardo Spagni1-11/+17
8655ba04 wallet_rpc_server: adjust small ring sizes to 5 for v6 (moneromooo-monero)
2017-08-15Merge pull request #2279Riccardo Spagni1-1/+6
359517c7 wallet_rpc_server: fix possible privacy leak in on_import_key_images() (Jaquee) 20495b27 simplewallet: fix possible privacy leak in import_key_images() (Jaquee)
2017-08-15Merge pull request #2205Riccardo Spagni1-0/+4
c97d1bd3 wallet: return unlock_time in get_transfers (moneromooo-monero)
2017-08-12wallet_rpc_server: adjust small ring sizes to 5 for v6moneromooo-monero1-11/+17
2017-08-11wallet_rpc_server: fix possible privacy leak in on_import_key_images()Jaquee1-1/+6
2017-08-07change mixin to ring size in user visible placesmoneromooo-monero1-2/+2
2017-08-07Merge pull request #2210Riccardo Spagni1-6/+49
cb0b5594 Move OpenAlias console input back from libs (moneromooo-monero)
2017-08-02wallet: return unlock_time in get_transfersmoneromooo-monero1-0/+4
also show it in simplewallet's show_transfer
2017-07-27Move OpenAlias console input back from libsmoneromooo-monero1-6/+49
Library code should definitely not ask for console input unless it's clearly an input function. Delegating the user interaction part to the caller means it can now be used by a GUI, or have a decision algorithm better adapted to a particular caller.
2017-07-26wallet_rpc_server: optionally return tx blobs on transfer callsmoneromooo-monero1-7/+38
also add do_not_relay flag to them, so it now becomes possible to create a tx without sending it yet
2017-07-03Merge pull request #2125Riccardo Spagni1-2/+2
f98bf48b Minor cleanup: tab vs. space + logs messages (binaryFate)
2017-07-03Merge pull request #2121Riccardo Spagni1-0/+7
5a09d79c Fix #2120: return per-tx amount in transfer_split RPC call. (binaryFate)
2017-06-26Minor cleanup: tab vs. space + logs messagesbinaryFate1-3/+3
2017-06-26Fix #2120: return per-tx amount in transfer_split RPC call.binaryFate1-0/+7
2017-06-23Fix on_transfer RPC incorrect logging infoMike C1-1/+1
2017-04-24wallet: add sweep_below functionmoneromooo-monero1-1/+1
It sweeps all outputs below the given threshold This is available via the existing sweep_all RPC, by setting amount_threshold the desired amount (in atomic units)
2017-04-11Resolve #92 add ability to create wallets thru RPCHoward Chu1-94/+326
Reviewed and squashed. Open/Create is only allowed if no walletfile was specified at startup.
2017-03-20wallet rpc: enable solo miningstoffu1-0/+51
2017-03-19wallet-rpc bugfix: get_transfer_by_txid previously checking against payment idkenshi841-1/+1
2017-03-18Merge pull request #1884Riccardo Spagni1-0/+28
e9175cec wallet_rpc_server: make a few RPCs unavailable in restricted mode (moneromooo-monero)
2017-03-18Merge pull request #1883Riccardo Spagni1-8/+8
d0238313 use const references in catch blocks (moneromooo-monero)
2017-03-18Merge pull request #1882Riccardo Spagni1-0/+22
3fa59755 wallet2: call is_key_image_spent in blocks in rescan_spent (moneromooo-monero) 9d134e86 wallet_rpc_server: add a rescan_spent RPC (moneromooo-monero)
2017-03-18wallet_rpc_server: make a few RPCs unavailable in restricted modemoneromooo-monero1-0/+28
Address book modification, setting tx nodes, importing key images
2017-03-18use const references in catch blocksmoneromooo-monero1-8/+8
2017-03-18wallet_rpc_server: add a rescan_spent RPCmoneromooo-monero1-0/+22
2017-03-17wallet-rpc: enable openaliasstoffu1-3/+3
2017-02-28wallet: fix --log-file not workingmoneromooo-monero1-0/+1
2017-02-24wallet_rpc_server: new --trusted-daemon flagmoneromooo-monero1-5/+16
and remove trusted_daemon fields from transfer RPCs, it is much friendlier on users
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-14simplewallet: validate hex input sizemoneromooo-monero1-4/+4
2017-02-11Merge pull request #1689Riccardo Spagni1-62/+25
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-2/+2
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett1-62/+25
2017-02-04wallet_rpc_server: add address book RPC callsmoneromooo-monero1-0/+98
2017-02-02Merge pull request #1643Riccardo Spagni1-4/+2
69d2ad39 wallet_rpc_server: fix logs going to the wrong file (moneromooo-monero)
2017-01-29wallet_rpc_server: fix short payment id validation in transfermoneromooo-monero1-1/+1
2017-01-28wallet_rpc_server: fix logs going to the wrong filemoneromooo-monero1-4/+2
2017-01-16wallet2: reuse fake outs when adjusting fee on transfermoneromooo-monero1-0/+5
This avoids indirectly leaking the real output to the daemon, and is faster. This will still happen for more complex cases, especially when cancelling a tx and "re-rolling" it.
2017-01-16Change logging to easylogging++moneromooo-monero1-5/+9
This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
2017-01-11Added (not yet enabled) HTTP client authenticationLee Clagett1-1/+1
2017-01-08wallet_rpc_server: new RPC call to get a transfer by txidmoneromooo-monero1-61/+152
2016-12-19Refactored password prompting for walletsLee Clagett1-3/+3
2016-12-16Enabled HTTP auth support for monero-wallet-rpcLee Clagett1-7/+91
2016-12-05Added confirmation before binding wallet-rpc to external IPLee Clagett1-11/+30
2016-12-04Merge pull request #1398Riccardo Spagni1-1/+1
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04Fix a few minor typosPierre Boyer1-1/+1
2016-11-28wallet: add API and RPC to create/parse monero: URIsmoneromooo-monero1-0/+27
2016-11-16wallet: return fee in transfer RPCmoneromooo-monero1-0/+4
2016-11-10Created monero-wallet-rpc, moving functionality from monero-wallet-cliLee Clagett1-10/+117
2016-09-18epee: optionally restrict HTTP service to a configurable user agentmoneromooo-monero1-1/+4
This is intended to catch traffic coming from a web browser, so we avoid issues with a web page sending a transfer RPC to the wallet. Requiring a particular user agent can act as a simple password scheme, while we wait for 0MQ and proper authentication to be merged.
2016-09-16wallet: change priority/fee to ArticMine's recommendationmoneromooo-monero1-3/+3
We keep 1, 2, 3 multipliers till the fee decrase from 0.01/kB to 0.002/kB, where we start using 1, 20, 166 multipliers. This ensures the higher multiplier will compensate for the block reward penalty when pushing past 100% of the past median. The fee-multiplier wallet setting is now rename to priority, since it keeps its [0..3] range, but maps to different multiplier values.
2016-08-29wallet_rpc_server: return payment id in make_integrated_address RPCmoneromooo-monero1-0/+1
It is useful, especially when requesting a random one
2016-08-28rct amount key modified as per luigi1111's recommendationsmoneromooo-monero1-31/+0
This allows the key to be not the same for two outputs sent to the same address (eg, if you pay yourself, and also get change back). Also remove the key amounts lists and return parameters since we don't actually generate random ones, so we don't need to save them as we can recalculate them when needed if we have the correct keys.
2016-08-28wallet: do not store signatures in the wallet cachemoneromooo-monero1-1/+1
Saves some substantial space. Also avoid calculating tx hashes we don't need.
2016-08-28wallet: always use new algorithm for RPC transfersmoneromooo-monero1-5/+2
This ensures we get rct transactions when appropriate
2016-08-28wallet: do not try to use rct txes a few blocks before the forkmoneromooo-monero1-2/+2
2016-08-28port get_tx_key/check_tx_key to rctmoneromooo-monero1-0/+39
2016-08-28add rct to the protocolmoneromooo-monero1-4/+2
It is not yet constrained to a fork, so don't use on the real network or you'll be orphaned or rejected.
2016-07-24wallet: new {ex,im}port_key_images commands and RPC callsmoneromooo-monero1-0/+66
They are used to export a signed set of key images from a wallet with a private spend key, so an auditor with the matching view key may see which of those are spent, and which are not.
2016-07-20wallet: add unconfirmed incoming txes from the txpoolmoneromooo-monero1-2/+25
Shown in show_transfers simplewallet command, and get_transfers RPC command, if req.pool is true.
2016-07-20Merge pull request #899Riccardo Spagni1-1/+8
a95a2cb wallet_rpc_server: add payment id from integrated addresses to extra (moneromooo-monero)
2016-07-19wallet: add command and RPC to sign/verify datamoneromooo-monero1-0/+36
Signing is done using the spend key, since the view key may be shared. This could be extended later, to let the user choose which key (even a per tx key). simplewallet's sign/verify API uses a file. The RPC uses a string (simplewallet can't easily do strings since commands receive a tokenized set of arguments).
2016-07-10wallet_rpc_server: add payment id from integrated addresses to extramoneromooo-monero1-1/+8
2016-06-22wallet: add a fee multipliermoneromooo-monero1-4/+4
Fee can now be multiplied by 2 or 3, if users want to give priority to their transactions. There are only three levels to avoid too much fingerprinting. Default is 1 (minimum fee). The default multiplier can be set by "set fee-multiplier X".
2016-06-19wallet_rpc_server: fix some string values being returned between <>moneromooo-monero1-10/+10
2016-04-27wallet: add a filter_by_height field to get_transfersmoneromooo-monero1-2/+9
It allows a simple get_transfers (with default 0 min_height and max_height) to return all transactions, instead of the unexpected set of txes in block 0, which is probably none at all.
2016-04-26wallet: add get_transfers rpc callmoneromooo-monero1-0/+89
Allows getting in, out, pending, and failed transfers, similarly to the show_transfers command.
2016-04-26wallet: allow attaching notes to txidsmoneromooo-monero1-0/+63
2016-04-19wallet: add a new sweep_all command and RPC commandmoneromooo-monero1-0/+59
This sends all outputs in a wallet to a given address, alleviating the difficulty people have had trying to send all monero but being left with some small amount left.
2016-04-02wallet: better output selection for transfer/transfer_newmoneromooo-monero1-3/+3
This now requests the set of outputs that can be mixed first, to avoid trying non dust but unmixable outputs, which we know will fail.
2016-03-26wallet: do not leak owned amounts to the daemon unless --trusted-daemonmoneromooo-monero1-1/+1
This will be slower, though more private. New trusted_daemon parameter to the matching RPC call, false by default.
2016-03-26wallet: change sweep_dust to sweep_unmixablemoneromooo-monero1-1/+1
With the change in mixin rules for v2, the "annoying" outputs are slightly changed. There is high correlation between dust and unmixable, but no equivalence.
2016-03-11wallet: use minimum mixin when RPC asks for too low mixinmoneromooo-monero1-3/+13
After the fork, normal transfer functions called via RPC use the minimum mixin 2 if 0 or 1 is requested. While the incoming transaction may be valid (eg, it has an unmixable and at most a mixable input), it is a simple way to make sure RPC users can't get a seemingly random accept/reject behavior if they don't update their requested mixin.
2016-03-05get_payments short IDluigi11111-8/+17
Add support for short/integrated/encrypted IDs to get_payments RPC
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-12-30wallet: add a rescan_bc command and rescan_blockchain RPCmoneromooo-monero1-0/+23
Blockchain hashes and key images are flushed, and blocks are pulled anew from the daemon. The console command is shortened to match bc_height. This should make it a lot easier on users who are currently told to remove this particular cache file but keep the keys one, etc, etc.
2015-12-28wallet_rpc_server: exit async, so we reply to stop_wallet RPCmoneromooo-monero1-1/+10
Reported by saddam
2015-12-28wallet: do not return error if incoming_transfers finds nonemoneromooo-monero1-5/+0
reported by saddam
2015-12-23added RPC wallet command getheightBrendan Telzrow1-1/+16