X9Developers / XSN

XSN - Stakenet, the first cryptocurrency with Trustless Proof of Stake
https://stakenet.io
MIT License
93 stars 49 forks source link

Signmessage command does not work with Segwit address #119

Closed Kuosumi closed 5 years ago

Kuosumi commented 5 years ago

Signmessage in XSN wallet, should sign the address and verify address owner is true.

This works for legacy addresses however; when using SegWit addresses, it returns the following:

Address does not refer to key (code -3)

Address was unable to be signed as expected with that command.

Yes, tried on two different wallets - same issue.

Wallet version 1.0.17

Windows

bwang22 commented 5 years ago

The address is a p2sh address, it doesn't have an associated public or private key to sign and verify messages with. The underlying script has a private key associated with it, but not the address itself.

https://github.com/bitcoin/bitcoin/issues/10542