Bitcoin Core  22.99.0
P2P Digital Currency
Functions
Actions

Functions

bool CWallet::SignTransaction (CMutableTransaction &tx) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Fetch the inputs and sign with SIGHASH_ALL. More...
 
bool CWallet::SignTransaction (CMutableTransaction &tx, const std::map< COutPoint, Coin > &coins, int sighash, std::map< int, bilingual_str > &input_errors) const
 Sign the tx given the input coins and sighash. More...
 
TransactionError CWallet::FillPSBT (PartiallySignedTransaction &psbtx, bool &complete, int sighash_type=1, bool sign=true, bool bip32derivs=true, size_t *n_signed=nullptr) const
 Fills out a PSBT with information from the wallet. More...
 
SigningResult CWallet::SignMessage (const std::string &message, const PKHash &pkhash, std::string &str_sig) const
 
OutputType CWallet::TransactionChangeType (const std::optional< OutputType > &change_type, const std::vector< CRecipient > &vecSend) const
 
void CWallet::CommitTransaction (CTransactionRef tx, mapValue_t mapValue, std::vector< std::pair< std::string, std::string >> orderForm)
 Submit the transaction to the node's mempool and then relay to peers. More...
 
DBErrors CWallet::LoadWallet ()
 
DBErrors CWallet::ZapSelectTx (std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool CWallet::SetAddressBookWithDB (WalletBatch &batch, const CTxDestination &address, const std::string &strName, const std::string &strPurpose)
 
bool CWallet::SetAddressBook (const CTxDestination &address, const std::string &strName, const std::string &purpose)
 
bool CWallet::DelAddressBook (const CTxDestination &address)
 
size_t CWallet::KeypoolCountExternalKeys () const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
unsigned int CWallet::GetKeyPoolSize () const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool CWallet::TopUpKeyPool (unsigned int kpSize=0)
 
bool CWallet::GetNewDestination (const OutputType type, const std::string label, CTxDestination &dest, bilingual_str &error)
 
bool CWallet::GetNewChangeDestination (const OutputType type, CTxDestination &dest, bilingual_str &error)
 
int64_t CWallet::GetOldestKeyPoolTime () const
 
void CWallet::MarkDestinationsDirty (const std::set< CTxDestination > &destinations) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Marks all outputs in each one of the destinations dirty, so their cache is reset and does not return outdated information. More...
 
std::set< CTxDestinationCWallet::GetLabelAddresses (const std::string &label) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool ReserveDestination::GetReservedDestination (CTxDestination &pubkey, bool internal, bilingual_str &error)
 Reserve an address. More...
 
void ReserveDestination::KeepDestination ()
 Keep the address. Do not return it's key to the keypool when this object goes out of scope. More...
 
void ReserveDestination::ReturnDestination ()
 Return reserved address. More...
 
bool CWallet::DisplayAddress (const CTxDestination &dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Display address on an external signer. More...
 
bool CWallet::LockCoin (const COutPoint &output, WalletBatch *batch=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool CWallet::UnlockCoin (const COutPoint &output, WalletBatch *batch=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool CWallet::UnlockAllCoins () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool CWallet::IsLockedCoin (uint256 hash, unsigned int n) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
void CWallet::ListLockedCoins (std::vector< COutPoint > &vOutpts) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 

Detailed Description

Function Documentation

◆ CommitTransaction()

void CWallet::CommitTransaction ( CTransactionRef  tx,
mapValue_t  mapValue,
std::vector< std::pair< std::string, std::string >>  orderForm 
)

Submit the transaction to the node's mempool and then relay to peers.

Should be called after CreateTransaction unless you want to abort broadcasting the transaction.

Parameters
[in]txThe transaction to be broadcast.
[in]mapValuekey-values to be set on the transaction.
[in]orderFormBIP 70 / BIP 21 order form details to be set on the transaction.

Definition at line 1952 of file wallet.cpp.

Here is the call graph for this function:

◆ DelAddressBook()

bool CWallet::DelAddressBook ( const CTxDestination address)

Definition at line 2072 of file wallet.cpp.

Here is the call graph for this function:

◆ DisplayAddress()

bool CWallet::DisplayAddress ( const CTxDestination dest)

Display address on an external signer.

Returns false if external signer support is not compiled

Definition at line 2252 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillPSBT()

TransactionError CWallet::FillPSBT ( PartiallySignedTransaction psbtx,
bool &  complete,
int  sighash_type = 1,
bool  sign = true,
bool  bip32derivs = true,
size_t *  n_signed = nullptr 
) const

Fills out a PSBT with information from the wallet.

Fills in UTXOs if we have them. Tries to sign if sign=true. Sets complete if the PSBT is now complete (i.e. has all required signatures or signature-parts, and is ready to finalize.) Sets error and returns false if something goes wrong.

Parameters
[in]psbtxPartiallySignedTransaction to fill in
[out]completeindicates whether the PSBT is now complete
[in]sighash_typethe sighash type to use when signing (if PSBT does not specify)
[in]signwhether to sign or not
[in]bip32derivswhether to fill in bip32 derivation information if available return error

Definition at line 1855 of file wallet.cpp.

Here is the call graph for this function:

◆ GetKeyPoolSize()

unsigned int CWallet::GetKeyPoolSize ( ) const

Definition at line 2118 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLabelAddresses()

std::set< CTxDestination > CWallet::GetLabelAddresses ( const std::string &  label) const

Definition at line 2196 of file wallet.cpp.

Here is the call graph for this function:

◆ GetNewChangeDestination()

bool CWallet::GetNewChangeDestination ( const OutputType  type,
CTxDestination dest,
bilingual_str error 
)

Definition at line 2158 of file wallet.cpp.

Here is the call graph for this function:

◆ GetNewDestination()

bool CWallet::GetNewDestination ( const OutputType  type,
const std::string  label,
CTxDestination dest,
bilingual_str error 
)

Definition at line 2139 of file wallet.cpp.

Here is the call graph for this function:

◆ GetOldestKeyPoolTime()

int64_t CWallet::GetOldestKeyPoolTime ( ) const

Definition at line 2172 of file wallet.cpp.

◆ GetReservedDestination()

bool ReserveDestination::GetReservedDestination ( CTxDestination pubkey,
bool  internal,
bilingual_str error 
)

Reserve an address.

Definition at line 2211 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLockedCoin()

bool CWallet::IsLockedCoin ( uint256  hash,
unsigned int  n 
) const

Definition at line 2299 of file wallet.cpp.

Here is the call graph for this function:

◆ KeepDestination()

void ReserveDestination::KeepDestination ( )

Keep the address. Do not return it's key to the keypool when this object goes out of scope.

Definition at line 2234 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ KeypoolCountExternalKeys()

size_t CWallet::KeypoolCountExternalKeys ( ) const

Definition at line 2101 of file wallet.cpp.

Here is the call graph for this function:

◆ ListLockedCoins()

void CWallet::ListLockedCoins ( std::vector< COutPoint > &  vOutpts) const

Definition at line 2307 of file wallet.cpp.

Here is the call graph for this function:

◆ LoadWallet()

DBErrors CWallet::LoadWallet ( )

Definition at line 1992 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LockCoin()

bool CWallet::LockCoin ( const COutPoint output,
WalletBatch batch = nullptr 
)

Definition at line 2267 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MarkDestinationsDirty()

void CWallet::MarkDestinationsDirty ( const std::set< CTxDestination > &  destinations)

Marks all outputs in each one of the destinations dirty, so their cache is reset and does not return outdated information.

Definition at line 2182 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReturnDestination()

void ReserveDestination::ReturnDestination ( )

Return reserved address.

Definition at line 2243 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAddressBook()

bool CWallet::SetAddressBook ( const CTxDestination address,
const std::string &  strName,
const std::string &  purpose 
)

Definition at line 2066 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAddressBookWithDB()

bool CWallet::SetAddressBookWithDB ( WalletBatch batch,
const CTxDestination address,
const std::string &  strName,
const std::string &  strPurpose 
)
private

Definition at line 2046 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SignMessage()

SigningResult CWallet::SignMessage ( const std::string &  message,
const PKHash pkhash,
std::string &  str_sig 
) const

Definition at line 1906 of file wallet.cpp.

Here is the call graph for this function:

◆ SignTransaction() [1/2]

bool CWallet::SignTransaction ( CMutableTransaction tx) const

Fetch the inputs and sign with SIGHASH_ALL.

Definition at line 1822 of file wallet.cpp.

Here is the call graph for this function:

◆ SignTransaction() [2/2]

bool CWallet::SignTransaction ( CMutableTransaction tx,
const std::map< COutPoint, Coin > &  coins,
int  sighash,
std::map< int, bilingual_str > &  input_errors 
) const

Sign the tx given the input coins and sighash.

Definition at line 1840 of file wallet.cpp.

Here is the call graph for this function:

◆ TopUpKeyPool()

bool CWallet::TopUpKeyPool ( unsigned int  kpSize = 0)

Definition at line 2129 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TransactionChangeType()

OutputType CWallet::TransactionChangeType ( const std::optional< OutputType > &  change_type,
const std::vector< CRecipient > &  vecSend 
) const

Definition at line 1918 of file wallet.cpp.

Here is the call graph for this function:

◆ UnlockAllCoins()

bool CWallet::UnlockAllCoins ( )

Definition at line 2287 of file wallet.cpp.

Here is the call graph for this function:

◆ UnlockCoin()

bool CWallet::UnlockCoin ( const COutPoint output,
WalletBatch batch = nullptr 
)

Definition at line 2277 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZapSelectTx()

DBErrors CWallet::ZapSelectTx ( std::vector< uint256 > &  vHashIn,
std::vector< uint256 > &  vHashOut 
)

Definition at line 2015 of file wallet.cpp.

Here is the call graph for this function: