Commit Graph

443 Commits

Author SHA1 Message Date
jeffro256 51d7a6921c
wallet: feature: transfer amount with fee included
To transfer ~5 XMR to an address such that your balance drops by exactly 5 XMR, provide a `subtractfeefrom` flag to the `transfer` command. For example:

    transfer 76bDHojqFYiFCCYYtzTveJ8oFtmpNp3X1TgV2oKP7rHmZyFK1RvyE4r8vsJzf7SyNohMnbKT9wbcD3XUTgsZLX8LU5JBCfm 5 subtractfeefrom=all

If my walet balance was exactly 30 XMR before this transaction, it will be exactly 25 XMR afterwards and the destination address will receive slightly
less than 5 XMR. You can manually select which destinations fund the transaction fee and which ones do not by providing the destination index.
For example:

    transfer 75sr8AAr... 3 74M7W4eg... 4 7AbWqDZ6... 5 subtractfeefrom=0,2

This will drop your balance by exactly 12 XMR including fees and will spread the fee cost proportionally (3:5 ratio) over destinations with addresses
`75sr8AAr...` and `7AbWqDZ6...`, respectively.

Disclaimer: This feature was paid for by @LocalMonero.
2024-02-20 17:08:42 -06:00
selsta 03d51b7cc4
wallet2: fix refresh function parameters
max_blocks is last on master branch
2023-10-01 20:56:31 +02:00
moneromooo-monero 356e6877dc
wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing 2023-08-17 15:35:00 +00:00
moneromooo-monero 633e1b7359
wallet_rpc_server: add --no-initial-sync flag for quicker network binding 2023-08-17 15:34:57 +00:00
luigi1111 9d5c5b5634
Merge pull request #8942
78348bc wallet-rpc: restore from multisig seed (jeffro256)
2023-08-17 10:24:16 -05:00
jeffro256 78348bcddd
wallet-rpc: restore from multisig seed 2023-08-10 10:13:07 -05:00
j-berman f137a35984 Enforce restricted # pool txs served via RPC + optimize chunked reqs [release-v0.18]
- `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when
returning pool txs via a restricted RPC daemon.
- A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs
in the `added_pool_txs` field, and returns any remaining pool hashes
in the `remaining_added_pool_txids` field. The client then requests
the remaining txs via `/gettransactions` in chunks.
- `/gettransactions` no longer does expensive no-ops for ALL pool txs
if the client requests a subset of pool txs. Instead it searches for
the txs the client explicitly requests.
- Reset `m_pool_info_query_time` when a user:
  (1) rescans the chain (so the wallet re-requests the whole pool)
  (2) changes the daemon their wallets points to (a new daemon would
      have a different view of the pool)
- `/getblocks.bin` respects the `req.prune` field when returning
pool txs.
- Pool extension fields in response to `/getblocks.bin` are optional
with default 0'd values.
2023-07-09 08:38:18 +02:00
j-berman 65e13dbef1 wallet2: fix rescanning tx via scan_tx
- Detach & re-process txs >= lowest scan height
- ensures that if a user calls scan_tx(tx1) after scanning tx2,
the wallet correctly processes tx1 and tx2
- if a user provides a tx with a height higher than the wallet's
last scanned height, the wallet will scan starting from that tx's
height
- scan_tx requires trusted daemon iff need to re-process existing
txs: in addition to querying a daemon for txids, if a user
provides a txid of a tx with height *lower* than any *already*
scanned txs in the wallet, then the wallet will also query the
daemon for all the *higher* txs as well. This is likely
unexpected behavior to a caller, and so to protect a caller from
revealing txid's to an untrusted daemon in an unexpected way,
require the daemon be trusted.
2023-03-13 12:57:43 -07:00
koe 1cd21bfba5 add an option to force-update multisig key exchange under some circumstances 2022-09-21 12:51:19 -05:00
moneromooo-monero 0cbf5571d3
allow exporting outputs in chunks
this will make it easier huge wallets to do so without hitting
random limits (eg, max string size in node).
2022-09-07 06:22:07 +00:00
moneromooo-monero 2979474221
disable multisig by default
There are vulnerabilities in multisig protocol if the parties do not
trust each other, and while there is a patch for it, it has not been
throroughly reviewed yet, so it is felt safer to disable multisig by
default for now.
If all parties in a multisig setup trust each other, then it is safe
to enable multisig.
2022-05-17 19:52:03 +00:00
luigi1111 c1625a8928
Merge pull request #8220
0d6ecb1 multisig: add post-kex verification round to check that all participants have completed the multisig address (koe)
2022-05-10 16:41:02 -05:00
koe 0d6ecb1136 multisig: add post-kex verification round to check that all participants have completed the multisig address 2022-04-29 14:04:59 -05:00
luigi1111 f096ac1349
Merge pull request #8215
d1f1947 wallet_rpc_server: support regex for get_accounts tag (reemuru)
2022-04-06 00:16:20 -04:00
luigi1111 9a124f6811
Merge pull request #8213
7dcfccb wallet_rpc_server: fix make_integrated_address with no payment id (moneromooo-monero)
2022-04-06 00:15:40 -04:00
reemuru d1f1947995
wallet_rpc_server: support regex for get_accounts tag
This commit adds a 'regexp' boolean field to the get_accounts
request. The flag is set to false by default and maintains backwards
compatibility. When set to true the user can search tags by regular
expression filters. An additional error message was added for failed
regular expression searches. Bump minor version to 25.
2022-03-13 11:30:48 -04:00
moneromooo-monero 7dcfccbaaf
wallet_rpc_server: fix make_integrated_address with no payment id 2022-03-11 17:23:19 +00:00
mj-xmr da9aa1f7f8
Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
luigi1111 27f1d43547
Merge pull request #8145
fb5b2b3 support authentication in monero-wallet-rpc set_daemon (woodser)
2022-03-02 18:53:34 -05:00
koe e08abaa43f multisig key exchange update and refactor 2022-02-22 16:37:42 -06:00
woodser fb5b2b352a support authentication in monero-wallet-rpc set_daemon 2022-01-17 17:03:56 -05:00
luigi1111 9273530bff
Merge pull request #7898
f353c29 wallet_rpc_server: fix help text remaining bold (selsta)
2021-09-09 15:20:43 -04:00
luigi1111 dfa6b58d4d
Merge pull request #7823
24d3d65 monero-wallet-rpc: Prevent --password-file from being used with --wallet-dir (Kermit Alexander II)
2021-09-09 15:14:17 -04:00
selsta f353c295f9
wallet_rpc_server: fix help text remaining bold 2021-08-27 02:59:36 +02:00
Kermit Alexander II 24d3d65d42 monero-wallet-rpc: Prevent --password-file from being used with --wallet-dir 2021-08-20 08:54:41 -05:00
Alex Opie 5fa1c90102
Fix describe_transfer for multiple txes in a txset
This ensures each list of recipients is only the recipients
for one transaction. It also adds a new field "summary"
that describes the txset as a whole.

Fixes #7344
2021-08-02 20:39:49 +02:00
woodser e7615772fa provide key images of spent outputs in wallet rpc 2021-06-15 15:54:39 -04:00
luigi1111 7499837a6f
Merge pull request #7661
08e4497 Improve cryptonote (block and tx) binary read performance (Lee Clagett)
2021-06-10 12:00:54 -05:00
woodser b2e1558bde support freeze, thaw, and frozen in wallet rpc 2021-05-18 20:35:48 -04:00
luigi1111 9bba3f4767
Merge pull request #7651
c8ff1d4 monero-wallet-cli: improve error message when tx amount is zero (Elliot Wirrick)
2021-04-22 01:35:20 -04:00
Elliot Wirrick c8ff1d4d23 monero-wallet-cli: improve error message when tx amount is zero 2021-04-07 10:10:16 -04:00
luigi1111 3c69596bc9
Merge pull request #7321
f9b5b52 fix serialization being different on mac (moneromooo-monero)
2021-04-06 12:20:15 -05:00
luigi1111 e1d987aa66
Merge pull request #7430
064eeb2 wallet_rpc_server: set seed language in generate_from_keys (moneromooo-monero)
2021-03-29 22:37:19 -04:00
luigi1111 5b8d714a4b
Merge pull request #7422
d46d90c return output key for incoming transfers (benevanoff)
2021-03-20 01:57:44 -04:00
moneromooo-monero 064eeb2861
wallet_rpc_server: set seed language in generate_from_keys
Also sanity check language name
2021-03-06 10:26:15 +00:00
moneromooo-monero f9b5b521e8
fix serialization being different on mac
On Mac, size_t is a distinct type from uint64_t, and some
types (in wallet cache as well as cold/hot wallet transfer
data) use pairs/containers with size_t as fields. Mac would
save those as full size, while other platforms would save
them as varints. Might apply to other platforms where the
types are distinct.

There's a nasty hack for backward compatibility, which can
go after a couple forks.
2021-03-05 23:42:33 +00:00
benevanoff d46d90c436 return output key for incoming transfers 2021-03-04 11:09:15 -06:00
tobtoht 6477b47ac7 wallet_rpc: add scan_tx 2021-03-01 23:02:43 +01:00
luigi1111 6556c33f13
Merge pull request #7355
bd12984 Remove copies from foreach loops (thanks to Clang) (Lee Clagett)
1572df9 Removing unused namespace alias (Lee Clagett)
2021-02-18 14:06:47 -05:00
luigi1111 ce5800a225
Merge pull request #7346
85db173 Remove unused variables in monero codebase (Kevin Barbour)
2021-02-18 14:03:31 -05:00
Kevin Barbour 85db1734e7
Remove unused variables in monero codebase
There are quite a few variables in the code that are no longer
(or perhaps never were) in use. These were discovered by enabling
compiler warnings for unused variables and cleaning them up.

In most cases where the unused variables were the result
of a function call the call was left but the variable
assignment removed, unless it was obvious that it was
a simple getter with no side effects.
2021-02-09 08:05:05 +01:00
Lee Clagett bd129849f0 Remove copies from foreach loops (thanks to Clang) 2021-01-28 23:42:40 -05:00
Lee Clagett 08e4497c6e Improve cryptonote (block and tx) binary read performance 2021-01-23 06:23:39 +00:00
xiphon 015da03a6f wallet_rpc_server: don't abort on initial refresh failure 2021-01-07 13:38:15 +00:00
Sarang Noether fa06c39d97 Bind signature to full address and signing mode 2020-08-28 19:38:00 -04:00
moneromooo-monero 743608ec16 wallet: allow signing a message with spend or view key 2020-08-28 19:25:17 -04:00
moneromooo-monero 7175dcb107
replace most boost serialization with existing monero serialization
This reduces the attack surface for data that can come from
malicious sources (exported output and key images, multisig
transactions...) since the monero serialization is already
exposed to the outside, and the boost lib we were using had
a few known crashers.

For interoperability, a new load-deprecated-formats wallet
setting is added (off by default). This allows loading boost
format data if there is no alternative. It will likely go
at some point, along with the ability to load those.

Notably, the peer lists file still uses the boost serialization
code, as the data it stores is define in epee, while the new
serialization code is in monero, and migrating it was fairly
hairy. Since this file is local and not obtained from anyone
else, the marginal risk is minimal, but it could be migrated
later if needed.

Some tests and tools also do, this will stay as is for now.
2020-08-17 16:23:58 +00:00
Alexander Blair 0f5eb0e70c
Merge pull request #6546
eda167585 wallet_rpc_server: use unlock_time in suggested confirmations calc (moneromooo-monero)
2020-08-16 12:40:51 -07:00
moneromooo-monero eda1675858
wallet_rpc_server: use unlock_time in suggested confirmations calc 2020-05-17 01:03:32 +00:00
SomaticFanatic 5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00