Commit graph

326 commits

Author SHA1 Message Date
Ilya Kitaev
12345d382c api implementation splitted over separate files 2016-06-23 15:50:17 +03:00
Ilya Kitaev
60508e6bae TransactionInfo / TransactionHistory APIs design 2016-06-23 15:50:17 +03:00
Ilya Kitaev
951f3b5d83 Wallet::createTransaction API introduced
Transaction API continued

TODOs for Transaction/Transfer interface
2016-06-23 15:49:54 +03:00
Ilya Kitaev
7c51227f88 Wallet::transfer in progress 2016-06-23 15:49:36 +03:00
Ilya Kitaev
e04c67ac4c Wallet::refresh + tests 2016-06-23 15:49:36 +03:00
Ilya Kitaev
9cdf0b7d7f "testnet" is default parameter 2016-06-23 15:49:36 +03:00
Ilya Kitaev
caf0e02787 testnet option, Wallet::balance(), Wallet::unlockedBalance() 2016-06-23 15:49:22 +03:00
Ilya Kitaev
8df820b301 - testnet option added to api; 2016-06-23 15:49:07 +03:00
Ilya Kitaev
94eaeb50b2 wallet2::store() implemented within wallet2::store_to 2016-06-23 15:40:48 +03:00
moneromooo-monero
945c272f6c
wallet: add a fee multiplier
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-22 22:21:30 +01:00
Ilya Kitaev
4e5521d87d PendingTransactionImpl: pointer->reference 2016-06-22 15:50:59 +03:00
Ilya Kitaev
7b7cf21644 commented regex 2016-06-22 15:06:19 +03:00
Ilya Kitaev
eec0f57d60 Typo fixed 2016-06-22 14:37:53 +03:00
Ilya Kitaev
f1c4a376af Wallet::createTransaction: added mixin_count param 2016-06-20 22:56:30 +03:00
moneromooo-monero
5dc09f2666
wallet_rpc_server: fix some string values being returned between <> 2016-06-19 17:52:46 +01:00
Ilya Kitaev
3318addafa double/string to monero integer convertion methods 2016-06-16 16:42:33 +03:00
Ilya Kitaev
3ac20a46b3 wallet::default_mixin exposed to public interface as
Wallet::setDefaultMixin, Wallet::defaultMixin;
wallet::create_transaction_2 used in Wallet::createTransaction
2016-06-10 13:52:10 +03:00
Ilya Kitaev
c554055ce4 Wallet::filename, Wallet::keysFilename, tests for move wallet 2016-06-10 12:51:09 +03:00
Ilya Kitaev
8f9d98b3e0 removed unused "using" 2016-06-03 16:56:13 +03:00
Ilya Kitaev
2facbe77e4 Wallet API : WalletManager::findWallets() added 2016-06-03 14:52:58 +03:00
Ilya Kitaev
bc4584c1ff Merge remote-tracking branch 'upstream/master' 2016-05-27 11:33:08 +03:00
Ilya Kitaev
4327548915 installing wallet_api header 2016-05-27 10:58:07 +03:00
Ilya Kitaev
d43ad22595 all wallet dependencies merged to single static lib 2016-05-27 10:00:01 +03:00
Riccardo Spagni
ae205020f6
Merge pull request #827
f1e70d1 Only log 1/N skipped blocks (Howard Chu)
cebb97c Move refresh height to keys file from cache file (Howard Chu)
590c439 Make fast_refresh interruptible (Howard Chu)
687855d Set refresh height earlier (Howard Chu)
2fb00c0 Fix 19fe8ae3ef (Howard Chu)
2016-05-17 19:04:41 +02:00
Ilya Kitaev
40087a745f WalletListener::moneySpent test 2016-05-16 13:11:44 +03:00
Ilya Kitaev
27d86b73c6 WalletListener::moneySpent(), WalletListener::moneyReceived() 2016-05-13 16:25:31 +03:00
Ilya Kitaev
ff52c67aa9 i_wallet_callback: virtual dtor 2016-05-13 12:59:29 +03:00
Ilya Kitaev
2d799097ca Merge remote-tracking branch 'upstream/master' 2016-05-12 15:14:30 +03:00
Ilya Kitaev
5dbd2b8fc3 started WalletListener 2016-05-05 22:24:00 +03:00
Howard Chu
f1e70d15ca Only log 1/N skipped blocks 2016-04-29 16:50:51 +01:00
Howard Chu
cebb97c913 Move refresh height to keys file from cache file 2016-04-29 15:33:28 +01:00
Howard Chu
590c43988c Make fast_refresh interruptible 2016-04-29 15:33:28 +01:00
Ilya Kitaev
93119344ec TransactionHistory continued 2016-04-29 16:26:14 +03:00
Riccardo Spagni
5b734c2a3a
Merge pull request #825
513a658 add a --max-concurrency flag (moneromooo-monero)
2016-04-29 10:43:48 +02:00
moneromooo-monero
513a658c87
add a --max-concurrency flag
It sets the max number of threads to use for a parallel job.
This is different that the number of total threads, since monero
binaries typically start a lot of them.
2016-04-28 20:33:59 +01:00
moneromooo-monero
09dddf281a
wallet: add a filter_by_height field to get_transfers
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-27 23:43:39 +01:00
moneromooo-monero
48ab3f93ff
wallet: add get_transfers rpc call
Allows getting in, out, pending, and failed transfers, similarly
to the show_transfers command.
2016-04-26 22:39:52 +01:00
moneromooo-monero
7baed9bd89
wallet: allow attaching notes to txids 2016-04-26 19:07:33 +01:00
moneromooo-monero
ce6f8a6324
wallet: add GMT timestamps to transfers/payments 2016-04-26 19:07:25 +01:00
Riccardo Spagni
714dcc2866
Merge pull request #815
b0850a9 wallet: add a new sweep_all command and RPC command (moneromooo-monero)
2016-04-26 18:08:09 +02:00
Riccardo Spagni
7098ad6804
Merge pull request #814
68cbe15 	modified:   src/wallet/wallet2.cpp 	modified:   src/wallet/wallet2.h (awfulcrawler)
4b325bd 	modified:   src/simplewallet/simplewallet.cpp 	modified:   src/wallet/wallet2.cpp 	modified:   src/wallet/wallet2.h (awfulcrawler)
2016-04-26 18:04:00 +02:00
Riccardo Spagni
0922ae2b43
Merge pull request #811
672162d tests: fix compile failure on wallet2::transfer (moneromooo-monero)
b0c18ef wallet2: move output selection api public (moneromooo-monero)
2016-04-26 18:02:26 +02:00
Ilya Kitaev
566166aafd merged with upstream 2016-04-26 13:46:20 +03:00
Ilya Kitaev
dce5374660 Merge remote-tracking branch 'upstream/master' into develop 2016-04-26 11:08:40 +03:00
Ilya Kitaev
53a97bdcd3 Wallet API: transaction history in progress 2016-04-22 13:33:09 +03:00
Ilya Kitaev
02c9df5de2 Wallet API : transaction history in progress 2016-04-22 13:21:08 +03:00
Ilya Kitaev
a213887476 transaction history api in progress 2016-04-20 13:33:54 +03:00
Ilya Kitaev
b6aaf53a60 transaction history api in progress 2016-04-20 13:17:27 +03:00
Ilya Kitaev
f83f3cbd96 api implementation splitted over separate files 2016-04-20 13:01:00 +03:00
moneromooo-monero
b0850a9bea
wallet: add a new sweep_all command and RPC command
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-19 21:20:27 +01:00
Ilya Kitaev
4e1c2dc365 TransactionInfo / TransactionHistory APIs design 2016-04-19 12:25:03 +03:00
awfulcrawler
68cbe1579e modified: src/wallet/wallet2.cpp
modified:   src/wallet/wallet2.h

