wallet::LoadWallet

Load an existing wallet from disk into the context.

Synopsis

Declared in <wallet/wallet.h>

std::shared_ptr<CWallet>
LoadWallet(
    WalletContext& context,
    std::string const& name,
    std::optional<bool> load_on_start,
    DatabaseOptions const& options,
    DatabaseStatus& status,
    bilingual_str& error,
    std::vector<bilingual_str>& warnings);

Return Value

The loaded wallet, or nullptr on failure.

Parameters

NameDescription
contextThe wallet context to load into.
nameThe wallet name to load.
load_on_startOptionally set whether the wallet loads on startup.
optionsDatabase options used to open the wallet.
statusSet to the database open status.
errorSet to an error message on failure.
warningsWarnings produced while loading.