wallet::CreateWallet

Create a new wallet and load it into the context.

Synopsis

Declared in <wallet/wallet.h>

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

Return Value

The new wallet, or nullptr on failure.

Parameters

NameDescription
contextThe wallet context to create into.
nameThe name for the new wallet.
load_on_startOptionally set whether the wallet loads on startup.
optionsDatabase options used to create the wallet.
statusSet to the database creation status.
errorSet to an error message on failure.
warningsWarnings produced while creating.