Removed working comments
2016-04-18 20:20:31 +12:00
awfulcrawler
4b325bdb66 modified: src/simplewallet/simplewallet.cpp
modified:   src/wallet/wallet2.cpp
	modified:   src/wallet/wallet2.h

Update to fix unconfirmed balance and give a slightly more verbose and informative confirmation message for transfers
2016-04-18 14:57:47 +12:00
Howard Chu
b7140daea2 Add GET_HASHES_FAST rpc, use it in wallet
When m_refresh_from_block_height has been set, only hashes will be
retrieved up to that height, instead of full blocks. The same will
be done for "refresh <height>" when the specified height is beyond
the current local blockchain.
2016-04-17 15:25:46 +01:00
moneromooo-monero
b0c18ef9cd
wallet2: move output selection api public 2016-04-17 11:20:44 +01:00
Riccardo Spagni
8f78f1407e
Merge pull request #784
087373e Fix potential race with parallel processing of txes/signatures/blocks (moneromooo-monero)
2016-04-14 16:25:53 +09:00
Riccardo Spagni
6bfb8799c3
Merge pull request #783
48d0747 wallet: better output selection for transfer/transfer_new (moneromooo-monero)
2016-04-14 16:25:38 +09:00
Ilya Kitaev
1774d9574b TODOs for Transaction/Transfer interface 2016-04-12 22:30:20 +03:00
Ilya Kitaev
d97e9ef8a5 Transaction API continued 2016-04-06 13:56:57 +03:00
moneromooo-monero
5c9dd23b1c
rpc: add a do_not_relay boolean to tx submission
Just to make it easier
2016-04-05 20:15:54 +01:00
Ilya Kitaev
079fbd3d42 Wallet::createTransaction API introduced 2016-04-05 15:24:44 +03:00
Ilya Kitaev
ee5bb17f26 Wallet::transfer() continued 2016-04-04 14:56:17 +03:00
Ilya Kitaev
c37c856d6d Wallet::transfer in progress 2016-04-03 14:34:38 +03:00
moneromooo-monero
087373eccf
Fix potential race with parallel processing of txes/signatures/blocks 2016-04-02 14:20:51 +01:00
moneromooo-monero
48d0747d00
wallet: better output selection for transfer/transfer_new
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-04-02 14:17:02 +01:00
Riccardo Spagni
4ac6bdbb3f
Merge pull request #769
b4eada9 wallet: make load_keys check types when loading JSON (moneromooo-monero)
3e55725 wallet: make the JSON reading type safe (moneromooo-monero)
f8d05f3 common: new json_util.h (moneromooo-monero)
2016-04-02 12:02:49 +09:00
Riccardo Spagni
a38ad63f8f
Merge pull request #767
24b3e90 Convey tx verification failure reasons to the RPC client (moneromooo-monero)
2016-04-02 12:02:07 +09:00
Ilya Kitaev
830c19c934 Wallet::refresh + tests 2016-03-31 16:38:57 +03:00
Ilya Kitaev
1ae9cdc6bf "testnet" is default parameter 2016-03-31 15:39:28 +03:00
Ilya Kitaev
2157a9ac48 testnet option, Wallet::balance(), Wallet::unlockedBalance() 2016-03-31 12:48:41 +03:00
Ilya Kitaev
df6026182a Merge remote-tracking branch 'upstream/master' 2016-03-31 12:01:19 +03:00
moneromooo-monero
878ab5d896
wallet: fix --generate-from-keys saving as watch only 2016-03-28 16:46:37 +01:00
moneromooo-monero
b4eada907c
wallet: make load_keys check types when loading JSON 2016-03-27 23:39:34 +01:00
moneromooo-monero
24b3e9007a
Convey tx verification failure reasons to the RPC client
This allows appropriate action to be taken, like displaying
the reason to the user.

