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

2 Answers 2


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

  • Is there a way for me to request legacy addresses from my wallet? Aug 12, 2020 at 17:52
  • 1
    getnewaddress "" legacy
    – Ava Chow
    Aug 12, 2020 at 17:53

Use signmessagewithprivkey for non legacy addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.