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

Load an existing wallet from disk into the context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::shared&lowbar;ptr&lt;CWallet&gt;
LoadWallet(
    xref:wallet/WalletContext.adoc[WalletContext]& context,
    std::string const& name,
    std::optional&lt;bool&gt; load&lowbar;on&lowbar;start,
    xref:wallet/DatabaseOptions.adoc[DatabaseOptions] const& options,
    xref:wallet/DatabaseStatus.adoc[DatabaseStatus]& status,
    xref:bilingual_str.adoc[bilingual&lowbar;str]& error,
    std::vector&lt;bilingual&lowbar;str&gt;& warnings);
----

== Return Value

The loaded wallet, or nullptr on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *context*
| The wallet context to load into&period;
| *name*
| The wallet name to load&period;
| *load&lowbar;on&lowbar;start*
| Optionally set whether the wallet loads on startup&period;
| *options*
| Database options used to open the wallet&period;
| *status*
| Set to the database open status&period;
| *error*
| Set to an error message on failure&period;
| *warnings*
| Warnings produced while loading&period;
|===


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