aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet_manager.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-03-04Copyright: Update to 2022mj-xmr1-1/+1
2021-10-22wallet_api: enable set_strict_default_file_permissionstobtoht1-0/+5
2021-06-08wallet/api: remove Bitmonero namespace aliasselsta1-2/+0
2020-07-20wallet2_api: implement runtime proxy configurationxiphon1-0/+4
2020-05-06Update copyright year to 2020SomaticFanatic1-1/+1
Update copyright year to 2020
2020-04-21Merge pull request #6415luigi11111-6/+14
09abca7 wallet_api: checkUpdate - optional version and buildtag params (xiphon)
2020-04-02wallet_api: checkUpdate - optional version and buildtag paramsxiphon1-6/+14
2020-02-11wallet2_api: wallet recovery - seed offset passphrase supportxiphon1-2/+3
2019-05-27wallet_manager: omit redundant disconnect, drop unused variablexiphon1-3/+0
2019-04-05wallet: API changes to enable passphrase entryDusan Klinec1-2/+13
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-01-02wallet api/device: set estimated restore height if none is providedselsta1-0/+2
2018-09-19query backing devicem2049r1-0/+8
2018-08-16wallet2: make --restricted-rpc available for wallet RPC onlystoffu1-5/+5
2018-08-08wallet: allow adjusting number of rounds for the key derivation functionstoffu1-12/+15
2018-06-21Wallet API: add support for wallet creation from hardware devicestoffu1-0/+20
2018-04-07WalletManagerImpl: reuse existing connection to daemon instead of ↵stoffu1-25/+19
reconnectivng every time
2018-03-14device: untangle cyclic depenencystoffu1-1/+0
When #3303 was merged, a cyclic dependency chain was generated: libdevice <- libcncrypto <- libringct <- libdevice This was because libdevice needs access to a set of basic crypto operations implemented in libringct such as scalarmultBase(), while libringct also needs access to abstracted crypto operations implemented in libdevice such as ecdhEncode(). To untangle this cyclic dependency chain, this patch splits libringct into libringct_basic and libringct, where the basic crypto ops previously in libringct are moved into libringct_basic. The cyclic dependency is now resolved thanks to this separation: libcncrypto <- libringct_basic <- libdevice <- libcryptonote_basic <- libringct This eliminates the need for crypto_device.cpp and rctOps_device.cpp. Also, many abstracted interfaces of hw::device such as encrypt_payment_id() and get_subaddress_secret_key() were previously implemented in libcryptonote_basic (cryptonote_format_utils.cpp) and were then called from hw::core::device_default, which is odd because libdevice is supposed to be independent of libcryptonote_basic. Therefore, those functions were moved to device_default.cpp.
2018-03-08Merge pull request #3347Riccardo Spagni1-1/+1
9a6be3da wallet_manager: fixed typo deviuce/device.hpp (stoffu)
2018-03-05Wallet API: generalize 'bool testnet' to 'NetworkType nettype'stoffu1-12/+12
2018-03-05wallet_manager: fixed typo deviuce/device.hppstoffu1-1/+1
2018-03-04Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm1-2/+2
The basic approach it to delegate all sensitive data (master key, secret ephemeral key, key derivation, ....) and related operations to the device. As device has low memory, it does not keep itself the values (except for view/spend keys) but once computed there are encrypted (with AES are equivalent) and return back to monero-wallet-cli. When they need to be manipulated by the device, they are decrypted on receive. Moreover, using the client for storing the value in encrypted form limits the modification in the client code. Those values are transfered from one C-structure to another one as previously. The code modification has been done with the wishes to be open to any other hardware wallet. To achieve that a C++ class hw::Device has been introduced. Two initial implementations are provided: the "default", which remaps all calls to initial Monero code, and the "Ledger", which delegates all calls to Ledger device.
2018-01-27Merge pull request #3104Riccardo Spagni1-4/+26
939629e8 Wallet API: all recover options with password (m2049r)
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2018-01-17Wallet API: all recover options with passwordm2049r1-4/+26
also renamed memo => mnemonic in api method parms
2017-12-17Add N/N multisig tx generation and signingmoneromooo-monero1-2/+2
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-11-18Tx proof (revised):stoffu1-149/+0
- 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-10-29Wallet API: override update subdir when built from srcJaquee1-1/+3
2017-10-07Subaddresseskenshi841-9/+7
2017-09-25wallet2_api: check whether dynamic_cast returns NULLmoneromooo-monero1-0/+2
CID 161844
2017-09-23store is optional during close and defaults to true; except during descructionm2049r1-2/+2
2017-08-03Enable verifying wallet password with having to load wallet.m2049r1-0/+4
2017-03-24Wallet API: add hard fork info functionsJaquee1-20/+0
2017-03-21wallet: fix set_log not handling 0,xxx style settingsmoneromooo-monero1-1/+1
2017-03-02wallet api: add missing mining optionsJaquee1-1/+3
2017-02-22wallet2_api: add updates check apimoneromooo-monero1-0/+28
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-21Merge pull request #1747Riccardo Spagni1-1/+0
26bd7aac wallet_api: fix logging init via api (moneromooo-monero)
2017-02-18wallet_api: fix logging init via apimoneromooo-monero1-1/+0
2017-02-14simplewallet: validate hex input sizemoneromooo-monero1-2/+2
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett1-1/+1
2017-02-02Merge pull request #1629Riccardo Spagni1-21/+20
c02e1cb9 Updates to epee HTTP client code - http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed (Lee Clagett)
2017-01-30Wallet API: Create wallet from keysJaquee1-0/+16
2017-01-25Updates to epee HTTP client codeLee Clagett1-21/+20
- http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed
2017-01-16wallet2_api: add API to set log categoriesmoneromooo-monero1-0/+5
2017-01-16Change logging to easylogging++moneromooo-monero1-2/+2
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-09wallet2_api: add solo mining APImoneromooo-monero1-1/+37
2017-01-08Merge pull request #1500Riccardo Spagni1-1/+32
c0a0fcaf wallet2_api: some new APIs to access daemon state (moneromooo-monero)
2016-12-25wallet2_api: some new APIs to access daemon statemoneromooo-monero1-1/+32
2016-12-21make openalias also available for solo miner; introduce namespace ↵kenshi841-1/+2
tools::dns_utils; support integrated address with dns lookup
2016-12-17wallet2_api: add an API to the OpenAlias resolvermoneromooo-monero1-0/+8
2016-12-13Bitmonero namespace renamed Monero. Bitmonero namespace alias added so that ↵Randi Joseph1-1/+3
third party uses of the wallet api can transition.
2016-12-12GUI address bookJaquee1-0/+2
2016-11-29wallet_api: add a few daemon related gettersmoneromooo-monero1-1/+64
Blockchain height, version, Mining hash rate...
2016-11-05wallet_api: txkey checking functions for the GUImoneromooo.monero1-0/+153
2016-10-30Wallet API: added walletExists logicJacob Brydolf1-1/+7
2016-10-28Wallet API: make sure path exists before searching for walletsJacob Brydolf1-2/+5
2016-10-08libwallet_api: Added option to restore from specific heightJacob Brydolf1-1/+4
2016-07-18wallet_api: async init, Wallet::connected status, log levelIlya Kitaev1-0/+5
2016-07-07wallet2_api: make this build (smatch needs .str() for /=)moneromooo-monero1-1/+1
2016-06-23WalletManager::findWallets: searching by "keys" files instead ofIlya Kitaev1-5/+3
"address.txt" files
2016-06-23commented regexIlya Kitaev1-1/+1
2016-06-23removed unused "using"Ilya Kitaev1-1/+0
2016-06-23Wallet API : WalletManager::findWallets() addedIlya Kitaev1-0/+37
2016-06-23api implementation splitted over separate filesIlya Kitaev1-0/+108