Bitcoin Core  24.99.0
P2P Digital Currency
Functions
Actions

Functions

bool wallet::CWallet::SignTransaction (CMutableTransaction &tx) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Fetch the inputs and sign with SIGHASH_ALL. More...
 
bool wallet::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 wallet::CWallet::FillPSBT (PartiallySignedTransaction &psbtx, bool &complete, int sighash_type=SIGHASH_DEFAULT, bool sign=true, bool bip32derivs=true, size_t *n_signed=nullptr, bool finalize=true) const
 Fills out a PSBT with information from the wallet. More...
 
SigningResult wallet::CWallet::SignMessage (const std::string &message, const PKHash &pkhash, std::string &str_sig) const
 
OutputType wallet::CWallet::TransactionChangeType (const std::optional< OutputType > &change_type, const std::vector< CRecipient > &vecSend) const
 
void wallet::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 wallet::CWallet::LoadWallet ()
 
DBErrors wallet::CWallet::ZapSelectTx (std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool wallet::CWallet::SetAddressBookWithDB (WalletBatch &batch, const CTxDestination &address, const std::string &strName, const std::string &strPurpose)
 
bool wallet::CWallet::SetAddressBook (const CTxDestination &address, const std::string &strName, const std::string &purpose)
 
bool wallet::CWallet::DelAddressBook (const CTxDestination &address)
 
size_t wallet::CWallet::KeypoolCountExternalKeys () const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
unsigned int wallet::CWallet::GetKeyPoolSize () const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool wallet::CWallet::TopUpKeyPool (unsigned int kpSize=0)
 
util::Result< CTxDestinationwallet::CWallet::GetNewDestination (const OutputType type, const std::string label)
 
util::Result< CTxDestinationwallet::CWallet::GetNewChangeDestination (const OutputType type)
 
std::optional< int64_t > wallet::CWallet::GetOldestKeyPoolTime () const
 
void wallet::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...
 
void wallet::CWallet::ForEachAddrBookEntry (const ListAddrBookFunc &func) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
std::vector< CTxDestinationwallet::CWallet::ListAddrBookAddresses (const std::optional< AddrBookFilter > &filter) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Filter and retrieve destinations stored in the addressbook. More...
 
std::set< std::string > wallet::CWallet::ListAddrBookLabels (const std::string &purpose) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Retrieve all the known labels in the address book. More...
 
util::Result< CTxDestinationwallet::ReserveDestination::GetReservedDestination (bool internal)
 Reserve an address. More...
 
void wallet::ReserveDestination::KeepDestination ()
 Keep the address. Do not return it's key to the keypool when this object goes out of scope. More...
 
void wallet::ReserveDestination::ReturnDestination ()
 Return reserved address. More...
 
bool wallet::CWallet::DisplayAddress (const CTxDestination &dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Display address on an external signer. More...
 
bool wallet::CWallet::LockCoin (const COutPoint &output, WalletBatch *batch=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool wallet::CWallet::UnlockCoin (const COutPoint &output, WalletBatch *batch=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool wallet::CWallet::UnlockAllCoins () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
bool wallet::CWallet::IsLockedCoin (const COutPoint &output) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 
void wallet::CWallet::ListLockedCoins (std::vector< COutPoint > &vOutpts) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 

Detailed Description

Function Documentation

◆ CommitTransaction()

void wallet::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 2183 of file wallet.cpp.

Here is the call graph for this function:

◆ DelAddressBook()

bool wallet::CWallet::DelAddressBook ( const CTxDestination address)

Definition at line 2304 of file wallet.cpp.

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

◆ DisplayAddress()

bool wallet::CWallet::DisplayAddress ( const CTxDestination dest)

Display address on an external signer.

Returns false if external signer support is not compiled

Definition at line 2504 of file wallet.cpp.

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

◆ FillPSBT()

TransactionError wallet::CWallet::FillPSBT ( PartiallySignedTransaction psbtx,
bool &  complete,
int  sighash_type = SIGHASH_DEFAULT,
bool  sign = true,
bool  bip32derivs = true,
size_t *  n_signed = nullptr,
bool  finalize = true 
) 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
[out]n_signedthe number of inputs signed by this wallet
[in]finalizewhether to create the final scriptSig or scriptWitness if possible return error

Definition at line 2026 of file wallet.cpp.

Here is the call graph for this function:

◆ ForEachAddrBookEntry()

void wallet::CWallet::ForEachAddrBookEntry ( const ListAddrBookFunc func) const

Definition at line 2427 of file wallet.cpp.

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

◆ GetKeyPoolSize()

unsigned int wallet::CWallet::GetKeyPoolSize ( ) const

Definition at line 2350 of file wallet.cpp.

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

◆ GetNewChangeDestination()

util::Result< CTxDestination > wallet::CWallet::GetNewChangeDestination ( const OutputType  type)

Definition at line 2388 of file wallet.cpp.

Here is the call graph for this function:

◆ GetNewDestination()

util::Result< CTxDestination > wallet::CWallet::GetNewDestination ( const OutputType  type,
const std::string  label 
)

Definition at line 2371 of file wallet.cpp.

Here is the call graph for this function:

◆ GetOldestKeyPoolTime()

std::optional< int64_t > wallet::CWallet::GetOldestKeyPoolTime ( ) const

Definition at line 2399 of file wallet.cpp.

◆ GetReservedDestination()

util::Result< CTxDestination > wallet::ReserveDestination::GetReservedDestination ( bool  internal)

Reserve an address.

Definition at line 2466 of file wallet.cpp.

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

◆ IsLockedCoin()

bool wallet::CWallet::IsLockedCoin ( const COutPoint output) const

Definition at line 2550 of file wallet.cpp.

Here is the call graph for this function:

◆ KeepDestination()

void wallet::ReserveDestination::KeepDestination ( )

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

Definition at line 2486 of file wallet.cpp.

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

◆ KeypoolCountExternalKeys()

size_t wallet::CWallet::KeypoolCountExternalKeys ( ) const

Definition at line 2333 of file wallet.cpp.

Here is the call graph for this function:

◆ ListAddrBookAddresses()

std::vector< CTxDestination > wallet::CWallet::ListAddrBookAddresses ( const std::optional< AddrBookFilter > &  filter) const

Filter and retrieve destinations stored in the addressbook.

Definition at line 2436 of file wallet.cpp.

Here is the call graph for this function:

◆ ListAddrBookLabels()

std::set< std::string > wallet::CWallet::ListAddrBookLabels ( const std::string &  purpose) const

Retrieve all the known labels in the address book.

Definition at line 2452 of file wallet.cpp.

Here is the call graph for this function:

◆ ListLockedCoins()

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

Definition at line 2556 of file wallet.cpp.

Here is the call graph for this function:

◆ LoadWallet()

DBErrors wallet::CWallet::LoadWallet ( )

Definition at line 2224 of file wallet.cpp.

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

◆ LockCoin()

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

Definition at line 2518 of file wallet.cpp.

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

◆ MarkDestinationsDirty()

void wallet::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 2413 of file wallet.cpp.

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

◆ ReturnDestination()

void wallet::ReserveDestination::ReturnDestination ( )

Return reserved address.

Definition at line 2495 of file wallet.cpp.

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

◆ SetAddressBook()

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

Definition at line 2298 of file wallet.cpp.

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

◆ SetAddressBookWithDB()

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

Definition at line 2278 of file wallet.cpp.

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

◆ SignMessage()

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

Definition at line 2107 of file wallet.cpp.

Here is the call graph for this function:

◆ SignTransaction() [1/2]

bool wallet::CWallet::SignTransaction ( CMutableTransaction tx) const

Fetch the inputs and sign with SIGHASH_ALL.

Definition at line 1992 of file wallet.cpp.

Here is the call graph for this function:

◆ SignTransaction() [2/2]

bool wallet::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 2011 of file wallet.cpp.

Here is the call graph for this function:

◆ TopUpKeyPool()

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

Definition at line 2361 of file wallet.cpp.

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

◆ TransactionChangeType()

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

Definition at line 2120 of file wallet.cpp.

Here is the call graph for this function:

◆ UnlockAllCoins()

bool wallet::CWallet::UnlockAllCoins ( )

Definition at line 2538 of file wallet.cpp.

Here is the call graph for this function:

◆ UnlockCoin()

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

Definition at line 2528 of file wallet.cpp.

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

◆ ZapSelectTx()

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

Definition at line 2247 of file wallet.cpp.

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