bitcoin core – Gradual deprecation of importprivkey call?

[ad_1]

Yes, importprivkey will stop being supported entirely whenever support for legacy wallets is removed, probably in version 28.0. Old wallets will of course be covertible to the new format.

However, it is perfectly possible to import things into new wallets that involve private keys, using the importdescriptors RPC, which has different arguments and different semantics, but almost certainly covers your use case. See the documentation for importprivkey, which mentions:

Note: This command is only compatible with legacy wallets. Use “importdescriptors” with “combo(X)” for descriptor wallets.

The reason for not supporting importprivkey in legacy wallets is that its behavior is hard to reason about, and intentionally not supported anymore for descriptor wallets:

  • importprivkey is effectively a “here is a key, figure out what I want to do with it”. It will cause certain (but not all) single-key addresses related to that key to become part of the wallet, but it will also do things like making a multisig script the wallet knew about go from watch-only to fully supported if it now has all its keys.
  • With importdescriptor (and the philosophy behind descriptor wallets in general), you have to be explicit about what/how you want to use the key.

[ad_2]

Source link

Leave a Comment