mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-01 10:39:19 +02:00
fix IsValidPublicKey() to use schnorr.
This commit is contained in:
parent
70f719ea31
commit
9457c5a794
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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user