Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit 467c59d

Browse files
committed
convert id to bytes before verifying event
1 parent 033e1f1 commit 467c59d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nostr/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def sign(self, private_key_hex: str) -> None:
5151
def verify(self) -> bool:
5252
pub_key = PublicKey(bytes.fromhex("02" + self.public_key), True) # add 02 for schnorr (bip340)
5353
event_id = Event.compute_id(self.public_key, self.created_at, self.kind, self.tags, self.content)
54-
return pub_key.schnorr_verify(event_id, bytes.fromhex(self.signature), None, raw=True)
54+
return pub_key.schnorr_verify(bytes.fromhex(event_id), bytes.fromhex(self.signature), None, raw=True)
5555

5656
def to_json_object(self) -> dict:
5757
return {

0 commit comments

Comments
 (0)