aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #3002Riccardo Spagni2018-01-101-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)
| * | | wallet_rpc_server: fix wallet leak on error exitmoneromooo-monero2017-12-241-0/+2
| | | | | | | | | | | | | | | | Makes it easier to debug leaks
* | | | epee: remove dependency on commonmoneromooo-monero2018-01-101-1/+2
| |_|/ |/| |
* | | Merge pull request #2967Riccardo Spagni2018-01-021-301/+103
|\ \ \ | |_|/ |/| | | | | 55556fab wallet_rpc_server: factor transfer info return and add missing info (moneromooo-monero)
| * | wallet_rpc_server: factor transfer info return and add missing infomoneromooo-monero2017-12-201-301/+103
| |/ | | | | | | Additional tx keys, amounts and fees were missing in some cases
* | Revert "return subaddress in get_bulk_payments"moneromooo-monero2017-12-251-1/+0
| | | | | | | | This reverts commit b60f48f0e31c17638f771042887b2fffdbad15b4.
* | Merge pull request #2926Riccardo Spagni2017-12-251-0/+70
|\ \ | | | | | | | | | 6b5bd129 Account tagging (stoffu)
| * | Account taggingstoffu2017-12-181-0/+70
| |/
* | Merge pull request #2920Riccardo Spagni2017-12-251-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)
| * | check accessing an element past the end of a containermoneromooo-monero2017-12-181-5/+12
| | |
| * | add empty container sanity checks when using front() and back()moneromooo-monero2017-12-181-0/+7
| |/
* | Merge pull request #2916Riccardo Spagni2017-12-251-4/+18
|\ \ | | | | | | | | | a9217641 wallet-rpc: added receiving address to res of get(_bulk)_payments; selective addresses for getaddress (stoffu)
| * | wallet-rpc: added receiving address to res of get(_bulk)_payments; selective ↵stoffu2017-12-181-4/+18
| |/ | | | | | | addresses for getaddress
* | Merge pull request #2899Riccardo Spagni2017-12-251-0/+1
|\ \ | |/ |/| | | b60f48f0 return subaddress in get_bulk_payments (Dmitriy Plekhanov)
| * return subaddress in get_bulk_paymentsDmitriy Plekhanov2017-12-081-0/+1
| |
* | wallet: factor multisig info parsingmoneromooo-monero2017-12-171-50/+1
| |
* | wallet: use raw encrypted data in multisig import/export RPCmoneromooo-monero2017-12-171-47/+7
| |
* | wallet: add multisig sign/submit RPCmoneromooo-monero2017-12-171-82/+361
| |
* | Match surae's recommendation to derive multisig keysmoneromooo-monero2017-12-171-3/+3
| |
* | wallet: guard against partly initialized multisig walletmoneromooo-monero2017-12-171-4/+25
| |
* | add multisig core test and factor multisig building blocksmoneromooo-monero2017-12-171-14/+1
| |
* | N-1/N multisigmoneromooo-monero2017-12-171-11/+93
| |
* | multisig address generation RPCmoneromooo-monero2017-12-171-0/+234
| |
* | gen_multisig: generates multisig wallets if participants trust each othermoneromooo-monero2017-12-171-0/+1
| |
* | Add N/N multisig tx generation and signingmoneromooo-monero2017-12-171-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
* | new wipeable_string class to replace std::string passphrasesmoneromooo-monero2017-11-271-1/+2
|/
* Merge pull request #2823Riccardo Spagni2017-11-251-21/+21
|\ | | | | | | 0d149f70 Add out-of-bound exceptions and handle them in RPC (Michał Sałaban)
| * Add out-of-bound exceptions and handle them in RPCMichał Sałaban2017-11-151-21/+21
| |
* | Merge pull request #2368Riccardo Spagni2017-11-251-0/+50
|\ \ | | | | | | | | | b0b7e0f0 Spend proof without txkey (stoffu)
| * | Spend proof without txkeystoffu2017-11-211-0/+50
| | |
* | | Merge pull request #2788Riccardo Spagni2017-11-251-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)
| * | | wallet_rpc_server: new relay_tx commandmoneromooo-monero2017-11-241-0/+41
| | | | | | | | | | | | | | | | It takes a full tx+metadata hex string as input
| * | | wallet: transfer RPC can now return tx metadata (pending_tx)moneromooo-monero2017-11-241-3/+39
| |/ /
* / / fix for tx proof: use exception instead of error_str when signature gen failedstoffu2017-11-211-6/+1
|/ /
* | Merge pull request #2768Riccardo Spagni2017-11-201-5/+8
|\ \ | | | | | | | | | ef941855 Wallet RPC: Add prompt-for-password flag (Tim L)
| * | Wallet RPC: Add prompt-for-password flagTim L2017-11-151-5/+8
| |/
* / Tx proof (revised):stoffu2017-11-181-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
* simplewallet: wrong ns for input_line in sweep_single (fix #2634)stoffu2017-11-151-1/+1
|
* wallet: add sweep_single commandstoffu2017-11-151-0/+96
|
* More missed readline dependencies thru scoped_message_writerHoward Chu2017-11-141-2/+1
|
* wallet: move some scoped_message_writer calls from the libsmoneromooo-monero2017-11-141-1/+11
|
* wallet: rejig to avoid prompting in wallet2moneromooo-monero2017-11-141-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.
* Merge pull request #2756Riccardo Spagni2017-11-141-0/+0
|\ | | | | | | 0bf09154 Fix file permission issue (Tim L)
| * Fix file permission issueTim L2017-11-031-0/+0
| | | | | | | | This branch fixes a file permission issue introduced by https://github.com/monero-project/monero/commit/69c37200aa87f100f731e755bdca7a0dc6ae820a
* | simplewallet: reject attempts to use too low mixin earlymoneromooo-monero2017-11-141-16/+3
| | | | | | | | | | This yields a clear error message rather then some possibly confusing more technical errors down the line
* | track double spending in the txpoolmoneromooo-monero2017-11-061-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).
* | Merge pull request #2605Riccardo Spagni2017-11-061-0/+29
|\ \ | |/ |/| | | b370ef54 Wallet: Descriptions through new commands 'set_description', 'get_description' (rbrunner7)
| * Wallet: Descriptions through new commands 'set_description', 'get_description'rbrunner72017-10-161-0/+29
| |
* | Merge pull request #2723Riccardo Spagni2017-10-311-1/+1
|\ \ | | | | | | | | | 69c37200 RPC Add cross origin resource sharing support (Tim L)
| * | RPC Add cross origin resource sharing supportTim L2017-10-301-1/+1
| |/