Do just that in simplewallet, which should help a lot in
determining why users fail to send.

Also make it so a tx which is accepted but not relayed is
seen as a success rather than a failure.
2016-03-27 12:37:18 +01:00
moneromooo-monero
25672d3f10
wallet: pass std::function by const ref, not value
Because we can.
2016-03-26 23:32:45 +00:00
moneromooo-monero
0be6e08dd0
wallet: do not leak owned amounts to the daemon unless --trusted-daemon
This will be slower, though more private.

New trusted_daemon parameter to the matching RPC call, false by default.
2016-03-26 23:29:29 +00:00
moneromooo-monero
12146daeed
wallet: change sweep_dust to sweep_unmixable
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-26 21:15:47 +00:00
moneromooo-monero
f9a2fd2ff5
wallet: handle rare case where fee adjustment can bump to the next kB
It resulted in a tx being sent with too low a fee, and thus rejected.
2016-03-26 11:51:58 +00:00
moneromooo-monero
f26651ab8a
wallet: factor fee calculation 2016-03-26 11:44:43 +00:00
Ilya Kitaev
8790904cf9 - testnet option added to api; 2016-03-25 17:06:30 +03:00
moneromooo-monero
a2e378b91b
wallet: add a --generate-from-json flag
It takes a filename containing JSON data to generate a wallet.
The following fields are valid:

  version: integer, should be 1
  filename: string, path/filename for the newly created wallet
  scan_from_height: 64 bit unsigned integer, optional
  password: string, optional
  viewkey: string, hex representation
  spendkey: string, hex representation
  seed: string, optional, list of words separated by spaces

