mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-21 03:28:04 +01:00
use schnorr from btcec instead of the bip340 library.
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/fiatjaf/bip340"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
@@ -211,11 +210,11 @@ func (r *RelayPool) PublishEvent(evt *Event) (*Event, chan PublishStatus, error)
|
||||
}
|
||||
|
||||
if evt.PubKey == "" {
|
||||
secretKeyN, err := bip340.ParsePrivateKey(*r.SecretKey)
|
||||
sk, err := GetPublicKey(*r.SecretKey)
|
||||
if err != nil {
|
||||
return nil, status, fmt.Errorf("The pool's global SecretKey is invalid: %w", err)
|
||||
}
|
||||
evt.PubKey = fmt.Sprintf("%x", bip340.GetPublicKey(secretKeyN))
|
||||
evt.PubKey = sk
|
||||
}
|
||||
|
||||
if evt.Sig == "" {
|
||||
|
||||
Reference in New Issue
Block a user