[#wallet-WalletStorage]
= xref:wallet.adoc[wallet]::WalletStorage
:relfileprefix: ../
:mrdocs:

Wallet storage things that ScriptPubKeyMans need in order to be able to store things to the wallet database&period; It provides access to things that are part of the entire wallet and not specific to a ScriptPubKeyMan such as wallet flags, wallet version, encryption keys, encryption status, and the database itself&period; This allows a ScriptPubKeyMan to have callbacks into CWallet without causing a circular dependency&period; WalletStorage should be the same for all ScriptPubKeyMans of a wallet&period;

== Synopsis

Declared in `&lt;wallet&sol;scriptpubkeyman&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class WalletStorage;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/WalletStorage/2destructor.adoc[`&#126;WalletStorage`] [.small]#[destructor]# [.small]#[virtual]#
| Destroys the wallet storage&period;
| xref:wallet/WalletStorage/GetDatabase.adoc[`GetDatabase`]  [.small]#[virtual]#
| Returns the database backing this wallet&period;
| xref:wallet/WalletStorage/HasEncryptionKeys.adoc[`HasEncryptionKeys`]  [.small]#[virtual]#
| Returns whether the wallet has encryption keys (i&period;e&period; is encrypted)&period;
| xref:wallet/WalletStorage/IsLocked.adoc[`IsLocked`]  [.small]#[virtual]#
| Returns whether the wallet is currently locked&period;
| xref:wallet/WalletStorage/IsWalletFlagSet.adoc[`IsWalletFlagSet`]  [.small]#[virtual]#
| Returns whether the given wallet flag is set&period;
| xref:wallet/WalletStorage/LogName.adoc[`LogName`]  [.small]#[virtual]#
| Returns the wallet name used to tag log output&period;
| xref:wallet/WalletStorage/TopUpCallback.adoc[`TopUpCallback`]  [.small]#[virtual]#
| Callback function for after TopUp completes containing any scripts that were added by a SPKMan
| xref:wallet/WalletStorage/UnsetBlankWalletFlag.adoc[`UnsetBlankWalletFlag`]  [.small]#[virtual]#
| Clears the &quot;blank wallet&quot; flag, recording the change in the given batch&period;
| xref:wallet/WalletStorage/WithEncryptionKey.adoc[`WithEncryptionKey`]  [.small]#[virtual]#
| Pass the encryption key to cb()&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CWallet.adoc[`CWallet`] 
| A CWallet maintains a set of transactions and balances, and provides the ability to create new transactions&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
