mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 13:22:56 +01:00
always use fastsign option on btcec schnorr.
This commit is contained in:
parent
a546203758
commit
6f778f85ba
@ -42,7 +42,7 @@ func (evt Event) CheckSignature() (bool, error) {
|
||||
}
|
||||
|
||||
// Sign signs an event with a given privateKey.
|
||||
func (evt *Event) Sign(secretKey string, signOpts ...schnorr.SignOption) error {
|
||||
func (evt *Event) Sign(secretKey string) error {
|
||||
s, err := hex.DecodeString(secretKey)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Sign called with invalid secret key '%s': %w", secretKey, err)
|
||||
@ -57,7 +57,7 @@ func (evt *Event) Sign(secretKey string, signOpts ...schnorr.SignOption) error {
|
||||
evt.PubKey = hex.EncodeToString(pkBytes[1:])
|
||||
|
||||
h := sha256.Sum256(evt.Serialize())
|
||||
sig, err := schnorr.Sign(sk, h[:], signOpts...)
|
||||
sig, err := schnorr.Sign(sk, h[:], schnorr.FastSign())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user