![]() |
Bitcoin ABC
0.22.13
P2P Digital Currency
|
Functions | |
static bool | IsCurrentForAntiFeeSniping (interfaces::Chain &chain, const BlockHash &block_hash) |
static uint32_t | GetLocktimeForNewTransaction (interfaces::Chain &chain, const BlockHash &block_hash, int block_height) |
Return a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain. More... | |
Balance | CWallet::GetBalance (int min_depth=0, bool avoid_reuse=true) const |
Amount | CWallet::GetAvailableBalance (const CCoinControl *coinControl=nullptr) const |
void | CWallet::AvailableCoins (std::vector< COutput > &vCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const Amount nMinimumAmount=SATOSHI, const Amount nMaximumAmount=MAX_MONEY, const Amount nMinimumSumAmount=MAX_MONEY, const uint64_t nMaximumCount=0) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
populate vCoins with vector of available COutputs. More... | |
std::map< CTxDestination, std::vector< COutput > > | CWallet::ListCoins () const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
Return list of available coins and locked coins grouped by non-change output address. More... | |
const CTxOut & | CWallet::FindNonChangeParentOutput (const CTransaction &tx, int output) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
Find non-change parent output. More... | |
bool | CWallet::SelectCoinsMinConf (const Amount nTargetValue, const CoinEligibilityFilter &eligibility_filter, std::vector< OutputGroup > groups, std::set< CInputCoin > &setCoinsRet, Amount &nValueRet, const CoinSelectionParams &coin_selection_params, bool &bnb_used) const |
Shuffle and select coins until nTargetValue is reached while avoiding small change; This method is stochastic for some inputs and upon completion the coin set and corresponding actual target value is assembled. More... | |
bool | CWallet::SelectCoins (const std::vector< COutput > &vAvailableCoins, const Amount nTargetValue, std::set< CInputCoin > &setCoinsRet, Amount &nValueRet, const CCoinControl &coin_control, CoinSelectionParams &coin_selection_params, bool &bnb_used) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
Select a set of coins such that nValueRet >= nTargetValue and at least all coins from coinControl are selected; Never select unconfirmed coins if they are not ours. More... | |
bool | CWallet::SignTransaction (CMutableTransaction &tx) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
bool | CWallet::SignTransaction (CMutableTransaction &tx, const std::map< COutPoint, Coin > &coins, SigHashType sighash, std::map< int, std::string > &input_errors) const |
TransactionError | CWallet::FillPSBT (PartiallySignedTransaction &psbtx, bool &complete, SigHashType sighash_type=SigHashType().withForkId(), bool sign=true, bool bip32derivs=true) 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 |
bool | CWallet::FundTransaction (CMutableTransaction &tx, Amount &nFeeRet, int &nChangePosInOut, bilingual_str &error, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, CCoinControl coinControl) |
Insert additional inputs into the transaction by calling CreateTransaction();. More... | |
OutputType | CWallet::TransactionChangeType (OutputType change_type, const std::vector< CRecipient > &vecSend) |
bool | CWallet::CreateTransactionInternal (const std::vector< CRecipient > &vecSend, CTransactionRef &tx, Amount &nFeeRet, int &nChangePosInOut, bilingual_str &error, const CCoinControl &coin_control, bool sign) |
bool | CWallet::CreateTransaction (const std::vector< CRecipient > &vecSend, CTransactionRef &tx, Amount &nFeeRet, int &nChangePosInOut, bilingual_str &error, const CCoinControl &coin_control, bool sign=true) |
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed. More... | |
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 (bool &fFirstRunRet) |
DBErrors | CWallet::ZapSelectTx (std::vector< TxId > &txIdsIn, std::vector< TxId > &txIdsOut) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
DBErrors | CWallet::ZapWalletTx (std::vector< CWalletTx > &vWtx) |
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, std::string &error) |
bool | CWallet::GetNewChangeDestination (const OutputType type, CTxDestination &dest, std::string &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::map< CTxDestination, Amount > | CWallet::GetAddressBalances () const |
std::set< std::set< CTxDestination > > | CWallet::GetAddressGroupings () const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
std::set< CTxDestination > | CWallet::GetLabelAddresses (const std::string &label) const |
bool | ReserveDestination::GetReservedDestination (CTxDestination &pubkey, bool internal) |
Reserve an address. More... | |
void | ReserveDestination::KeepDestination () |
Keep the address. More... | |
void | ReserveDestination::ReturnDestination () |
Return reserved address. More... | |
void | CWallet::LockCoin (const COutPoint &output) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
void | CWallet::UnlockCoin (const COutPoint &output) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
void | CWallet::UnlockAllCoins () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
bool | CWallet::IsLockedCoin (const COutPoint &outpoint) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
void | CWallet::ListLockedCoins (std::vector< COutPoint > &vOutpts) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
void CWallet::AvailableCoins | ( | std::vector< COutput > & | vCoins, |
bool | fOnlySafe = true , |
||
const CCoinControl * | coinControl = nullptr , |
||
const Amount | nMinimumAmount = SATOSHI , |
||
const Amount | nMaximumAmount = MAX_MONEY , |
||
const Amount | nMinimumSumAmount = MAX_MONEY , |
||
const uint64_t | nMaximumCount = 0 |
||
) | const |
populate vCoins with vector of available COutputs.
Definition at line 2294 of file wallet.cpp.
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.
[in] | tx | The transaction to be broadcast. |
[in] | mapValue | key-values to be set on the transaction. |
[in] | orderForm | BIP 70 / BIP 21 order form details to be set on the transaction. |
Definition at line 3409 of file wallet.cpp.
bool CWallet::CreateTransaction | ( | const std::vector< CRecipient > & | vecSend, |
CTransactionRef & | tx, | ||
Amount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
bilingual_str & | error, | ||
const CCoinControl & | coin_control, | ||
bool | sign = true |
||
) |
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed.
Definition at line 3371 of file wallet.cpp.
|
private |
bool CWallet::DelAddressBook | ( | const CTxDestination & | address | ) |
TransactionError CWallet::FillPSBT | ( | PartiallySignedTransaction & | psbtx, |
bool & | complete, | ||
SigHashType | sighash_type = SigHashType().withForkId() , |
||
bool | sign = true , |
||
bool | bip32derivs = 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.
[in] | psbtx | PartiallySignedTransaction to fill in |
[out] | complete | indicates whether the PSBT is now complete |
[in] | sighash_type | the sighash type to use when signing (if PSBT does not specify) |
[in] | sign | whether to sign or not |
[in] | bip32derivs | whether to fill in bip32 derivation information if available return error |
Definition at line 2802 of file wallet.cpp.
const CTxOut & CWallet::FindNonChangeParentOutput | ( | const CTransaction & | tx, |
int | output | ||
) | const |
Find non-change parent output.
Definition at line 2493 of file wallet.cpp.
bool CWallet::FundTransaction | ( | CMutableTransaction & | tx, |
Amount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
bilingual_str & | error, | ||
bool | lockUnspents, | ||
const std::set< int > & | setSubtractFeeFromOutputs, | ||
CCoinControl | coinControl | ||
) |
Insert additional inputs into the transaction by calling CreateTransaction();.
Definition at line 2864 of file wallet.cpp.
std::map< CTxDestination, Amount > CWallet::GetAddressBalances | ( | ) | const |
Definition at line 3692 of file wallet.cpp.
std::set< std::set< CTxDestination > > CWallet::GetAddressGroupings | ( | ) | const |
Definition at line 3737 of file wallet.cpp.
Amount CWallet::GetAvailableBalance | ( | const CCoinControl * | coinControl = nullptr | ) | const |
CWallet::Balance CWallet::GetBalance | ( | int | min_depth = 0 , |
bool | avoid_reuse = true |
||
) | const |
Definition at line 2252 of file wallet.cpp.
unsigned int CWallet::GetKeyPoolSize | ( | ) | const |
Definition at line 3606 of file wallet.cpp.
std::set< CTxDestination > CWallet::GetLabelAddresses | ( | const std::string & | label | ) | const |
Definition at line 3842 of file wallet.cpp.
|
static |
Return a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain.
Definition at line 2940 of file wallet.cpp.
bool CWallet::GetNewChangeDestination | ( | const OutputType | type, |
CTxDestination & | dest, | ||
std::string & | error | ||
) |
Definition at line 3645 of file wallet.cpp.
bool CWallet::GetNewDestination | ( | const OutputType | type, |
const std::string | label, | ||
CTxDestination & | dest, | ||
std::string & | error | ||
) |
Definition at line 3625 of file wallet.cpp.
int64_t CWallet::GetOldestKeyPoolTime | ( | ) | const |
bool ReserveDestination::GetReservedDestination | ( | CTxDestination & | pubkey, |
bool | internal | ||
) |
Reserve an address.
Definition at line 3860 of file wallet.cpp.
|
static |
Definition at line 2920 of file wallet.cpp.
bool CWallet::IsLockedCoin | ( | const COutPoint & | outpoint | ) | const |
Definition at line 3913 of file wallet.cpp.
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 3881 of file wallet.cpp.
size_t CWallet::KeypoolCountExternalKeys | ( | ) | const |
Definition at line 3595 of file wallet.cpp.
std::map< CTxDestination, std::vector< COutput > > CWallet::ListCoins | ( | ) | const |
Return list of available coins and locked coins grouped by non-change output address.
Definition at line 2443 of file wallet.cpp.
void CWallet::ListLockedCoins | ( | std::vector< COutPoint > & | vOutpts | ) | const |
Definition at line 3919 of file wallet.cpp.
DBErrors CWallet::LoadWallet | ( | bool & | fFirstRunRet | ) |
Definition at line 3453 of file wallet.cpp.
void CWallet::LockCoin | ( | const COutPoint & | output | ) |
Definition at line 3898 of file wallet.cpp.
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 3672 of file wallet.cpp.
void ReserveDestination::ReturnDestination | ( | ) |
Return reserved address.
Definition at line 3890 of file wallet.cpp.
bool CWallet::SelectCoins | ( | const std::vector< COutput > & | vAvailableCoins, |
const Amount | nTargetValue, | ||
std::set< CInputCoin > & | setCoinsRet, | ||
Amount & | nValueRet, | ||
const CCoinControl & | coin_control, | ||
CoinSelectionParams & | coin_selection_params, | ||
bool & | bnb_used | ||
) | const |
Select a set of coins such that nValueRet >= nTargetValue and at least all coins from coinControl are selected; Never select unconfirmed coins if they are not ours.
Definition at line 2596 of file wallet.cpp.
bool CWallet::SelectCoinsMinConf | ( | const Amount | nTargetValue, |
const CoinEligibilityFilter & | eligibility_filter, | ||
std::vector< OutputGroup > | groups, | ||
std::set< CInputCoin > & | setCoinsRet, | ||
Amount & | nValueRet, | ||
const CoinSelectionParams & | coin_selection_params, | ||
bool & | bnb_used | ||
) | const |
Shuffle and select coins until nTargetValue is reached while avoiding small change; This method is stochastic for some inputs and upon completion the coin set and corresponding actual target value is assembled.
Definition at line 2511 of file wallet.cpp.
bool CWallet::SetAddressBook | ( | const CTxDestination & | address, |
const std::string & | strName, | ||
const std::string & | purpose | ||
) |
|
private |
SigningResult CWallet::SignMessage | ( | const std::string & | message, |
const PKHash & | pkhash, | ||
std::string & | str_sig | ||
) | const |
Definition at line 2851 of file wallet.cpp.
bool CWallet::SignTransaction | ( | CMutableTransaction & | tx | ) | const |
Definition at line 2738 of file wallet.cpp.
bool CWallet::SignTransaction | ( | CMutableTransaction & | tx, |
const std::map< COutPoint, Coin > & | coins, | ||
SigHashType | sighash, | ||
std::map< int, std::string > & | input_errors | ||
) | const |
bool CWallet::TopUpKeyPool | ( | unsigned int | kpSize = 0 | ) |
OutputType CWallet::TransactionChangeType | ( | OutputType | change_type, |
const std::vector< CRecipient > & | vecSend | ||
) |
Definition at line 2986 of file wallet.cpp.
void CWallet::UnlockAllCoins | ( | ) |
Definition at line 3908 of file wallet.cpp.
void CWallet::UnlockCoin | ( | const COutPoint & | output | ) |
Definition at line 3903 of file wallet.cpp.
Definition at line 3483 of file wallet.cpp.