bodhiproject / qrypto

Qtum light wallet and local transaction signing client
GNU General Public License v3.0
9 stars 12 forks source link

Accept WIP that corresponds to uncompressed public key #191

Closed hayeah closed 6 years ago

hayeah commented 6 years ago

The length from the WIP string should be either 51 or 52.

https://github.com/bodhiproject/qrypto/blob/433f246f4970071b588eda74b8b2ad1c8dda9a5c/src/utils/index.ts#L52

A public key can be uncompressed or compressed:

https://bitcoin.stackexchange.com/questions/3059/what-is-a-compressed-bitcoin-key

The corresponding private key in WIP format may be 51 (uncompressed) or 52 bytes (compressed), according to:

https://en.bitcoin.it/wiki/Wallet_import_format

The underlying validatePrivateKey function should handle either cases.

soshochang commented 6 years ago

@hayeah resolved in PR194, will be part of next release