Commit Graph

151 Commits

Author SHA1 Message Date
Riccardo Spagni
eacf2124b6 Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11 00:35:25 +02:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Lee Clagett
ce7fcbb4ae Add server auth to monerod, and client auth to wallet-cli and wallet-rpc 2017-02-06 01:15:41 -05:00
Riccardo Spagni
31cf4e7362
Merge pull request #1640
f97526e6 simplewallet: option to always ask password for any crytical operations (kenshi84)
2017-02-04 17:18:38 +02:00
kenshi84
f97526e641 simplewallet: option to always ask password for any crytical operations 2017-02-03 09:38:12 +09:00
Ashley Perpetual
48aa9cf035 Add change_password for simplewallet 2017-01-29 03:04:17 +08:00
moneromooo-monero
5833d66f65
Change logging to easylogging++
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-16 00:25:46 +00:00
Riccardo Spagni
2a2f02e375
Merge pull request #1559
db56a03f Wallet2 + API: Callbacks for unconfirmed transfers (Jaquee)
2017-01-13 14:37:12 -05:00
Jaquee
db56a03ff2
Wallet2 + API: Callbacks for unconfirmed transfers 2017-01-12 18:25:34 +01:00
kenshi84
f1dde1a429 wallet cli: print originating block heights of mixin keys when making transfer 2017-01-09 15:10:34 +09:00
Riccardo Spagni
59021496d8
Merge pull request #1537
c2135082 simplewallet: add a show_transfer <txid> command (moneromooo-monero)
19c4041d wallet_rpc_server: new RPC call to get a transfer by txid (moneromooo-monero)
2017-01-08 16:44:29 -08:00
Riccardo Spagni
209a633a3c
Merge pull request #1496
adee1644 wallet cli: print unspent outputs with histogram (kenshi84)
2017-01-08 16:34:51 -08:00
Riccardo Spagni
f4b3989c61
Merge pull request #1482
38f00d07 wallet cli: viewing and editing address book (kenshi84)
2017-01-08 16:31:55 -08:00
moneromooo-monero
c21350823f
simplewallet: add a show_transfer <txid> command 2017-01-08 13:57:24 +00:00
kenshi84
adee16440a wallet cli: print unspent outputs with histogram 2016-12-26 16:03:16 +09:00
kenshi84
99580adf66 make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup 2016-12-21 23:12:15 +09:00
kenshi84
38f00d07f7 wallet cli: viewing and editing address book 2016-12-21 19:27:18 +09:00
Lee Clagett
2bddb8ebee Refactored password prompting for wallets 2016-12-19 20:00:43 -05:00
Kenshi Takayama
2506d51d60 wallet cli: donate command 2016-12-15 19:01:36 +09:00
moneromooo-monero
a0131c8be3
wallet: auto sync outputs and key images in cold signing files
When passing around unsigned and signed transactions, outputs
and key images are passed along (outputs are passed along unsigned
transactions from the hot wallet to the cold wallet, key images
are passed along with signed transations from the cold wallet
to the hot wallet), to allow more user friendly syncing between
hot and cold wallets.
2016-11-16 09:22:24 +00:00
Lee Clagett
358e068e87 Created monero-wallet-rpc, moving functionality from monero-wallet-cli 2016-11-10 16:39:27 -05:00
Riccardo Spagni
d53bc2eddf
Merge pull request #1281
bb560dd wallet: new import_outputs/export_outputs commands (moneromooo-monero)
2016-11-01 15:12:03 +02:00
moneromooo-monero
bb560dd814
wallet: new import_outputs/export_outputs commands
The intended use is to export outputs from a hot wallet, which
can scan incoming transfers from the network, and import them
in the cold wallet, which can't. The cold wallet can then compute
key images for those outputs, which can then be exported with
export_key_images, etc.
2016-10-30 19:37:09 +00:00
moneromooo-monero
1f9e6a46d8
wallet: print tx overview on submit_transfer too
This is on the potentially compromised wallet, but still guards
against stupid mistakes.
2016-10-30 10:49:22 +00:00
Riccardo Spagni
ae987907c6
Merge pull request #1179
714ee99 Fix description for locked_transfer (Oyvind Kvanes)
71538f3 Rename to lockblocks and add max value (Oyvind Kvanes)
68ac060 Fix locked_transfer (Oyvind Kvanes)
7d020bd Add locked_transfer (Oyvind Kvanes)
d5f918a Revert transfer_main in simplewallet (Oyvind Kvanes)
3451963 Add motifications to test out locked_transfer (Oyvind Kvanes)
e5e6d88 Add more information to transaction in wallet (Oyvind Kvanes)
9b8a062 Make a small test change (Oyvind Kvanes)
2016-10-04 12:18:55 +02:00
Riccardo Spagni
bfdac4b5ff
Merge pull request #1160
80b4da3 wallet: wallet option to confirm transfers with no payment id (moneromooo-monero)
2016-10-04 12:11:32 +02:00
moneromooo-monero
80b4da3330
wallet: wallet option to confirm transfers with no payment id
set confirm-missing-payment-id 0|1

