wallet::MigrateLegacyToDescriptor

MigrateLegacyToDescriptor overloads

Synopses

Declared in <wallet/wallet.h>

Requirement: The wallet provided to this function must be isolated, with no attachment to the node's context.

[[nodiscard]]
util::Result<MigrationResult>
MigrateLegacyToDescriptor(
    std::shared_ptr<CWallet> local_wallet,
    SecureString const& passphrase,
    WalletContext& context,
    bool load_wallet = true);
» more...

Do all steps to migrate a legacy wallet to a descriptor wallet

[[nodiscard]]
util::Result<MigrationResult>
MigrateLegacyToDescriptor(
    std::string const& wallet_name,
    SecureString const& passphrase,
    WalletContext& context,
    bool load_wallet = true);
» more...

Return Value

The migration result, or an error on failure.

NOTE

The return value should not be discarded.

Parameters

NameDescription
local_walletThe isolated wallet to migrate.
passphraseThe passphrase to unlock an encrypted wallet.
contextThe wallet context to migrate within.
load_walletWhether to load the migrated wallet afterward.
wallet_nameThe name of the wallet to migrate.