Either seed or private keys should be given. If using private
keys, the spend key may be omitted (the wallet will not be
able to spend, but will see incoming transactions).

If scan_from_height is given, blocks below this height will not
be checked for transactions as an optimization.
2016-03-25 00:56:11 +00:00
Ilya Kitaev
2cce32995b wallet2::store() implemented within wallet2::store_to 2016-03-21 16:17:03 +03:00
moneromooo-monero
f7301c3563
Revert "Print stack trace upon exceptions"
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94.
2016-03-21 10:12:23 +00:00
moneromooo-monero
fff238ec94
Print stack trace upon exceptions
Useful for debugging users' logs
2016-03-19 21:48:36 +00:00
Ilya Kitaev
62606f11f5 Wallet::store_to(path, password) implemented; 2016-03-16 14:29:06 +03:00
Ilya Kitaev
19fcc74912 Wallet::address implemented 2016-03-16 14:29:06 +03:00
Ilya Kitaev
180ac6e438 WalletManager::recoveryWallet implemented 2016-03-16 14:29:06 +03:00
Ilya Kitaev
5a4f099540 Wallet::setPassword() method for wallet2_api 2016-03-16 14:29:06 +03:00
Ilya Kitaev
57d7ffc4d6 changes in wallet2_api + implemented WalletManager::openWallet 2016-03-16 14:27:57 +03:00
Ilya Kitaev
f1f9279d90 get_seed() included to interface 2016-03-16 14:27:57 +03:00
Ilya Kitaev
930bed7074 tests for wallet2_api 2016-03-16 14:27:57 +03:00
Ilya Kitaev
318660dd89 wallet2 public api. initial commit 2016-03-16 14:27:57 +03:00
moneromooo-monero
8bc1bd6b65
wallet: use minimum mixin when RPC asks for too low mixin
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-11 21:32:16 +00:00
moneromooo-monero
31d2e0f84d
wallet_rpc_server: make use_fork_rules public
We will need it in the wallet RPC server
2016-03-11 21:31:50 +00:00
Howard Chu
b937a2c915 Use boost::thread instead of std::thread
and all other associated IPC
2016-03-11 15:09:50 +00:00
luigi1111
e2b7e55be6 get_payments short ID
Add support for short/integrated/encrypted IDs to get_payments RPC
2016-03-05 13:30:48 -06:00
moneromooo-monero
4513b4cd2b
simplewallet: add a new --restore-from-keys option
It is similar in use to --restore-from-view-key, but also expects
a spend private key.

Requested by luigi1112, and useful to restore MyMonero wallets.
2016-02-22 22:10:55 +00:00
moneromooo-monero
8f09b71b9b
wallet: clear missing data on rescan_bc 2016-02-15 20:51:30 +00:00
moneromooo-monero
c7b96b91ed
wallet: check a key image isn't already present when adding one
If it is, it points to reuse of a tx key, which isn't meant to happen.
If it does, a key image collision means that only one of those
outputs is spendable, so the wallet selects the larger amount,
unless that output was spent already.

This causes a discrepancy betewen reported received inputs and
payment total.

Since tx keys are 256 bits, this should never happen except if
done on purpose, or if a sender uses a bad PRNG.
2016-02-05 16:24:23 +00:00
Riccardo Spagni
616df496e9 Revert "Merge pull request #632"
This reverts commit 58f890652e, reversing
changes made to 39d73d2a27.
2016-01-31 15:49:11 +02:00