[#wallet-CreateWallet] = xref:wallet.adoc[wallet]::CreateWallet :relfileprefix: ../ :mrdocs: Create a new wallet and load it into the context. == Synopsis Declared in `<wallet/wallet.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::shared_ptr<CWallet> CreateWallet( xref:wallet/WalletContext.adoc[WalletContext]& context, std::string const& name, std::optional<bool> load_on_start, xref:wallet/DatabaseOptions.adoc[DatabaseOptions]& options, xref:wallet/DatabaseStatus.adoc[DatabaseStatus]& status, xref:bilingual_str.adoc[bilingual_str]& error, std::vector<bilingual_str>& warnings); ---- == Return Value The new wallet, or nullptr on failure. == Parameters [cols="1,4"] |=== | Name| Description | *context* | The wallet context to create into. | *name* | The name for the new wallet. | *load_on_start* | Optionally set whether the wallet loads on startup. | *options* | Database options used to create the wallet. | *status* | Set to the database creation status. | *error* | Set to an error message on failure. | *warnings* | Warnings produced while creating. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#