mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 11:43:26 -03:00
a4b06fb42e
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.
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
// Copyright (c) 2016-2017 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_WALLET_RPCWALLET_H
|
|
#define BITCOIN_WALLET_RPCWALLET_H
|
|
|
|
#include <string>
|
|
|
|
class CRPCTable;
|
|
class CWallet;
|
|
class JSONRPCRequest;
|
|
class UniValue;
|
|
struct PartiallySignedTransaction;
|
|
class CTransaction;
|
|
|
|
void RegisterWalletRPCCommands(CRPCTable &t);
|
|
|
|
/**
|
|
* Figures out what wallet, if any, to use for a JSONRPCRequest.
|
|
*
|
|
* @param[in] request JSONRPCRequest that wishes to access a wallet
|
|
* @return nullptr if no wallet should be used, or a pointer to the CWallet
|
|
*/
|
|
std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
|
|
|
|
std::string HelpRequiringPassphrase(CWallet *);
|
|
void EnsureWalletIsUnlocked(CWallet *);
|
|
bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
|
|
|
|
UniValue getaddressinfo(const JSONRPCRequest& request);
|
|
UniValue signrawtransactionwithwallet(const JSONRPCRequest& request);
|
|
bool FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, const CTransaction* txConst, int sighash_type = 1, bool sign = true, bool bip32derivs = false);
|
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|