These are the command I'm using on the wallet console:
importprivkey "MY KEY"
dumpprivkey "ADDRESS"
You still can import but with a different command: use
importdescriptors instead.
For a single WIF private key for a Native SegWit address, the command may look like this:
importdescriptors "[{\"desc\": \"wpkh(WIF_PRIV_KEY)#z0cazjry\", \"timestamp\": 0}]"
Use:
help importdescriptors to know how to use the command.
Here's how to construct descriptors:
https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.mdAnd to get the checksum (
#z0cazjry in the example), use:
getdescriptorinfo "descriptor"
For dumpprivkey, I believe that it's intentionally removed because of the design of BIP44, BIP49, BIP84 and BIP86 standards which now use non-hardened addresses.
Previously, there's no serious issue with exporting a single private key from a legacy HD wallet with hardened addresses since there's no way to compute the parent extended private key from its pair extended public key and a child (
exported) private key.
Now, since the 'address_index' as well as the 'chain_index' (
change) paths aren't hardened, that issue is now possible if an attacker gets his hand on those data.
There's a workaround export your privKey but be warned of the issue above:
https://bitcointalk.org/index.php?topic=5449245.msg62109703#msg62109703