wallet::CWallet::AddWalletDescriptor

Add a descriptor to the wallet, return a ScriptPubKeyMan & associated output type

Synopsis

Declared in <wallet/wallet.h>

[[requires_capability(0x7ff3720f1b88), requires_capability(0x7ff365f21b88), requires_capability(0x7ff35de60538), requires_capability(0x7ff35efe5018), requires_capability(0x7ff366fd15f8)]]
util::Result<std::reference_wrapper<DescriptorScriptPubKeyMan>>
AddWalletDescriptor(
    WalletDescriptor& desc,
    FlatSigningProvider const& signing_provider,
    std::string const& label,
    bool internal);

Return Value

The added descriptor ScriptPubKeyMan, or an error on failure.

Parameters

NameDescription
descThe wallet descriptor to add.
signing_providerKeys and scripts needed to solve the descriptor.
labelThe label to assign to generated addresses.
internalWhether the descriptor manages internal (change) addresses.