|
WalletDatabase & | GetDBHandle () |
| Get database handle used by this wallet. More...
|
|
bool | SelectCoins (const std::vector< COutput > &vAvailableCoins, const CAmount &nTargetValue, std::set< CInputCoin > &setCoinsRet, CAmount &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...
|
|
const std::string & | GetName () const |
| Get a name for this wallet for logging/debugging purposes. More...
|
|
void | LoadKeyPool (int64_t nIndex, const CKeyPool &keypool) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | MarkPreSplitKeys () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
std::map< CKeyID, CKeyMetadata > mapKeyMetadata | GUARDED_BY (cs_wallet) |
|
std::map< CScriptID, CKeyMetadata > m_script_metadata | GUARDED_BY (cs_wallet) |
|
| CWallet (std::string name, std::unique_ptr< WalletDatabase > database) |
| Construct wallet with specified name and database implementation. More...
|
|
| ~CWallet () |
|
std::map< uint256, CWalletTx > mapWallet | GUARDED_BY (cs_wallet) |
|
int64_t nOrderPosNext | GUARDED_BY (cs_wallet)=0 |
|
std::set< COutPoint > setLockedCoins | GUARDED_BY (cs_wallet) |
|
const CWalletTx * | GetWalletTx (const uint256 &hash) const |
|
bool | CanSupportFeature (enum WalletFeature wf) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| check whether we are allowed to upgrade (or already support) to the named feature More...
|
|
void | AvailableCoins (std::vector< COutput > &vCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t nMaximumCount=0, const int nMinDepth=0, const int nMaxDepth=9999999) const EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| populate vCoins with vector of available COutputs. More...
|
|
std::map< CTxDestination, std::vector< COutput > > | ListCoins () const EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| Return list of available coins and locked coins grouped by non-change output address. More...
|
|
const CTxOut & | FindNonChangeParentOutput (const CTransaction &tx, int output) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Find non-change parent output. More...
|
|
bool | SelectCoinsMinConf (const CAmount &nTargetValue, const CoinEligibilityFilter &eligibility_filter, std::vector< OutputGroup > groups, std::set< CInputCoin > &setCoinsRet, CAmount &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 | IsSpent (const uint256 &hash, unsigned int n) const EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| Outpoint is spent if any non-conflicted transaction spends it: More...
|
|
std::vector< OutputGroup > | GroupOutputs (const std::vector< COutput > &outputs, bool single_coin) const |
|
bool | IsLockedCoin (uint256 hash, unsigned int n) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | LockCoin (const COutPoint &output) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | UnlockCoin (const COutPoint &output) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | UnlockAllCoins () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | ListLockedCoins (std::vector< COutPoint > &vOutpts) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | AbortRescan () |
|
bool | IsAbortingRescan () |
|
bool | IsScanning () |
|
CPubKey | GenerateNewKey (WalletBatch &batch, bool internal=false) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| keystore implementation Generate a new key More...
|
|
bool | AddKeyPubKey (const CKey &key, const CPubKey &pubkey) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Adds a key to the store, and saves it to disk. More...
|
|
bool | AddKeyPubKeyWithDB (WalletBatch &batch, const CKey &key, const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
bool | LoadKey (const CKey &key, const CPubKey &pubkey) |
| Adds a key to the store, without saving it to disk (used by LoadWallet) More...
|
|
void | LoadKeyMetadata (const CKeyID &keyID, const CKeyMetadata &metadata) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Load metadata (used by LoadWallet) More...
|
|
void | LoadScriptMetadata (const CScriptID &script_id, const CKeyMetadata &metadata) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
bool | LoadMinVersion (int nVersion) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | UpdateTimeFirstKey (int64_t nCreateTime) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Update wallet first key creation time. More...
|
|
bool | AddCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret) override |
| Adds an encrypted key to the store, and saves it to disk. More...
|
|
bool | LoadCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret) |
| Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) More...
|
|
bool | AddCScript (const CScript &redeemScript) override |
| Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki. More...
|
|
bool | LoadCScript (const CScript &redeemScript) |
|
bool | AddDestData (const CTxDestination &dest, const std::string &key, const std::string &value) |
| Adds a destination data tuple to the store, and saves it to disk. More...
|
|
bool | EraseDestData (const CTxDestination &dest, const std::string &key) |
| Erases a destination data tuple in the store and on disk. More...
|
|
void | LoadDestData (const CTxDestination &dest, const std::string &key, const std::string &value) |
| Adds a destination data tuple to the store, without saving it to disk. More...
|
|
bool | GetDestData (const CTxDestination &dest, const std::string &key, std::string *value) const |
| Look up a destination data tuple in the store, return true if found false otherwise. More...
|
|
std::vector< std::string > | GetDestValues (const std::string &prefix) const |
| Get all destination values matching a prefix. More...
|
|
bool | AddWatchOnly (const CScript &dest, int64_t nCreateTime) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Adds a watch-only address to the store, and saves it to disk. More...
|
|
bool | RemoveWatchOnly (const CScript &dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
bool | LoadWatchOnly (const CScript &dest) |
| Adds a watch-only address to the store, without saving it to disk (used by LoadWallet) More...
|
|
bool | Unlock (const SecureString &strWalletPassphrase) |
|
bool | ChangeWalletPassphrase (const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase) |
|
bool | EncryptWallet (const SecureString &strWalletPassphrase) |
|
void | GetKeyBirthTimes (std::map< CTxDestination, int64_t > &mapKeyBirth) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
unsigned int | ComputeTimeSmart (const CWalletTx &wtx) const |
| Compute smart timestamp for a transaction being added to the wallet. More...
|
|
int64_t | IncOrderPosNext (WalletBatch *batch=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Increment the next transaction order id. More...
|
|
DBErrors | ReorderTransactions () |
|
void | MarkDirty () |
|
bool | AddToWallet (const CWalletTx &wtxIn, bool fFlushOnClose=true) |
|
void | LoadToWallet (const CWalletTx &wtxIn) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | TransactionAddedToMempool (const CTransactionRef &tx) override |
| Notifies listeners of a transaction having been added to mempool. More...
|
|
void | BlockConnected (const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindex, const std::vector< CTransactionRef > &vtxConflicted) override |
| Notifies listeners of a block being connected. More...
|
|
void | BlockDisconnected (const std::shared_ptr< const CBlock > &pblock) override |
| Notifies listeners of a block being disconnected. More...
|
|
int64_t | RescanFromTime (int64_t startTime, const WalletRescanReserver &reserver, bool update) |
| Scan active chain for relevant transactions after importing keys. More...
|
|
CBlockIndex * | ScanForWalletTransactions (CBlockIndex *pindexStart, CBlockIndex *pindexStop, const WalletRescanReserver &reserver, bool fUpdate=false) |
| Scan the block chain (starting in pindexStart) for transactions from or to us. More...
|
|
void | TransactionRemovedFromMempool (const CTransactionRef &ptx) override |
| Notifies listeners of a transaction leaving mempool. More...
|
|
void | ReacceptWalletTransactions () |
|
void | ResendWalletTransactions (int64_t nBestBlockTime, CConnman *connman) override EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Tells listeners to broadcast their data. More...
|
|
std::vector< uint256 > | ResendWalletTransactionsBefore (int64_t nTime, CConnman *connman) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
|
CAmount | GetBalance (const isminefilter &filter=ISMINE_SPENDABLE, const int min_depth=0) const |
|
CAmount | GetUnconfirmedBalance () const |
|
CAmount | GetImmatureBalance () const |
|
CAmount | GetUnconfirmedWatchOnlyBalance () const |
|
CAmount | GetImmatureWatchOnlyBalance () const |
|
CAmount | GetLegacyBalance (const isminefilter &filter, int minDepth) const |
|
CAmount | GetAvailableBalance (const CCoinControl *coinControl=nullptr) const |
|
OutputType | TransactionChangeType (OutputType change_type, const std::vector< CRecipient > &vecSend) |
|
bool | FundTransaction (CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, CCoinControl) |
| Insert additional inputs into the transaction by calling CreateTransaction();. More...
|
|
bool | SignTransaction (CMutableTransaction &tx) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
bool | CreateTransaction (const std::vector< CRecipient > &vecSend, CTransactionRef &tx, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, 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...
|
|
bool | CommitTransaction (CTransactionRef tx, mapValue_t mapValue, std::vector< std::pair< std::string, std::string >> orderForm, CReserveKey &reservekey, CConnman *connman, CValidationState &state) |
| Call after CreateTransaction unless you want to abort. More...
|
|
bool | DummySignTx (CMutableTransaction &txNew, const std::set< CTxOut > &txouts, bool use_max_sig=false) const |
|
bool | DummySignTx (CMutableTransaction &txNew, const std::vector< CTxOut > &txouts, bool use_max_sig=false) const |
|
bool | DummySignInput (CTxIn &tx_in, const CTxOut &txout, bool use_max_sig=false) const |
|
bool | NewKeyPool () |
| Mark old keypool keys as used, and generate all new keys. More...
|
|
size_t | KeypoolCountExternalKeys () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
bool | TopUpKeyPool (unsigned int kpSize=0) |
|
bool | ReserveKeyFromKeyPool (int64_t &nIndex, CKeyPool &keypool, bool fRequestedInternal) |
| Reserves a key from the keypool and sets nIndex to its index. More...
|
|
void | KeepKey (int64_t nIndex) |
|
void | ReturnKey (int64_t nIndex, bool fInternal, const CPubKey &pubkey) |
|
bool | GetKeyFromPool (CPubKey &key, bool internal=false) |
|
int64_t | GetOldestKeyPoolTime () |
|
void | MarkReserveKeysAsUsed (int64_t keypool_id) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Marks all keys in the keypool up to and including reserve_key as used. More...
|
|
const std::map< CKeyID, int64_t > & | GetAllReserveKeys () const |
|
std::set< std::set< CTxDestination > > | GetAddressGroupings () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
std::map< CTxDestination, CAmount > | GetAddressBalances () EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
|
std::set< CTxDestination > | GetLabelAddresses (const std::string &label) const |
|
isminetype | IsMine (const CTxIn &txin) const |
|
CAmount | GetDebit (const CTxIn &txin, const isminefilter &filter) const |
| Returns amount of debit if the input matches the filter, otherwise returns 0. More...
|
|
isminetype | IsMine (const CTxOut &txout) const |
|
CAmount | GetCredit (const CTxOut &txout, const isminefilter &filter) const |
|
bool | IsChange (const CTxOut &txout) const |
|
CAmount | GetChange (const CTxOut &txout) const |
|
bool | IsMine (const CTransaction &tx) const |
|
bool | IsFromMe (const CTransaction &tx) const |
| should probably be renamed to IsRelevantToMe More...
|
|
CAmount | GetDebit (const CTransaction &tx, const isminefilter &filter) const |
|
bool | IsAllFromMe (const CTransaction &tx, const isminefilter &filter) const |
| Returns whether all of the inputs match the filter. More...
|
|
CAmount | GetCredit (const CTransaction &tx, const isminefilter &filter) const |
|
CAmount | GetChange (const CTransaction &tx) const |
|
void | ChainStateFlushed (const CBlockLocator &loc) override |
| Notifies listeners of the new active block chain on-disk. More...
|
|
DBErrors | LoadWallet (bool &fFirstRunRet) |
|
DBErrors | ZapWalletTx (std::vector< CWalletTx > &vWtx) |
|
DBErrors | ZapSelectTx (std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
bool | SetAddressBook (const CTxDestination &address, const std::string &strName, const std::string &purpose) |
|
bool | DelAddressBook (const CTxDestination &address) |
|
const std::string & | GetLabelName (const CScript &scriptPubKey) const |
|
void | GetScriptForMining (std::shared_ptr< CReserveScript > &script) |
|
unsigned int | GetKeyPoolSize () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
|
void | SetMinVersion (enum WalletFeature, WalletBatch *batch_in=nullptr, bool fExplicit=false) |
| signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower More...
|
|
bool | SetMaxVersion (int nVersion) |
| change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format) More...
|
|
int | GetVersion () |
| get the current wallet format (the oldest client version guaranteed to understand this wallet) More...
|
|
std::set< uint256 > | GetConflicts (const uint256 &txid) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Get wallet transactions that conflict with given transaction (spend same outputs) More...
|
|
bool | HasWalletSpend (const uint256 &txid) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) |
| Check if a given transaction has any of its outputs spent by another transaction in the wallet. More...
|
|
void | Flush (bool shutdown=false) |
| Flush wallet (bitdb flush) More...
|
|
bool | GetBroadcastTransactions () const |
| Inquire whether this wallet broadcasts transactions. More...
|
|
void | SetBroadcastTransactions (bool broadcast) |
| Set whether this wallet broadcasts transactions. More...
|
|
bool | TransactionCanBeAbandoned (const uint256 &hashTx) const |
| Return whether transaction can be abandoned. More...
|
|
bool | AbandonTransaction (const uint256 &hashTx) |
|
bool | MarkReplaced (const uint256 &originalHash, const uint256 &newHash) |
| Mark a transaction as replaced by another transaction (e.g., BIP 125). More...
|
|
void | postInitProcess () |
| Wallet post-init setup Gives the wallet a chance to register repetitive tasks and complete post-init tasks. More...
|
|
bool | BackupWallet (const std::string &strDest) |
|
void | SetHDChain (const CHDChain &chain, bool memonly) |
|
const CHDChain & | GetHDChain () const |
|
bool | IsHDEnabled () const |
|
CPubKey | GenerateNewSeed () |
|
CPubKey | DeriveNewSeed (const CKey &key) |
|
void | SetHDSeed (const CPubKey &key) |
|
void | BlockUntilSyncedToCurrentChain () LOCKS_EXCLUDED(cs_main |
| Blocks until the wallet state is up-to-date to /at least/ the current chain at the time this function is entered Obviously holding cs_main/cs_wallet when going into this call may cause deadlock. More...
|
|
void | LearnRelatedScripts (const CPubKey &key, OutputType) |
| Explicitly make the wallet learn the related scripts for outputs to the given key. More...
|
|
void | LearnAllRelatedScripts (const CPubKey &key) |
| Same as LearnRelatedScripts, but when the OutputType is not known (and could be anything). More...
|
|
void | SetWalletFlag (uint64_t flags) |
| set a single wallet flag More...
|
|
bool | IsWalletFlagSet (uint64_t flag) |
| check if a certain wallet flag is set More...
|
|
bool | SetWalletFlags (uint64_t overwriteFlags, bool memOnly) |
| overwrite all flags by the given uint64_t returns false if unknown, non-tolerable flags are present More...
|
|
const std::string | GetDisplayName () const |
| Returns a bracketed wallet name for displaying in logs, will return [default wallet] if the wallet has no name. More...
|
|
template<typename... Params> |
void | WalletLogPrintf (std::string fmt, Params... parameters) const |
| Prepends the wallet name in logging output to ease debugging in multi-wallet use cases. More...
|
|
bool | GetKeyOrigin (const CKeyID &keyid, KeyOriginInfo &info) const override |
| Implement lookup of key origin information through wallet key metadata. More...
|
|
| CCryptoKeyStore () |
|
bool | IsCrypted () const |
|
bool | IsLocked () const |
|
bool | Lock () |
|
bool | HaveKey (const CKeyID &address) const override |
| Check whether a key corresponding to a given address is present in the store. More...
|
|
bool | GetKey (const CKeyID &address, CKey &keyOut) const override |
|
bool | GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const override |
|
std::set< CKeyID > | GetKeys () const override |
|
bool | AddKey (const CKey &key) |
|
bool | HaveCScript (const CScriptID &hash) const override |
|
std::set< CScriptID > | GetCScripts () const override |
|
bool | GetCScript (const CScriptID &hash, CScript &redeemScriptOut) const override |
|
bool | HaveWatchOnly (const CScript &dest) const override |
|
bool | HaveWatchOnly () const override |
|
virtual | ~SigningProvider () |
|