wallet::WalletBatch

Access to the wallet database. Opens the database and provides read and write access to it. Each read and write is its own transaction. Multiple operation transactions can be started using TxnBegin() and committed using TxnCommit() Otherwise the transaction will be committed when the object goes out of scope. Optionally (on by default) it will flush to disk on close. Every 1000 writes will automatically trigger a flush to disk.

Synopsis

Declared in <wallet/walletdb.h>

class WalletBatch;

Member Functions

NameDescription
WalletBatch [constructor]Constructors
operator= [deleted]Wallet batches are non-copyable.
EraseActiveScriptPubKeyMan Removes the active ScriptPubKeyMan record for a key type.
EraseAddressData Erases all destination data for an address.
EraseAddressReceiveRequest Erases a receive request associated with an address.
EraseLockedUTXO Removes the locked mark from an output.
EraseMasterKey Erases the master key with the given id.
EraseName Erases the address book label for an address.
ErasePurpose Erases the purpose string for an address.
EraseRecords Delete records of the given types
EraseTx Erases the wallet transaction with the given txid.
HasActiveTxn Returns whether a database transaction is currently active.
IsEncrypted Returns true if the wallet stores encryption keys.
LoadWallet Loads the wallet contents from the database into the given wallet.
ReadBestBlock Reads the best block locator scanned by the wallet.
RegisterTxnListener Registers db txn callback functions
TxnAbort Abort current transaction
TxnBegin Begin a new transaction
TxnCommit Commit current transaction
WriteActiveScriptPubKeyMan Records the active ScriptPubKeyMan for a key type.
WriteAddressPreviouslySpent Records whether an address has previously been spent from.
WriteAddressReceiveRequest Writes a receive request associated with an address.
WriteBestBlock Writes the best block locator scanned by the wallet.
WriteCryptedDescriptorKey Writes an encrypted descriptor private key.
WriteCryptedKey Writes an encrypted private key and its metadata.
WriteDescriptor Writes a wallet descriptor.
WriteDescriptorCacheItems Writes all cache items for a descriptor.
WriteDescriptorDerivedCache Writes a derived extended public key into a descriptor's cache.
WriteDescriptorKey Writes an unencrypted descriptor private key.
WriteDescriptorLastHardenedCache Writes the last hardened extended public key into a descriptor's cache.
WriteDescriptorParentCache Writes a parent extended public key into a descriptor's cache.
WriteKey Writes an unencrypted private key and its metadata.
WriteKeyMetadata Writes metadata for a key.
WriteLockedUTXO Marks an output as locked in the wallet.
WriteMasterKey Writes a master key used to encrypt wallet keys.
WriteName Writes the address book label for an address.
WriteOrderPosNext Writes the next available transaction ordering position.
WritePurpose Writes the purpose string for an address.
WriteTx Writes a wallet transaction record.
WriteVersion Write the given client_version to m_batch, indicating the last version of client software to load this wallet.
WriteWalletFlags Writes the wallet flags.
WriteWatchOnly Writes a watch-only script and its metadata.
WriteWtxVariant Writes a wallet transaction variant record.