Initializes, creates and returns a new CWallet; returns a null pointer in case of an error

Synopsis

Declared in <wallet/wallet.h>

static
std::shared_ptr<CWallet>
CreateNew(
    WalletContext& context,
    std::string const& name,
    std::unique_ptr<WalletDatabase> database,
    uint64_t wallet_creation_flags,
    bool born_encrypted,
    bilingual_str& error,
    std::vector<bilingual_str>& warnings);

Return Value

The new wallet, or nullptr on failure.

Parameters

Name

Description

context

The wallet context to create into.

name

The name for the new wallet.

database

The database backend for the new wallet.

wallet_creation_flags

Wallet flags to apply at creation.

born_encrypted

Whether the wallet is created already encrypted.

error

Set to an error message on failure.

warnings

Warnings produced while creating.

Created with MrDocs