Skip to content

Commit

Permalink
fix IsValidPublicKey() to use schnorr.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Jan 18, 2024
1 parent 70f719e commit 9457c5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 9457c5a

Please sign in to comment.