aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc
AgeCommit message (Collapse)Author
2022-01-11Change type of `backup_file` parameter in RestoreWallet/restoreWalletHennadii Stepanov
`fs::path` looks more native than `std::string` for a parameter which represents a backup file. This change eliminates back-and-forth type conversions.
2021-12-30scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: * 2020: fa0074e2d82928016a43ca408717154a1c70a4db * 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2021-12-20Merge bitcoin/bitcoin#23341: RPC: Better safety with newkeypool command and ↵Andrew Chow
wallet backups a2a92317ad4ab88cfca234f68337a7cd37897f10 rpc: Add warning to user about newkeypool command (Samuel Dobson) Pull request description: This PR prevents `newkeypool` from being run on non-HD wallets, because this would require a new backup every time, so it isn't very safe. David Harding also suggested [here](https://github.com/bitcoin/bitcoin/pull/23093#issuecomment-945350003) that the RPC help text should include a warning to the users about the interaction between newkeypool. ACKs for top commit: achow101: ACK a2a92317ad4ab88cfca234f68337a7cd37897f10 Tree-SHA512: 0aa497900f1d179764bce13ffce0bb081ba2ca354492bf2e04b21d0212e960b3ed13a386fbf65602b6b50461f4056a0285752ef707d312da28e82449cd8ea048
2021-12-16Merge bitcoin/bitcoin#23750: rpcwallet: mention labels are disabled for ↵MarcoFalke
ranged descriptors 65efbba45d817261f590d043c69a9981e6b637bd rpcwallet: mention labels are deactivated for ranged descriptors (Antoine Poinsot) Pull request description: It was confusing when trying to use it as a blackbox. So mention it so next ones don't have to open the said box :) See #23749 for context ACKs for top commit: Sjors: utACK 65efbba45d817261f590d043c69a9981e6b637bd achow101: ACK 65efbba45d817261f590d043c69a9981e6b637bd Tree-SHA512: d8a3d1f81c16d95855ac2b01e8fd20e83d6dac1721b3da464a9a890e46102992a6882918be87b2a28b929349ee7f1beb1af6c88b22f065fbbb6948275a6d2b8f
2021-12-16Merge bitcoin/bitcoin#23721: wallet, refactor: Move restorewallet() logic to ↵MarcoFalke
the wallet section 62fa61fa4a33ff4d108a65d656ffe2cac4330824 refactor: remove the wallet folder if the restore fails (w0xlt) abbb7eccef3fc1c36f34756458d2792f6661e29f refactor: Move restorewallet() RPC logic to the wallet section (w0xlt) 4807f73f48f4ff1084fcf7aee94e5b14592bfda8 refactor: Implement restorewallet() logic in the wallet section (w0xlt) Pull request description: Currently `restorewallet()` logic is written in the RPC layer and it can´t be reused by GUI. So it moves this to the wallet section and then, GUI can access it. This is necessary to implement the "Restore Wallet" menu item in the GUI (which is already implemented in https://github.com/bitcoin-core/gui/pull/471 ). This commit also simplifies error handling and adds a new behavior: if the restore fails, the invalid wallet folder is removed. ACKs for top commit: achow101: ACK 62fa61fa4a33ff4d108a65d656ffe2cac4330824 shaavan: crACK 62fa61fa4a33ff4d108a65d656ffe2cac4330824 Tree-SHA512: 7ccfbad5943f38616ba0c2dd443c97a4b5bc1f6612dbf5a9e7a0263100aba36671fae929a2e7688442667be394645f44484af137a4802f204a33c4689eb27c39
2021-12-15refactor: Move restorewallet() RPC logic to the wallet sectionw0xlt
It also simplifies restorewallet() and loadwallet() RPC error handling.
2021-12-12rpcwallet: mention labels are deactivated for ranged descriptorsAntoine Poinsot
2021-12-12rpc: Add warning to user about newkeypool commandSamuel Dobson
2021-12-11Merge bitcoin/bitcoin#23113: Add warnings to createmultisig and addmultisig ↵MarcoFalke
if using uncompressed keys d5cab1a96d26e66d342fb5ec35c809bb82869d00 Add createmultisig and addmultisigaddress warnings release note (Samuel Dobson) e46fc935aa6eb392ef9411dad310697aba601f6a Add warnings field to addmultisigaddress to warn about uncompressed keys (Samuel Dobson) d1a9742623e2a8f3307c84c2df6993f62617a6f6 Add warnings field to createmultisig to warn about uncompressed keys (Samuel Dobson) Pull request description: Fixes #21368 Currently, if there are any uncompressed keys when calling `AddAndGetMultisigDestination`, it will just default to a legacy address regardless of the chosen `address_type`. Rather than keeping this silent behaviour which may be confusing to users, we explicitly add a `warnings` field which will warn the user why their address format is different. ACKs for top commit: achow101: ACK d5cab1a96d26e66d342fb5ec35c809bb82869d00 Tree-SHA512: c2ac7f7689251bd4fcd8c26506f053921fbaf34c7a26a74e82ebc7f82cc0bd25407fd7954bf98365dcafa51fa45dcdbee6214320580ca69509690c3555e71cc0
2021-12-10Merge bitcoin/bitcoin#22514: psbt: Actually use SIGHASH_DEFAULT for PSBT signingMarcoFalke
c0405ee27fa23a9868f04c052bdc94d7accc57e2 rpc: Document that DEFAULT is for Taproot, ALL for everything else (Andrew Chow) d3992669df826899a3de78a77a366dab46028026 psbt: Actually use SIGHASH_DEFAULT (Andrew Chow) eb9a1a2c595a03475fd4275b104676b7e2200f07 psbt: Make sighash_type std::optional<int> (Andrew Chow) Pull request description: Make the behavior align with the help text by actually using SIGHASH_DEFAULT as the default sighash for signing PSBTs. ACKs for top commit: Sjors: re-utACK c0405ee27fa23a9868f04c052bdc94d7accc57e2 Tree-SHA512: 5199fb41de416b2f10ac451f824e7c94b428ba11fdb9e50f0027c692e959ce5813a340c34a4e52d7aa128e12008303d80939a693eff36a869720e45442119828
2021-12-08rpc: Document that DEFAULT is for Taproot, ALL for everything elseAndrew Chow
2021-12-08scripted-diff: Use named args in RPC docsMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e 's|, /\* optional \*/ true,|, /*optional=*/true,|g' $( git grep -l ', /\* optional \*/ true,' ) -END VERIFY SCRIPT-
2021-12-08Add warnings field to addmultisigaddress to warn about uncompressed keysSamuel Dobson
2021-12-08MOVEONLY: Move abortrescan from backup.cpp to transactions.cppSamuel Dobson
2021-12-08Remove unused imports from rpc/wallet and reorder RPCsSamuel Dobson
2021-12-08MOVEONLY: Move rpcwallet to rpc/walletSamuel Dobson
2021-12-08MOVEONLY: Move spending RPCs to spend.cppSamuel Dobson
2021-12-08MOVEONLY: Move balance and utxo RPCs to coins.cppSamuel Dobson
2021-12-08MOVEONLY: Move address related functions from rpcwallet to addresses.cppSamuel Dobson
2021-12-08MOVEONLY: Move transaction related wallet RPCs to transactions.cppSamuel Dobson
2021-12-03rpc: Add missing BlockUntilSyncedToCurrentChain to wallet RPCsMarcoFalke
Wallet RPCs that allow a rescan based on block-timestamp or block-height need to sync with the active chain first, because the user might assume the wallet is up-to-date with the latest block they got reported via a blockchain RPC.
2021-12-03Merge bitcoin/bitcoin#23413: Replace MakeSpan helper with Span deduction guideMarcoFalke
11daf6ceb1d9ea1f8d638b123eecfe39d162a7c3 More Span simplifications (Pieter Wuille) 568dd2f83900a11a4dbba1250722791a135bf0a9 Replace MakeSpan helper with Span deduction guide (Pieter Wuille) Pull request description: C++17 supports [user-defined deduction guides](https://en.cppreference.com/w/cpp/language/class_template_argument_deduction), allowing class constructors to be invoked without specifying class template arguments. Instead, the code can contain rules to infer the template arguments from the constructor argument types. This alleviates the need for the `MakeSpan` helper. Convert the existing MakeSpan rules into deduction rules for `Span` itself, and replace all invocations of `MakeSpan` with just `Span` ones. ACKs for top commit: MarcoFalke: re-ACK 11daf6ceb1d9ea1f8d638b123eecfe39d162a7c3 Only change is removing a hunk in the tests 🌕 Tree-SHA512: 10f3e82e4338f39d9b7b407cd11aac7ebe1e9191b58e3d7f4e5e338a4636c0e126b4a1d912127c7446f57ba356c8d6544482e47f97901efea6a54fffbfd7895f
2021-12-03MOVEONLY: Move LoadWalletHelper to wallet/rpc/utilSamuel Dobson
2021-12-03MOVEONLY: Move wallet encryption RPCs to encrypt.cppSamuel Dobson
2021-12-03MOVEONLY: Move backupwallet and restorewallet to rpc/backup.cppSamuel Dobson
2021-12-03MOVEONLY: Move rpcdump.cpp to wallet/rpc/backup.cppSamuel Dobson
2021-12-01MOVEONLY: Move utility functions from rpcwallet to wallet/rpc/utilSamuel Dobson
2021-12-01Introduce wallet/rpc/utilSamuel Dobson
2021-11-26wallet: Split signmessage from rpcwalletMarcoFalke
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space