aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.h
AgeCommit message (Collapse)Author
2021-03-29refactor: replace util::Ref by std::any (C++17)Sebastian Falbesoner
2021-03-05rpc: refactor rpc wallet functions to take references instead of pointersfanquake
Co-authored-by: MarcoFalke <falke.marco@gmail.com> Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2020-09-22Assert that RPCArg names are equal to CRPCCommand ones (net, rpcwallet)MarcoFalke
2020-06-05refactor: Combine GetWalletForJSONRPCRequest and EnsureWalletIsAvailable ↵Russell Yanofsky
functions This simplifies control flow and also helps get rid of the ::vpwallets variable, because EnsureWalletIsAvailable doesn't have access to the request context.
2020-05-28Remove g_rpc_chain globalRussell Yanofsky
Replace with RPC request reference to new WalletContext struct similar to the existing NodeContext struct and reference. This PR is a followup to 25ad2c623af30056ffb36dcd203a52edda2b170f https://github.com/bitcoin/bitcoin/pull/18740 removing the g_rpc_node global. Some later PRs will follow this up and move more wallet globals to the WalletContext struct. Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2020-05-28refactor: replace RegisterWalletRPCCommands with GetWalletRPCCommandsRussell Yanofsky
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-04-02rpc: Make rpc documentation not depend on rpc argsMarcoFalke
2020-01-23Refactor: Allow LegacyScriptPubKeyMan to be nullAndrew Chow
In CWallet::LoadWallet, use this to detect and empty wallet with no keys This commit does not change behavior.
2019-11-05Add EnsureLegacyScriptPubKeyMan and use in rpcwallet.cppRussell Yanofsky
This also fixes unused variable warnings in rpcdump.cpp
2019-10-28Avoid using g_rpc_node global in wallet codeRussell Yanofsky
Wallet code should use interfaces::Chain and not directly access to node state. Add a g_rpc_chain replacement global for wallet code to use, and move g_rpc_node definition to a libbitcoin_server source file so there are link errors if wallet code tries to access it.
2019-05-16Merge #15870: wallet: Only fail rescan when blocks have actually been prunedMarcoFalke
fa7e311e16 [doc] rpcwallet: Only fail rescan when blocks have been pruned (MarcoFalke) aaaa57c2aa scripted-diff: Bump copyright headers in wallet (MarcoFalke) faf3729242 wallet: Only fail rescan when blocks have actually been pruned (MarcoFalke) Pull request description: This brings the behaviour of the import* calls closer to importmulti. After this change, the difference between importmulti and the other import* calls is * that in importmulti you can "opt-out" of scanning early blocks by setting a later timestamp. * that in importmulti the wallet will successfully import the data, but fail to rescan. Whereas in the other calls, the wallet will abort before importing the data. ACKs for commit fa7e31: promag: utACK fa7e311e169349bfcf1dab8b980724e8ddf4e749. jnewbery: utACK fa7e311e169349bfcf1dab8b980724e8ddf4e749 Tree-SHA512: a57d52ffea94b64e0eb9b5d3a7a63031325833908297dd14eb0c5251ffea3b2113b131003f1db4e9599e014369165a57f107a7150bb65e4c791e5fe742f33cb8
2019-05-06scripted-diff: Bump copyright headers in walletMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/wallet/ -END VERIFY SCRIPT-
2019-05-02rpcwallet: Make helper methods const on CWalletMarcoFalke
2019-03-05Remove use of CRPCTable::appendCommand in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-11Move PSBT definitions and code to separate filesGlenn Willen
Move non-wallet PSBT code to src/psbt.{h,cpp}, and PSBT wallet code to src/wallet/psbtwallet.{h,cpp}. This commit contains only code movement (and adjustments to includes and Makefile.am.)
2018-11-01Simplify arguments to SignPSBTInputGlenn Willen
Remove redundant arguments to SignPSBTInput -- since it needs several bits of the PartiallySignedTransaction, pass in a reference instead of doing it piecemeal. This saves us having to pass in both a PSBTInput and its index, as well as having to pass in the CTransaction. Also avoid redundantly passing the sighash_type, which is contained in the PSBTInput already.
2018-11-01Remove redundant txConst parameter to FillPSBTGlenn Willen
2018-07-27Update copyright headers to 2018DrahtBot
2018-07-16Create wallet RPCs for PSBTAndrew Chow
walletprocesspsbt takes a PSBT format transaction, updates the PSBT with any inputs related to this wallet, signs, and finalizes the transaction. There is also an option to not sign and just update. walletcreatefundedpsbt creates a PSBT from user provided data in the same form as createrawtransaction. It also funds the transaction and takes an options argument in the same form as fundrawtransaction. The resulting PSBT is blank with no input or output data filled in.
2018-05-22wallet: Use shared pointer to retain wallet instanceJoão Barbosa
2018-02-17Split signrawtransaction into wallet and non-walletAndrew Chow
Splits signrwatransaction into a wallet version (signrawtransactionwithwallet) and non-wallet version (signrawtransactionwithkey). signrawtransaction is marked as DEPRECATED and will call the right signrawtransaction* command as per the parameters in order to maintain compatibility. Updated signrawtransactions test to use new RPCs
2018-02-16Create getaddressinfo RPC and deprecate parts of validateaddressAndrew Chow
Moves the parts of validateaddress which require the wallet into getaddressinfo which is part of the wallet RPCs. Mark those parts of validateaddress which require the wallet as deprecated. Validateaddress will call getaddressinfo for the data that both share for right now. Moves IsMine functions to libbitcoin_common and then links libbitcoin_wallet before libbitcoin_common in order to prevent linker errors since IsMine is no longer used in libbitcoin_server.
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-09-07[wallet] Add RegisterWalletRPC() function to wallet/init.cppJohn Newbery
2017-08-07scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift
instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
2017-07-16Fix incorrect Doxygen tag (@ince → @since). Make Doxygen parameter names ↵practicalswift
match actual parameter names.
2017-02-27Move wallet RPC declarations to rpcwallet.hLuke Dashjr
2016-08-25Do not shadow global RPC table variable (tableRPC)Pavel Janík
2016-03-31rpc: Register calls where they are definedWladimir J. van der Laan
Split out methods to every module, apart from 'help' and 'stop' which are implemented in rpcserver.cpp itself. - This makes it easier to add or remove RPC commands - no longer everything that includes rpcserver.h has to be rebuilt when there's a change there. - Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions. - Removes most of the bitcoin-specific code from rpcserver.cpp and .h. Continues #7307 for the non-wallet.
2016-01-20[RPC, Wallet] Move RPC dispatch table registration to wallet/ codeJonas Schnelli
Allow extending the rpc dispatch table by appending commands when server is not running.