fix IsValidPublicKey() to use schnorr.

This commit is contained in:
fiatjaf 2024-01-18 17:56:54 -03:00
parent 70f719ea31
commit 9457c5a794
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -50,6 +50,6 @@ func IsValidPublicKeyHex(pk string) bool {
func IsValidPublicKey(pk string) bool {
v, _ := hex.DecodeString(pk)
_, err := btcec.ParsePubKey(v)
return len(v) == 32 && err == nil
_, err := schnorr.ParsePubKey(v)
return err == nil
}