Defaults to true.
2016-10-01 17:03:53 +01:00
Oyvind Kvanes
d5f918a0b1 Revert transfer_main in simplewallet 2016-09-28 15:20:37 +02:00
moneromooo-monero
bba6af9064
wallet: cold wallet transaction signing
This change adds the ability to create a new unsigned transaction
from a watch only wallet, and save it to a file. This file can
then be moved to another computer/VM where a cold wallet may load
it, sign it, and save it. That cold wallet does not need to have
a blockchain nor daemon. The signed transaction file can then be
moved back to the watch only wallet, which can load it and send
it to the daemon.

Two new simplewallet commands to use it:
sign_transfer (on the cold wallet)
submit_transfer (on the watch only wallet)

The transfer command used on a watch only wallet now writes an
unsigned transaction set in a file called 'unsigned_monero_tx'
instead of submitting the tx to the daemon as a normal wallet does.
The signed tx file is called 'signed_monero_tx'.
2016-09-27 07:46:39 +01:00
moneromooo-monero
9c7b0cb28e
wallet: change priority/fee to ArticMine's recommendation
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-09-16 11:50:52 +01:00
moneromooo-monero
1017a75460
wallet: factor transfer_rct code with transfer code
The "transfer" simplewallet command is renamed to "transfer_original".
"transfer_new" is renamed "transfer", "transfer_rct" is removed,
and the new "transfer" now selects rct or non rct transactions
based on the current block height.
2016-08-28 21:29:05 +01:00
moneromooo-monero
dc4aad7eb5
add rct to the protocol
It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
2016-08-28 21:28:37 +01:00
Riccardo Spagni
b026650be9
Merge pull request #952
709c724 Better fix (#4) (hyc)
d2644c1 fix restore-deterministic height (luigi1111)
2016-08-11 14:57:33 +02:00
Riccardo Spagni
9273899ee7
Merge pull request #949
da1007f simplewallet: make the refresh thread into more generic idle thread (moneromooo-monero)
2016-08-11 14:56:40 +02:00
hyc
709c7247cd Better fix (#4) 2016-08-09 18:54:20 -05:00
moneromooo-monero
da1007f7cd
simplewallet: make the refresh thread into more generic idle thread 2016-08-07 16:08:50 +01:00
guzzi_jones
f0c0a3fb65 Fix #864
Squashed commit of the following:
commit 9af9e4223b
    fixed some formatting
commit c7920e1cf8
Merge: 97eb28b 1da1c68
    fix#864 fix using boolean
commit 97eb28ba5d
    Fix #864 boolean value used to verify on new wallet
commit 1da1c68bd3
    fix #864 changed to boolean to prompt for verify
commit 5bee966524
    fix 864; made variable names easier for understanding branching.
commit 45715960d3
    fix #864;  allow password to be entered twice for new wallets for verification.
fix #864 password entry verification; ammended boolean
fix #864 ; default constructor for password_container should set verify=true
2016-08-01 02:32:14 +00:00
moneromooo-monero
ebf97d76f0
wallet: new {ex,im}port_key_images commands and RPC calls
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-24 09:23:30 +01:00
Riccardo Spagni
fc3e135b83
Merge pull request #902
014f3a0 Add a daemon RPC version, and make simplewallet check it (moneromooo-monero)
2016-07-20 13:55:59 +02:00
moneromooo-monero
89d9f382a0
wallet: add command and RPC to sign/verify data
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-19 20:39:03 +01:00
moneromooo-monero
014f3a0d39
Add a daemon RPC version, and make simplewallet check it
If the version is different, simplewallet will refuse to use that
daemon, unless --allow-mismatched-daemon-version is used.
2016-07-10 16:49:40 +01: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
moneromooo-monero
f0b85c1631
simplewallet: add a status command
It matches the daemon, and should allow people who're suspicious
of the background refresh to know they're synced.
2016-06-20 19:11:10 +01:00
moneromooo-monero
7baed9bd89
wallet: allow attaching notes to txids 2016-04-26 19:07:33 +01:00
Riccardo Spagni
cde9dce9c4
Merge pull request #817
4b1c0d6 simplewallet: some background refresh threading fixes (moneromooo-monero)
2016-04-26 18:08:59 +02: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
moneromooo-monero
4b1c0d69f4
simplewallet: some background refresh threading fixes
We want to lock operations which access the blockchain in
wallet2. We also want the background refresh to happen again
when we cancel a foreground refresh. Wrap the locking setup
in a macro so it doesn't get copy/pasted/mangled, and use
a scope exit trick to ensure it's always properly restored.
2016-04-21 00:11:11 +01: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
Howard Chu
19fe8ae3ef Add --restore-height option
For specifying the block height from which to start a restore
2016-04-17 15:25:46 +01: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
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
Howard Chu
b937a2c915 Use boost::thread instead of std::thread
and all other associated IPC
2016-03-11 15:09:50 +00: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
3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
moneromooo-monero
f76f656d55
simplewallet: remove leftover command line refresh-type handling 2016-01-25 08:29:49 +00:00
Riccardo Spagni
de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
moneromooo-monero
bc8a52efd8
wallet: add a rescan_bc command and rescan_blockchain RPC
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-30 15:06:03 +00:00
moneromooo-monero
c6cfe0f26d
wallet: make the wallet refresh type a wallet setting
instead of a command line setting. It makes sense that is is
a long lived setting.
2015-12-05 21:44:25 +00:00
moneromooo-monero
d68a63e404
wallet: cancellable refresh
^C while in manual refresh will cancel the refresh, since that's
often an annoying thing to have to wait for. Also, a manual refresh
command will interrupt any running background refresh and take
over, rather than wait for the background refresh to be done, and
look to be hanging.
2015-11-29 23:24:56 +00:00
moneromooo-monero
62e49a5f02
wallet: optional automatic refresh from the daemon
The daemon will be polled every 90 seconds for new blocks.
It is enabled by default, and can be turned on/off with
set auto-refresh 1 and set auto-refresh 0 in the wallet.
2015-11-28 12:41:06 +00:00
moneromooo-monero
9b945f5211
wallet: make the refresh optimizations selectable via command line
Take the opportunity to add a no-coinbase case too, for even faster
sync when an address is known to never have mined to.
2015-11-22 19:03:10 +00:00
moneromooo-monero
9156ba3a3c
wallet: rename store-tx-keys to store-tx-info
With backward compatibility
2015-11-22 12:26:27 +00:00
moneromooo-monero
00790a8921
simplewallet: lessen display flicker confusion
Height seemed to be flying all over the place on a rescan here.
Logging to a file shows the heights are actually correct, and
this is some kind of screen refresh artifact. Flush after \r
and update less often to reduce this effect a lot.
2015-11-21 11:52:35 +00:00
moneromooo-monero
3f611bc3dc
wallet: track outgoing payments and add a show_transfers command
It's a user friendly display of incoming and outgoing transfers,
listed by height, within an optional height range.
2015-11-15 21:59:40 +00:00
moneromooo-monero
c7dc6ef8e8
simplewallet: add a set default-mixin command
The default default mixin is 4. It can now be changed per wallet.
2015-10-30 21:16:51 +00:00
moneromooo-monero
1ce2621a73
simplewallet: add a check_tx_key command
It allows one to check the amount of monero sent to a particular
address in a particular transaction, given that transaction's tx key
2015-10-14 17:26:22 +01:00
moneromooo-monero
df8a1105e6
simplewallet: add a --trusted-daemon flag
It allows enabling the rescan_spent command only for trusted
daemon
2015-10-11 19:45:59 +01:00
moneromooo-monero
e20a3ae011
simplewallet: add a store-tx-keys option to set
To enable storing tx keys in the (now encrypted) wallet cache.
2015-08-24 21:52:34 +01:00
moneromooo-monero
6c995710d8
make tx keys available to the user
They are also stored in the cache file, to be retrieved using
a new get_tx_key command.
2015-08-19 21:11:48 +01:00
moneromooo-monero
aa5bc351d4
wallet: new rescan_spent command to update outputs' spent status
This obsoletes the need for a lengthy blockchain rescan when
a transaction doesn't end up in the chain after being accepted
by the daemon, or any other reason why the wallet's idea of
spent and unspent outputs gets out of sync from the blockchain's.
2015-08-11 15:55:08 +01:00
moneromooo-monero
988fe1f843
wallet: new transaction construction algorithm
It should avoid a lot of the issues sending more than half the
wallet's contents due to change.

Actual output selection is still random. Changing this would
improve the matching of transaction amounts to output sizes,
but may have non obvious effects on blockchain analysis.

Mapped to the new transfer_new command in simplewallet, and
transfer uses the existing algorithm.

To use in RPC, add "new_algorithm: true" in the transfer_split
JSON command. It is not used in the transfer command.
2015-07-22 19:24:30 +01:00
moneromooo-monero
35378f1995
simplewallet: fix context/string order mismatch 2015-07-19 12:05:42 +01:00
moneromooo-monero
8fe180ab80
wallet: add boolean to always confirm transactions with the user
This can be useful if you want to be given a veto over the tx fee,
or if you want to see what a tx fee would be without actually sending.
2015-07-18 22:11:53 +01:00
moneromooo-monero
78b2eabc87 Translatable strings for simplewallet
The system is mostly the Qt system, but we don't use Qt to avoid
the dependencies.

See README.i18n for details.
2015-07-14 20:28:25 +01:00
moneromooo-monero
dc4dbc1ceb
simplewallet: allow creating a wallet from a public address and view secret key
The needed information is supplied via a triple:

--generate-from-view-key address:viewkey:filename
2015-06-20 17:33:14 +01:00
moneromooo-monero
63741d8264
Integrated addresses (standard address plus payment id) 2015-06-12 16:48:41 +01:00
moneromooo-monero
c882af63c1
wallet: add watch only wallet support
The new save_watch_only saves a copy of the keys file without the
spend key. It can then be given away to be used as a normal keys
file, but with no spend ability.
2015-05-31 15:34:55 +01:00
moneromooo-monero
3204f0d536
wallet: add a sweep_dust command
Sends all the dust to your own wallet. May fail (if the fee required
is more than the dust total). May end up paying most of the dust in fees.
Unlocked dust total is now also displayed in "balance".
2015-05-30 21:47:56 +01:00
luigi1111
087d7f33e7 Add spendkey dump to simplewallet 2015-05-19 19:08:37 -05:00
Riccardo Spagni
f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
warptangent
cfc8c55036
Add simple_wallet::seed_set_language method
Add simple_wallet::set_variable method to provide top-level "set"
command and support "set seed language" command.
2014-12-08 21:57:54 -08:00
Oran Juice
f1eaf88ba6
Prints seed after wallet upgrade. Removed iostream include. 2014-10-19 14:39:45 +05:30
Oran Juice
4517bac7f3
Restructured language sources to be singletons 2014-10-02 21:43:28 +05:30
Oran Juice
f31adbc977
Doxygen comments in 2014-09-27 18:20:15 +05:30
Oran Juice
a1ac92e185
Accepts seed language choice from user. 2014-09-25 18:04:30 +05:30
Zachary Michaels
07470fd400
Add testnet flag
Source: cryptonotefoundation
2014-09-15 15:53:01 +02:00
Jakob Lind
da523f30fc added viewkey command to CLI 2014-08-05 08:53:30 +02:00
Jakob Lind
4fce57b9ad added seed command to get deterministic seed.
not yet password protected
2014-08-03 16:05:15 +02:00
fluffypony
6fc995fe5d License updated to BSD 3-clause 2014-07-23 15:03:52 +02:00
Thomas Winget
d433a696e5 wallet RPC converted to use new transaction semantics
wallet RPC now uses wallet2::create_transactions and wallet2::commit_tx instead
of wallet2::transfer.  This made it possible to add the RPC call /transfer_split, which
will split transactions automatically if they are too large.  The old call to
/transfer will return an error stating to use /transfer_split if multiple
transactions are needed to fulfill the request.
2014-06-30 07:16:50 -04:00
Thomas Winget
2e048a4679 final changes to get transaction splitting building. needs testing. 2014-06-30 07:16:50 -04:00
tom
79e59d155b working on dividing functions in prep for tx splitting 2014-06-30 07:16:50 -04:00
Thomas Winget
da37b6f15b allow two-random-numbers wallet generation (but not as default) 2014-06-12 19:05:52 -04:00
Thomas Winget
b6a4751197 reworked command line args for simplewallet.
--generate-new-wallet and --wallet-file are now properly mutually-exclusive.
2014-06-12 19:05:52 -04:00
Thomas Winget
4f382b3830 most functions prototyped/modified for wallet recovery 2014-06-12 19:05:51 -04:00
mydesktop
3a3a817678 0.8.8update 2014-05-25 13:06:40 -04:00
Neozaru
4690670031 Added 'save_bc' command in daemon for saving blockchain remotely 2014-05-16 00:21:43 +02:00
mydesktop
333f975760 initial [broken] update 2014-05-03 12:19:43 -04:00
Antonio Juarez
29c2859a3e json rpc for wallet and bugfix 2014-04-02 17:00:17 +01:00
Antonio Juarez
8efa1313f3 some fixes 2014-03-20 11:46:11 +00:00