How do I get my private key? Background

I saw this on the internet



I didn't think signing / verifying was possible with P2SH addresses, so I guess this wallet must be using something like signmessagewithprivkey
     ¯\_(ツ)_/¯

Anyway, with signmessagewithprivkey "privkey" "message", privkey is required and doesn't provide a default.

Actual Question

How do I get (see) my private key?
That depends on what type of P2SH address it is. Only some P2SH script types actually have a one-to-one relationship with a private key. The most common case is probably embedded segwit. If its a P2SH-P2WPKH address, you can retrieve the public key from the embedded P2WPKH script using the dumpprivkey RPC command.