fix IsValidPublicKey() to use schnorr.
This commit is contained in:
4
keys.go
4
keys.go
@@ -50,6 +50,6 @@ func IsValidPublicKeyHex(pk string) bool {
|
|||||||
|
|
||||||
func IsValidPublicKey(pk string) bool {
|
func IsValidPublicKey(pk string) bool {
|
||||||
v, _ := hex.DecodeString(pk)
|
v, _ := hex.DecodeString(pk)
|
||||||
_, err := btcec.ParsePubKey(v)
|
_, err := schnorr.ParsePubKey(v)
|
||||||
return len(v) == 32 && err == nil
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user