user101191: I am trying the following commands on my v0.19.0.1 Core implementation:
CLI signmessage $(CLI getnewaddress) <message>
and the identical
CLI signmessagewithprivkey $(bitcoin-cli dumpprivkey $(CLI getnewaddress)) <message>
Both times I get Error code: -3 "Address does not refer to key"
All my addresses are wrapped-Segwit (3...). Does this mean since its P2SH there is no way to find the privkey from the address?
Thank you

user75551: Use signmessagewithprivkey for non legacy addresses.

user48884: signmessage and verifymessage only work with legacy type addresses. They do not work with segwit addresses. There is ongoing work to introduce a new message signing standard that will work regardless of address type.
Some discussion about why they only work on legacy addresses can be found in this issue: https://github.com/bitcoin/bitcoin/issues/10542

101191: <p>I am trying the following commands on my v0.19.0.1 Core implementation:
<code>CLI signmessage $(CLI getnewaddress) &lt;message&gt;</code>
and the identical
<code>CLI signmessagewithprivkey $(bitcoin-cli dumpprivkey $(CLI getnewaddress)) &lt;message&gt;</code></p>
<p>Both times I get Error code: -3 &quot;Address does not refer to key&quot;
All my addresses are wrapped-Segwit (3...). Does this mean since its P2SH there is no way to find the privkey from the address?</p>
<p>Thank you</p>
 75551: <p>Use <code>signmessagewithprivkey</code> for non legacy addresses.</p>
 48884: <p><code>signmessage</code> and <code>verifymessage</code> only work with legacy type addresses. They do not work with segwit addresses. There is ongoing work to introduce a new message signing standard that will work regardless of address type.</p>
<p>Some discussion about why they only work on legacy addresses can be found in this issue: <a href="https://github.com/bitcoin/bitcoin/issues/10542" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/10542</a></p>
