Issue Details

Number
30175
Title
Enable `importprivkey`, `addmultisigaddress` in descriptor wallets
Description
### Please describe the feature you'd like to see added. Descriptor wallets currently do not support the "legacy" import commands `importprivkey`, `importpubkey`, `importaddress`, `addmultisigaddress`, `importmulti`, and `importwallet`. This was done because the semantics of these RPC cannot be replicated in descriptor wallets, as they just fundamentally work differently (being explicit about what to watch rather than "whatever matches the bag of keys and scripts we have"). I want to suggest the possibility to reconsider that. The exact semantics cannot be replicated, but ignoring that, for many of these RPCs, the almost certain intent of the RPCs can be replicated: * `importprivkey` and `importpubkey` can be mapped to a `combo()` descriptor * `importaddress` can be mapped to an `addr()` descriptor * `addmultisigaddress` can be mapped to a `multi()` descriptor, wrapped in `sh()`, `sh(wsh())`, or `wsh()` depending on the address type (already returned as the `descriptor` field in the RPC output). * `importmulti` and `importwallet` are more involved, but do contain enough information for mapping to descriptors. For the simpler ones out of these, it makes sense too. `importprivkey` is simpler to use than learning the descriptor syntax, and no less safe. A reason not to do this is if a user would reasonably expect different semantics, or if there are guides out there that use certain RPCs in a way that relies on the "bag of keys and scripts" behavior, but I doubt it. Another reason not to do this is lack of taproot support in these RPCs, though that could be addressed with warnings, or in some cases, extensions (e.g. nothing prevents us from adding a taproot variant to `addmultisigaddress`). ### Is your feature related to a problem, if so please describe it. I've seen several complaints about how hard `importdescriptors` is in use for importing a private key, or creating a multisig address. ### Describe the solution you'd like _No response_ ### Describe any alternatives you've considered _No response_ ### Please leave any additional context _No response_
URL
https://github.com/bitcoin/bitcoin/issue/30175
Closed by
Back to List