wallet::ExportWatchOnlyWallet

Make a new watchonly wallet file containing the public descriptors from this wallet The exported watchonly wallet file will be named and placed at the path specified in 'destination'

Synopsis

Declared in <wallet/export.h>

[[requires_capability(0x7f2e16015720)]]
util::Result<std::string>
ExportWatchOnlyWallet(
    CWallet const& wallet,
    fs::path const& destination,
    WalletContext& context);

Return Value

The name of the created watch-only wallet on success, or an error on failure.

Parameters

NameDescription
walletThe wallet to export the public descriptors from.
destinationThe path where the new watch-only wallet file is created.
contextThe wallet context used to create and load the new wallet.